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):
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
"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], "",
"[-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"),
}
[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"),
}
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"),
}