diff --git a/lib/cli.py b/lib/cli.py index 42eb25af76f9105568d53e4be2d7620276ceaf21..f93d72cc22f8baa8c5d3af263dc7cd845477382b 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -58,6 +58,7 @@ __all__ = [ "DISK_TEMPLATE_OPT", "DRAINED_OPT", "ENABLED_HV_OPT", + "ERROR_CODES_OPT", "FIELDS_OPT", "FILESTORE_DIR_OPT", "FILESTORE_DRIVER_OPT", @@ -84,6 +85,7 @@ __all__ = [ "NOMODIFY_ETCHOSTS_OPT", "NONICS_OPT", "NONLIVE_OPT", + "NONPLUS1_OPT", "NOSTART_OPT", "NOSSH_KEYCHECK_OPT", "NOVOTING_OPT", @@ -781,6 +783,14 @@ NOMODIFY_ETCHOSTS_OPT = cli_option("--no-etc-hosts", dest="modify_etc_hosts", help="Don't modify /etc/hosts", action="store_false", default=True) +ERROR_CODES_OPT = cli_option("--error-codes", dest="error_codes", + help="Enable parseable error messages", + action="store_true", default=False) + +NONPLUS1_OPT = cli_option("--no-nplus1-mem", dest="skip_nplusone_mem", + help="Skip N+1 memory redundancy tests", + action="store_true", default=False) + def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index c2f907d1cb1c5f20239d796ca5aabf30b6287aef..38dc5ad4719f41e2f598abe6fa6f3f24688b788c 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -625,13 +625,7 @@ commands = { " to the nodes in the cluster"), 'verify': (VerifyCluster, ARGS_NONE, [DEBUG_OPT, VERBOSE_OPT, DEBUG_SIMERR_OPT, - cli_option("--error-codes", dest="error_codes", - help="Enable parseable error messages", - action="store_true", default=False), - cli_option("--no-nplus1-mem", dest="skip_nplusone_mem", - help="Skip N+1 memory redundancy tests", - action="store_true", default=False), - ], + ERROR_CODES_OPT, NONPLUS1_OPT], "", "Does a check on the cluster configuration"), 'verify-disks': (VerifyDisks, ARGS_NONE, [DEBUG_OPT], "", "Does a check on the cluster disk status"),