Ssh key management for softlayer #321
…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
…otExistError if it does
…_key_pair get just one key instead of getting all of them and then check the results
…f keys, not just one
…ve/get_one/get_all/import_from_string. Adds tests for all new methods.
…/Itxaka/libcloud into ssh_key_management_for_softlayer
…to variable to Fasle instead of True
@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.