diff --git a/lib/opcodes.py b/lib/opcodes.py index fbae1d1aead62263beee72b51c32d018c6771c64..cac8fc05f3f89fd39d66b8d4b09e3728b73c2734 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -180,6 +180,10 @@ _PIAllocFromDesc = lambda desc: ("iallocator", None, ht.TMaybeString, desc) _PNetworkName = ("network_name", ht.NoDefault, ht.TNonEmptyString, "Set network name") +_PTargetGroups = \ + ("target_groups", None, ht.TMaybeListOf(ht.TNonEmptyString), + "Destination group names or UUIDs (defaults to \"all but current group\")") + #: OP_ID conversion regular expression _OPID_RE = re.compile("([a-z])([A-Z])") @@ -1702,8 +1706,7 @@ class OpInstanceChangeGroup(OpCode): _PInstanceName, _PEarlyRelease, _PIAllocFromDesc("Iallocator for computing solution"), - ("target_groups", None, ht.TMaybeListOf(ht.TNonEmptyString), - "Destination group names or UUIDs (defaults to \"all but current group\""), + _PTargetGroups, ] OP_RESULT = TJobIdListOnly @@ -1788,8 +1791,7 @@ class OpGroupEvacuate(OpCode): _PGroupName, _PEarlyRelease, _PIAllocFromDesc("Iallocator for computing solution"), - ("target_groups", None, ht.TMaybeListOf(ht.TNonEmptyString), - "Destination group names or UUIDs"), + _PTargetGroups, ] OP_RESULT = TJobIdListOnly