On Tue, Nov 17, 2015 at 11:45:16AM +0100, 'Helga Velroyen' via ganeti-devel 
wrote:
> This patch introduces a backend function to add a set of
> SSH keys to the nodes (rather than one key at a time).
> The bulk-adding function is having the same structure
> as the original one, but is adapted to work with a set
> of keys rather than one key.
> 
> This patch also adds a unit test for testing the
> bulk-adding of keys.
> 
> Note that this patch only adds the bulk-adding function
> but does not use it yet. In the following patches of
> this series, we will add more unit tests and at the
> end integrate the bulk-adding function into
> renew-crypto.
> 
> Signed-off-by: Helga Velroyen <[email protected]>
> ---
>  lib/backend.py                     | 170 
> +++++++++++++++++++++++++++++++++++++
>  test/py/ganeti.backend_unittest.py |  76 +++++++++++++++--
>  2 files changed, 241 insertions(+), 5 deletions(-)

> +  # assure that at least one of those flags is true, as the function would
> +  # not do anything otherwise
> +  assert (to_authorized_keys or to_public_keys or get_public_keys)

I'm not sure the assertion here is a good idea, as it puts additional 
responsibility
on the caller. Simply returning here seems like a cleaner interface. But it's 
your
call if you want to leave it or change it.

In any case LGTM.

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to