Revision e3876ccb
b/lib/cli.py | ||
---|---|---|
49 | 49 |
"DEBUG_OPT", |
50 | 50 |
"DEBUG_SIMERR_OPT", |
51 | 51 |
"DISK_TEMPLATE_OPT", |
52 |
"DISK_OPT", |
|
52 | 53 |
"FIELDS_OPT", |
53 | 54 |
"FILESTORE_DIR_OPT", |
54 | 55 |
"FILESTORE_DRIVER_OPT", |
... | ... | |
544 | 545 |
help="NIC parameters", default=[], |
545 | 546 |
dest="nics", action="append", type="identkeyval") |
546 | 547 |
|
548 |
DISK_OPT = cli_option("--disk", help="Disk parameters", default=[], |
|
549 |
dest="disks", action="append", type="identkeyval") |
|
550 |
|
|
547 | 551 |
|
548 | 552 |
def _ParseArgs(argv, commands, aliases): |
549 | 553 |
"""Parser for the command line arguments. |
b/scripts/gnt-backup | ||
---|---|---|
217 | 217 |
completion_suggest=OPT_COMPL_INST_ADD_NODES), |
218 | 218 |
BACKEND_OPT, |
219 | 219 |
DISK_TEMPLATE_OPT, |
220 |
cli_option("--disk", help="Disk information", |
|
221 |
default=[], dest="disks", |
|
222 |
action="append", |
|
223 |
type="identkeyval"), |
|
220 |
DISK_OPT, |
|
224 | 221 |
cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a" |
225 | 222 |
" single-disk configuration, when not using the --disk option," |
226 | 223 |
" in MiB unless a suffix is used", |
b/scripts/gnt-instance | ||
---|---|---|
1374 | 1374 |
" single-disk configuration, when not using the --disk option," |
1375 | 1375 |
" in MiB unless a suffix is used", |
1376 | 1376 |
default=None, type="unit", metavar="<size>"), |
1377 |
cli_option("--disk", help="Disk information", |
|
1378 |
default=[], dest="disks", |
|
1379 |
action="append", |
|
1380 |
type="identkeyval"), |
|
1377 |
DISK_OPT, |
|
1381 | 1378 |
NET_OPT, |
1382 | 1379 |
NONICS_OPT, |
1383 | 1380 |
NWSYNC_OPT, |
... | ... | |
1525 | 1522 |
"[-s|-p|-n NODE|-I NAME] <instance>", |
1526 | 1523 |
"Replaces all disks for the instance"), |
1527 | 1524 |
'modify': (SetInstanceParams, ARGS_ONE_INSTANCE, |
1528 |
[DEBUG_OPT, FORCE_OPT, |
|
1529 |
HVOPTS_OPT, |
|
1530 |
BACKEND_OPT, |
|
1531 |
cli_option("--disk", help="Disk changes", |
|
1532 |
default=[], dest="disks", |
|
1533 |
action="append", |
|
1534 |
type="identkeyval"), |
|
1535 |
NET_OPT, |
|
1536 |
SUBMIT_OPT, |
|
1537 |
], |
|
1525 |
[BACKEND_OPT, DEBUG_OPT, DISK_OPT, FORCE_OPT, HVOPTS_OPT, |
|
1526 |
NET_OPT, SUBMIT_OPT], |
|
1538 | 1527 |
"<instance>", "Alters the parameters of an instance"), |
1539 | 1528 |
'shutdown': (ShutdownInstance, [ArgInstance(min=1)], |
1540 | 1529 |
[DEBUG_OPT, m_node_opt, m_pri_node_opt, m_sec_node_opt, |
Also available in: Unified diff