Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Ssh key management for softlayer #321
This pull requests add ssh key management for the SoftLayer driver.
Add methods for:
It also adds a new property to create node "ex_keyname" which is the name of the key to be associated to the new node.
Added tests for all methods and modified the test_create_node() test to use a sshkey as well.
…h_key as a feature for the driver, associate the key to the node on create_node if a key name is used, added list_keypairs method to get all keys on the account, add key_name_to_id method to use the id on creating the node by providing the label
@Kami thanks for the comments, will try to fix them as soon as possible.
Regarding the sshkey stuff, I still don't know if getting the local generation for ssh keys before uploading its an ok thing and could be implemented across libcloud.
Thing is, some(all?) of the cloud providers allow you to import an ssh key, but for that we need a method to generate one, upload the public part and return to the user the keypair object (public and private) so I believe it would be good if it could be used across all drivers as a new generic method. For automation purpouses it makes too much sense (we are doing it that way internally, on node creation we generate a new key from scratch for each machine, but as libcloud does not support it we are doing it outside of it)
It requires a new dependecy thougth, pycrypto.
I'm having troubles applying this patch on top of trunk (I would squash the commits myself). Can you please sync your branch with latest trunk and squash all the commits?
In the worst case, if you are also having troubles, just sync your branch with trunk, do git diff --no-prefix trunk > t.diff, create new branch, git apply t.diff and commit all the changes under a single commit.