LGTM, thanks
On Fri, Jul 11, 2014 at 11:16 AM, 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote: > Instance creation supports opportunistic locking. So, > also export it on the command line. There is no reason > to have this feature RAPI only. > > Signed-off-by: Klaus Aehlig <[email protected]> > Reviewed-by: Petr Pudlak <[email protected]> > Reviewed-by: Hrvoje Ribicic <[email protected]> > > Cherry-picked from e845c100bbe26784a83. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > lib/cli.py | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/lib/cli.py b/lib/cli.py > index 1735985..ab12bea 100644 > --- a/lib/cli.py > +++ b/lib/cli.py > @@ -1614,6 +1614,11 @@ PRIORITY_OPT = cli_option("--priority", > default=None, dest="priority", > callback=_PriorityOptionCb, > help="Priority for opcode processing") > > +OPPORTUNISTIC_OPT = cli_option("--opportunistic-locking", > + dest="opportunistic_locking", > + action="store_true", default=False, > + help="Opportunistically acquire locks") > + > HID_OS_OPT = cli_option("--hidden", dest="hidden", > type="bool", default=None, metavar=_YORNO, > help="Sets the hidden flag on the OS") > @@ -1846,6 +1851,7 @@ COMMON_CREATE_OPTS = [ > OSPARAMS_PRIVATE_OPT, > OSPARAMS_SECRET_OPT, > OS_SIZE_OPT, > + OPPORTUNISTIC_OPT, > SUBMIT_OPT, > PRINT_JOBID_OPT, > TAG_ADD_OPT, > @@ -2900,6 +2906,8 @@ def GenericInstanceCreate(mode, opts, args): > osparams_private=osparams_private, > osparams_secret=osparams_secret, > mode=mode, > + opportunistic_locking= > + opts.opportunistic_locking, > start=start, > os_type=os_type, > force_variant=force_variant, > -- > 2.0.0.526.g5318336 > >
