Revision e588764d lib/cli.py
b/lib/cli.py | ||
---|---|---|
71 | 71 |
"HVOPTS_OPT", |
72 | 72 |
"HYPERVISOR_OPT", |
73 | 73 |
"IALLOCATOR_OPT", |
74 |
"IDENTIFY_DEFAULTS_OPT", |
|
74 | 75 |
"IGNORE_CONSIST_OPT", |
75 | 76 |
"IGNORE_FAILURES_OPT", |
76 | 77 |
"IGNORE_SECONDARIES_OPT", |
... | ... | |
921 | 922 |
" health, by shutting down unknown instances, shutting down" |
922 | 923 |
" unknown DRBD devices, etc.") |
923 | 924 |
|
925 |
IDENTIFY_DEFAULTS_OPT = \ |
|
926 |
cli_option("--identify-defaults", dest="identify_defaults", |
|
927 |
default=False, action="store_true", |
|
928 |
help="Identify which saved instance parameters are equal to" |
|
929 |
" the current cluster defaults and set them as such, instead" |
|
930 |
" of marking them as overridden") |
|
931 |
|
|
924 | 932 |
|
925 | 933 |
def _ParseArgs(argv, commands, aliases): |
926 | 934 |
"""Parser for the command line arguments. |
... | ... | |
1599 | 1607 |
src_node = None |
1600 | 1608 |
src_path = None |
1601 | 1609 |
no_install = opts.no_install |
1610 |
identify_defaults = False |
|
1602 | 1611 |
elif mode == constants.INSTANCE_IMPORT: |
1603 | 1612 |
start = False |
1604 | 1613 |
os_type = None |
1605 | 1614 |
src_node = opts.src_node |
1606 | 1615 |
src_path = opts.src_dir |
1607 | 1616 |
no_install = None |
1617 |
identify_defaults = opts.identify_defaults |
|
1608 | 1618 |
else: |
1609 | 1619 |
raise errors.ProgrammerError("Invalid creation mode %s" % mode) |
1610 | 1620 |
|
... | ... | |
1627 | 1637 |
os_type=os_type, |
1628 | 1638 |
src_node=src_node, |
1629 | 1639 |
src_path=src_path, |
1630 |
no_install=no_install) |
|
1640 |
no_install=no_install, |
|
1641 |
identify_defaults=identify_defaults) |
|
1631 | 1642 |
|
1632 | 1643 |
SubmitOrSend(op, opts) |
1633 | 1644 |
return 0 |
Also available in: Unified diff