We need to distinguish between the option not being provided
(i.e., no change requested) and the option being empty (i.e.,
a request to reset the value). Therefore, use None as a default,
not {}.Signed-off-by: Klaus Aehlig <[email protected]> --- lib/cli.py | 2 +- lib/client/gnt_cluster.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index 2eee68b..81e362a 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -942,7 +942,7 @@ DEFAULT_IALLOCATOR_PARAMS_OPT = cli_option("--default-iallocator-params", " template:option=value," " option=value,...", type="keyval", - default={}) + default=None) OS_OPT = cli_option("-o", "--os-type", dest="os", help="What OS to run", metavar="<os>", diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index cc4b990..0ee757f 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -1120,7 +1120,7 @@ def SetClusterParams(opts, args): opts.add_uids is not None or opts.remove_uids is not None or opts.default_iallocator is not None or - opts.default_iallocator_params or + opts.default_iallocator_params is not None or opts.reserved_lvs is not None or opts.master_netdev is not None or opts.master_netmask is not None or -- 2.6.0.rc2.230.g3dd15c0
