On Wed, Feb 05, 2014 at 11:50:49PM +0100, Santi Raffa wrote:
> On Wed, Feb 5, 2014 at 7:03 PM, Jose A. Lopes <[email protected]> wrote:
> >> diff --git a/lib/cli.py b/lib/cli.py
> >> index 5a99da6..e7f1755 100644
> >> --- a/lib/cli.py
> >> +++ b/lib/cli.py
> >> @@ -2764,6 +2764,7 @@ def GenericInstanceCreate(mode, opts, args):
> >> no_install = None
> >> identify_defaults = opts.identify_defaults
> >> compress = opts.compress
> >> + opts.osparams_secret = None
> >
> > Please follow the structure of the current code, namely,
> >
> > if mode == constants.INSTANCE_CREATE:
> > ...
> > osparams_secret = opts.osparams_secret
> > else:
> > ...
> > osparams_secret = None
>
> I could certainly do that, but then osparams_secret is no longer
> consistent with osparams and osparams_private. To be completely
> honest, I added this line because of a bug I had at some point in the
> export process; this change masked the bug without fixing it. Having
> updated the export file to have a section, I **should** be able to get
> away without that line.
Ok. Just leave it as it is.
But I'm curious as to how it broke your code.
> >> + os_defs_ = cluster.SimpleFillOS(self.op.os_type, {}, {})
> >
> > Aren't these keyword arguments (at the end of the call) ?
>
> I'd like to think of them as optional and positional parameters; they
> are keyword by necessity of implementation. Can I get away with it?
> Please? :)
Unfortunately, in Ganeti we always make the keyword args explicit.
So noooooo. :)
> > And aren't secret params missing also?
>
> Secret parameters are not in the cluster configuration.
Ok.
Thanks,
Jose
> --
> Raffa Santi
> Google Germany GmbH
> Dienerstr. 12
> 80331 München
>
>
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschäftsführer: Graham Law, Christine Elizabeth Flores
--
Jose Antonio Lopes
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370