diff --git a/lib/cli.py b/lib/cli.py index 38d2b6490ff93a4a014c46b0eb3ffd31533a329d..3aa74533da69fc046aa9cd2ffaed7acddf09090f 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -445,7 +445,7 @@ def AddTags(opts, args): if not args: raise errors.OpPrereqError("No tags to be added") op = opcodes.OpTagsSet(kind=kind, name=name, tags=args) - SubmitOpCode(op, opts=opts) + SubmitOrSend(op, opts) def RemoveTags(opts, args): @@ -462,7 +462,7 @@ def RemoveTags(opts, args): if not args: raise errors.OpPrereqError("No tags to be removed") op = opcodes.OpTagsDel(kind=kind, name=name, tags=args) - SubmitOpCode(op, opts=opts) + SubmitOrSend(op, opts) def check_unit(option, opt, value): # pylint: disable=W0613 diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index 2ac33dfafbf9f981cc805f114b081097472eef6b..2c57ea9e31eaf3ae02d078567b921d82ddc0dcc2 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -1344,10 +1344,10 @@ commands = { "list-tags": ( ListTags, ARGS_NONE, [], "", "List the tags of the cluster"), "add-tags": ( - AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], + AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "tag...", "Add tags to the cluster"), "remove-tags": ( - RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], + RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "tag...", "Remove tags from the cluster"), "search-tags": ( SearchTags, [ArgUnknown(min=1, max=1)], [PRIORITY_OPT], "", diff --git a/lib/client/gnt_group.py b/lib/client/gnt_group.py index 096bb9934bce1990e725d221c87606b175d77c94..199b9276d57d381a983cf13efbf3dfc4292531ff 100644 --- a/lib/client/gnt_group.py +++ b/lib/client/gnt_group.py @@ -243,15 +243,15 @@ commands = { "[-I <iallocator>] [--to <group>]", "Evacuate all instances within a group"), "list-tags": ( - ListTags, ARGS_ONE_GROUP, [PRIORITY_OPT], + ListTags, ARGS_ONE_GROUP, [], "<instance_name>", "List the tags of the given instance"), "add-tags": ( AddTags, [ArgGroup(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<instance_name> tag...", "Add tags to the given instance"), "remove-tags": ( RemoveTags, [ArgGroup(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<instance_name> tag...", "Remove tags from given instance"), } diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py index 23b683359c67753edaf5f16a8f3af170a19ff4db..5ecf16f0839e35836f2de444a981eae065d98b58 100644 --- a/lib/client/gnt_instance.py +++ b/lib/client/gnt_instance.py @@ -1539,15 +1539,15 @@ commands = { [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT], "[-I <iallocator>] [--to <group>]", "Change group of instance"), "list-tags": ( - ListTags, ARGS_ONE_INSTANCE, [PRIORITY_OPT], + ListTags, ARGS_ONE_INSTANCE, [], "<instance_name>", "List the tags of the given instance"), "add-tags": ( AddTags, [ArgInstance(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<instance_name> tag...", "Add tags to the given instance"), "remove-tags": ( RemoveTags, [ArgInstance(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<instance_name> tag...", "Remove tags from given instance"), } diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index 4858b0854adc91977531935c8016ad29296fda84..cc965aa9fcc1594587e48d2cc8eadc2bfd266db1 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -948,15 +948,16 @@ commands = { ListTags, ARGS_ONE_NODE, [], "<node_name>", "List the tags of the given node"), "add-tags": ( - AddTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], + AddTags, [ArgNode(min=1, max=1), ArgUnknown()], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<node_name> tag...", "Add tags to the given node"), "remove-tags": ( RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT], + [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], "<node_name> tag...", "Remove tags from the given node"), "health": ( Health, ARGS_MANY_NODES, - [NOHDR_OPT, SEP_OPT, SUBMIT_OPT, PRIORITY_OPT, OOB_TIMEOUT_OPT], + [NOHDR_OPT, SEP_OPT, PRIORITY_OPT, OOB_TIMEOUT_OPT], "[<node_name>...]", "List health of node(s) using out-of-band"), }