On Tue, Dec 06, 2011 at 06:52:19PM +0100, Agata Murawska wrote:
> gnt-group modify can now change instance policy specs. Support for
> 'default' value is provided and sanity checks are performed.
>
> Signed-off-by: Agata Murawska <[email protected]>
> ---
> lib/client/gnt_group.py | 41 ++++++++++++++++++++++++++++++++++++++---
> lib/cmdlib.py | 14 ++++++++++++++
> lib/opcodes.py | 1 +
> 3 files changed, 53 insertions(+), 3 deletions(-)
>
> diff --git a/lib/client/gnt_group.py b/lib/client/gnt_group.py
> index 3770a00..0f80c2d 100644
> --- a/lib/client/gnt_group.py
> +++ b/lib/client/gnt_group.py
> @@ -146,8 +146,10 @@ def SetGroupParams(opts, args):
> @return: the desired exit code
>
> """
> - if (opts.ndparams is None and opts.alloc_policy is None
> - and not opts.diskparams):
> + if (opts.ndparams is None and opts.alloc_policy is None and
> + opts.mem_count_ispecs is None and opts.cpu_count_ispecs is None and
> + opts.disk_count_ispecs is None and opts.disk_size_ispecs is None and
> + opts.nic_count_ispecs is None and not opts.diskparams):
Please change this to:
allmods = [opts.ndparams, opts.alloc_policy, …]
if allmods.count(None) == len(allmods):
ToStderr(…)
Rest LGTM.
thanks,
iustin