Revision 771734c9 lib/cli.py
b/lib/cli.py | ||
---|---|---|
54 | 54 |
"DISKIDX_OPT", |
55 | 55 |
"DISK_OPT", |
56 | 56 |
"DISK_TEMPLATE_OPT", |
57 |
"DRAINED_OPT", |
|
57 | 58 |
"FIELDS_OPT", |
58 | 59 |
"FILESTORE_DIR_OPT", |
59 | 60 |
"FILESTORE_DRIVER_OPT", |
... | ... | |
65 | 66 |
"IGNORE_FAILURES_OPT", |
66 | 67 |
"IGNORE_SIZE_OPT", |
67 | 68 |
"FORCE_OPT", |
69 |
"MC_OPT", |
|
68 | 70 |
"NET_OPT", |
69 | 71 |
"NEW_SECONDARY_OPT", |
70 | 72 |
"NODE_LIST_OPT", |
... | ... | |
78 | 80 |
"NWSYNC_OPT", |
79 | 81 |
"ON_PRIMARY_OPT", |
80 | 82 |
"ON_SECONDARY_OPT", |
83 |
"OFFLINE_OPT", |
|
81 | 84 |
"OS_OPT", |
82 | 85 |
"OS_SIZE_OPT", |
83 | 86 |
"READD_OPT", |
... | ... | |
453 | 456 |
cli_option = CliOption |
454 | 457 |
|
455 | 458 |
|
459 |
_YESNO = ("yes", "no") |
|
460 |
_YORNO = "yes|no" |
|
461 |
|
|
456 | 462 |
DEBUG_OPT = cli_option("-d", "--debug", default=False, |
457 | 463 |
action="store_true", |
458 | 464 |
help="Turn debugging on") |
... | ... | |
692 | 698 |
help="Disable SSH key fingerprint checking") |
693 | 699 |
|
694 | 700 |
|
701 |
MC_OPT = cli_option("-C", "--master-candidate", dest="master_candidate", |
|
702 |
choices=_YESNO, default=None, metavar=_YORNO, |
|
703 |
help="Set the master_candidate flag on the node") |
|
704 |
|
|
705 |
OFFLINE_OPT = cli_option("-O", "--offline", dest="offline", metavar=_YORNO, |
|
706 |
choices=_YESNO, default=None, |
|
707 |
help="Set the offline flag on the node") |
|
708 |
|
|
709 |
DRAINED_OPT = cli_option("-D", "--drained", dest="drained", metavar=_YORNO, |
|
710 |
choices=_YESNO, default=None, |
|
711 |
help="Set the drained flag on the node") |
|
712 |
|
|
713 |
|
|
695 | 714 |
def _ParseArgs(argv, commands, aliases): |
696 | 715 |
"""Parser for the command line arguments. |
697 | 716 |
|
Also available in: Unified diff