---
lib/cli.py | 10 ++++++++++
scripts/gnt-cluster | 8 +-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index bd0ac37..c62ec26 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 c2f907d..38dc5ad 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"),
--
1.6.3.3