Commit 23805716 authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Restore diskparams in the gnt-group options check



Commit a82823 accidentally removed opts.diskparameters from the list of
parameters that are checked for presence in gnt-group, thus causing
invocations of gnt-group modify with only disk paramaters to fail.

This commit restores the check and also simplifies the whole chain of
checks by using only conjunctions of negations (as opposed to using both
congjunctions of negations and negations of disjunctions).
Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent ba1260ba
......@@ -135,8 +135,8 @@ def SetGroupParams(opts, args):
@return: the desired exit code
"""
if (opts.ndparams is None and opts.alloc_policy is None and
not (opts.hv_state or opts.disk_state)):
if (opts.ndparams is None and opts.alloc_policy is None
and not opts.diskparams and not opts.hv_state and not opts.disk_state):
ToStderr("Please give at least one of the parameters.")
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment