And only act on that group instead of on all groups, if the parameter is given.
Signed-off-by: Klaus Aehlig <[email protected]> --- lib/cmdlib/cluster/verify.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/cmdlib/cluster/verify.py b/lib/cmdlib/cluster/verify.py index 73357fd..d2c8d85 100644 --- a/lib/cmdlib/cluster/verify.py +++ b/lib/cmdlib/cluster/verify.py @@ -193,9 +193,14 @@ class LUClusterVerifyDisks(NoHooksLU): def ExpandNames(self): self.share_locks = ShareAll() - self.needed_locks = { - locking.LEVEL_NODEGROUP: locking.ALL_SET, - } + if self.op.group_name: + self.needed_locks = { + locking.LEVEL_NODEGROUP: [self.cfg.LookupNodeGroup(self.op.group_name)] + } + else: + self.needed_locks = { + locking.LEVEL_NODEGROUP: locking.ALL_SET, + } def Exec(self, feedback_fn): group_names = self.owned_locks(locking.LEVEL_NODEGROUP) -- 2.2.0.rc0.207.ga3a616c
