Revision f36d7d81
b/lib/cli.py | ||
---|---|---|
71 | 71 |
"OS_OPT", |
72 | 72 |
"OS_SIZE_OPT", |
73 | 73 |
"SEP_OPT", |
74 |
"SINGLE_NODE_OPT", |
|
74 | 75 |
"SUBMIT_OPT", |
75 | 76 |
"SYNC_OPT", |
76 | 77 |
"TAG_SRC_OPT", |
... | ... | |
587 | 588 |
" times, if not given defaults to all nodes)", |
588 | 589 |
completion_suggest=OPT_COMPL_ONE_NODE) |
589 | 590 |
|
591 |
SINGLE_NODE_OPT = cli_option("-n", "--node", dest="node", help="Target node", |
|
592 |
metavar="<node>", |
|
593 |
completion_suggest=OPT_COMPL_ONE_NODE) |
|
594 |
|
|
590 | 595 |
|
591 | 596 |
def _ParseArgs(argv, commands, aliases): |
592 | 597 |
"""Parser for the command line arguments. |
b/scripts/gnt-backup | ||
---|---|---|
236 | 236 |
[DEBUG_OPT, NODE_LIST_OPT], |
237 | 237 |
"", "Lists instance exports available in the ganeti cluster"), |
238 | 238 |
'export': (ExportInstance, ARGS_ONE_INSTANCE, |
239 |
[DEBUG_OPT, FORCE_OPT, |
|
240 |
cli_option("-n", "--node", dest="node", help="Target node", |
|
241 |
metavar="<node>", |
|
242 |
completion_suggest=OPT_COMPL_ONE_NODE), |
|
239 |
[DEBUG_OPT, FORCE_OPT, SINGLE_NODE_OPT, |
|
243 | 240 |
cli_option("","--noshutdown", dest="shutdown", |
244 | 241 |
action="store_false", default=True, |
245 | 242 |
help="Don't shutdown the instance (unsafe)"), ], |
b/scripts/gnt-instance | ||
---|---|---|
971 | 971 |
return 1 |
972 | 972 |
|
973 | 973 |
op = opcodes.OpMoveInstance(instance_name=instance_name, |
974 |
target_node=opts.target_node)
|
|
974 |
target_node=opts.node) |
|
975 | 975 |
SubmitOrSend(op, opts, cl=cl) |
976 | 976 |
return 0 |
977 | 977 |
|
... | ... | |
1328 | 1328 |
return 0 |
1329 | 1329 |
|
1330 | 1330 |
|
1331 |
# options used in more than one cmd |
|
1332 |
node_opt = cli_option("-n", "--node", dest="node", help="Target node", |
|
1333 |
metavar="<node>", |
|
1334 |
completion_suggest=OPT_COMPL_ONE_NODE) |
|
1335 |
|
|
1336 | 1331 |
# multi-instance selection options |
1337 | 1332 |
m_force_multi = cli_option("--force-multiple", dest="force_multi", |
1338 | 1333 |
help="Do not ask for confirmation when more than" |
... | ... | |
1418 | 1413 |
"Migrate instance to its secondary node" |
1419 | 1414 |
" (only for instances of type drbd)"), |
1420 | 1415 |
'move': (MoveInstance, ARGS_ONE_INSTANCE, |
1421 |
[DEBUG_OPT, FORCE_OPT, SUBMIT_OPT, |
|
1422 |
cli_option("-n", "--new-node", dest="target_node", |
|
1423 |
help="Destinattion node", metavar="NODE", |
|
1424 |
default=None, |
|
1425 |
completion_suggest=OPT_COMPL_ONE_NODE), |
|
1426 |
], |
|
1416 |
[DEBUG_OPT, FORCE_OPT, SUBMIT_OPT, SINGLE_NODE_OPT], |
|
1427 | 1417 |
"[-f] <instance>", |
1428 | 1418 |
"Move instance to an arbitrary node" |
1429 | 1419 |
" (only for instances of type file and lv)"), |
Also available in: Unified diff