Revision 6bc3ed14
b/lib/cli.py | ||
---|---|---|
445 | 445 |
if not args: |
446 | 446 |
raise errors.OpPrereqError("No tags to be added") |
447 | 447 |
op = opcodes.OpTagsSet(kind=kind, name=name, tags=args) |
448 |
SubmitOpCode(op, opts=opts)
|
|
448 |
SubmitOrSend(op, opts)
|
|
449 | 449 |
|
450 | 450 |
|
451 | 451 |
def RemoveTags(opts, args): |
... | ... | |
462 | 462 |
if not args: |
463 | 463 |
raise errors.OpPrereqError("No tags to be removed") |
464 | 464 |
op = opcodes.OpTagsDel(kind=kind, name=name, tags=args) |
465 |
SubmitOpCode(op, opts=opts)
|
|
465 |
SubmitOrSend(op, opts)
|
|
466 | 466 |
|
467 | 467 |
|
468 | 468 |
def check_unit(option, opt, value): # pylint: disable=W0613 |
b/lib/client/gnt_cluster.py | ||
---|---|---|
1344 | 1344 |
"list-tags": ( |
1345 | 1345 |
ListTags, ARGS_NONE, [], "", "List the tags of the cluster"), |
1346 | 1346 |
"add-tags": ( |
1347 |
AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], |
|
1347 |
AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
1348 | 1348 |
"tag...", "Add tags to the cluster"), |
1349 | 1349 |
"remove-tags": ( |
1350 |
RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], |
|
1350 |
RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
1351 | 1351 |
"tag...", "Remove tags from the cluster"), |
1352 | 1352 |
"search-tags": ( |
1353 | 1353 |
SearchTags, [ArgUnknown(min=1, max=1)], [PRIORITY_OPT], "", |
b/lib/client/gnt_group.py | ||
---|---|---|
243 | 243 |
"[-I <iallocator>] [--to <group>]", |
244 | 244 |
"Evacuate all instances within a group"), |
245 | 245 |
"list-tags": ( |
246 |
ListTags, ARGS_ONE_GROUP, [PRIORITY_OPT],
|
|
246 |
ListTags, ARGS_ONE_GROUP, [], |
|
247 | 247 |
"<instance_name>", "List the tags of the given instance"), |
248 | 248 |
"add-tags": ( |
249 | 249 |
AddTags, [ArgGroup(min=1, max=1), ArgUnknown()], |
250 |
[TAG_SRC_OPT, PRIORITY_OPT], |
|
250 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
251 | 251 |
"<instance_name> tag...", "Add tags to the given instance"), |
252 | 252 |
"remove-tags": ( |
253 | 253 |
RemoveTags, [ArgGroup(min=1, max=1), ArgUnknown()], |
254 |
[TAG_SRC_OPT, PRIORITY_OPT], |
|
254 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
255 | 255 |
"<instance_name> tag...", "Remove tags from given instance"), |
256 | 256 |
} |
257 | 257 |
|
b/lib/client/gnt_instance.py | ||
---|---|---|
1539 | 1539 |
[TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT], |
1540 | 1540 |
"[-I <iallocator>] [--to <group>]", "Change group of instance"), |
1541 | 1541 |
"list-tags": ( |
1542 |
ListTags, ARGS_ONE_INSTANCE, [PRIORITY_OPT],
|
|
1542 |
ListTags, ARGS_ONE_INSTANCE, [], |
|
1543 | 1543 |
"<instance_name>", "List the tags of the given instance"), |
1544 | 1544 |
"add-tags": ( |
1545 | 1545 |
AddTags, [ArgInstance(min=1, max=1), ArgUnknown()], |
1546 |
[TAG_SRC_OPT, PRIORITY_OPT], |
|
1546 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
1547 | 1547 |
"<instance_name> tag...", "Add tags to the given instance"), |
1548 | 1548 |
"remove-tags": ( |
1549 | 1549 |
RemoveTags, [ArgInstance(min=1, max=1), ArgUnknown()], |
1550 |
[TAG_SRC_OPT, PRIORITY_OPT], |
|
1550 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
1551 | 1551 |
"<instance_name> tag...", "Remove tags from given instance"), |
1552 | 1552 |
} |
1553 | 1553 |
|
b/lib/client/gnt_node.py | ||
---|---|---|
948 | 948 |
ListTags, ARGS_ONE_NODE, [], |
949 | 949 |
"<node_name>", "List the tags of the given node"), |
950 | 950 |
"add-tags": ( |
951 |
AddTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT], |
|
951 |
AddTags, [ArgNode(min=1, max=1), ArgUnknown()], |
|
952 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], |
|
952 | 953 |
"<node_name> tag...", "Add tags to the given node"), |
953 | 954 |
"remove-tags": ( |
954 | 955 |
RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], |
955 |
[TAG_SRC_OPT, PRIORITY_OPT], |
|
956 |
[TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
956 | 957 |
"<node_name> tag...", "Remove tags from the given node"), |
957 | 958 |
"health": ( |
958 | 959 |
Health, ARGS_MANY_NODES, |
959 |
[NOHDR_OPT, SEP_OPT, SUBMIT_OPT, PRIORITY_OPT, OOB_TIMEOUT_OPT],
|
|
960 |
[NOHDR_OPT, SEP_OPT, PRIORITY_OPT, OOB_TIMEOUT_OPT], |
|
960 | 961 |
"[<node_name>...]", "List health of node(s) using out-of-band"), |
961 | 962 |
} |
962 | 963 |
|
Also available in: Unified diff