Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

How to create OpenStack compute instance using keypair name? #624

Open
buchanae opened this issue Dec 28, 2016 · 2 comments
Open

How to create OpenStack compute instance using keypair name? #624

buchanae opened this issue Dec 28, 2016 · 2 comments

Comments

@buchanae
Copy link

There doesn't seem to be any allowance for a keypair name in openstack/servers/CreateOpts. That's surprising.

Looks like the rackspace version has it:
https://godoc.org/github.com/rackspace/gophercloud/rackspace/compute/v2/servers#CreateOpts

Did this get forgotten, or is there a different way to do it I'm not seeing?

Thanks!

@buchanae
Copy link
Author

Oh, I see, I'm supposed to combine keypairs.CreateOptsExt and servers.CreateOpts? I had to dig up this test code commit to find that, 476583f

In that case, I suppose this issue is about making that easier and/or more obvious. Keypair is a core concept and deserves a place in server.CreateOpts, just like the rackspace version.

If you disagree with that suggestion (which I hope you don't) I suggest we at least add an example here: http://gophercloud.io/docs/compute/#create-server

I'm happy to write the code for either option, given someone tells me I'm not crazy.

Thanks!

@HeikoOnnebrink
Copy link

just yesterday wrote mail to '[email protected]' asking same question.
I was searching for KeyPair in the CreateOpts and did not find it .. I also double vote for having this as an CreateOption 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants