Replies are in-line.

On Thu, Dec 5, 2013 at 10:00 PM, Sebastien Goasguen <[email protected]>wrote:

> +1 see inline
> On Dec 5, 2013, at 1:50 PM, Tomaz Muraus <[email protected]> wrote:
>
> > This is something we have already talked about in the past and I believe
> > that now (pre 1.0 release) is the right time to do it.
> >
> > *Proposal*
> >
> > I propose the following methods for the key pair management to be
> promoted
> > and be a part of the standard / base compute API:
> >
> > * ex_list_keypairs -> list_keypairs()
> > * ex_create_keypair -> create_key_pair(name)
> > * ex_import_keypair -> import_key_pair_from_file(name, public_key_file)
> > * ex_import_keypair_fom_string -> import_key_pair_fom_string(name,
> > public_key_material)
> > * ex_delete_keypair -> delete_keypair(keypair)
> >
> > This also means adding a new "KeyPair" / "SSHKeyPair" class which
> > represents a key pair object.
>
> looking at your gist, do you really want to return the private key.
> in cloudstack case for instance, the list_keypairs will not return the
> private key.
>

private_key attribute is optional (None by default) so this attribute will
only be set if providers return private key in the list response.

>
> > Whole proposal for those methods and a new class is also available in a
> > more readable format as a gist - https://gist.github.com/Kami/7810989
> >
> > Currently, this functionality is already implemented as the
> aforementioned
> > extension methods in the following drivers:
> >
> > * CloudStack
> > * OpenStack
> > * Rackspace
> > * EC2
> >
> > To preserve backward compatibility, we should also modify existing
> > extension methods to call new methods and emit a deprecation warning.
> >
> > *Open questions*
> >
> > Here are a couple of things I'm still not too sure about so a feedback
> > would be greatly appreciated.
> >
> > 1. Should all the methods and a key pair class be prefixed with "ssh" so
> > it's clear that it references a SSH key pair or just calling it key pair
> is
> > clear enough?
>
> I am fine with no ssh.
>
> >
> > 2. "keypair "vs "key_pair".
> >
> > Existing extension methods use #1, but to be consistent with other
> methods,
> > we should use #2.
> >
>
> consistency would mean key_pair, but in the case I actually like keypair
> better.
> otherwise change list_keypairs to list_key_pairs -which looks weird-
>
> > 3. "import_key_pair" vs "import_public_key".
> >
> > Existing extension methods use #1, but imo it's confusing and not obvious
> > since you are importing just a public key, so a better name would be
> > "import_public_key".
>
> yes a bit confusing, but keeping it as keypair makes it clear that in the
> same "group" of calls.
>
> >
> > Feedback is welcome.
> >
> > Thanks.
>
>

Reply via email to