---
lib/cli.py | 6 ++++++
scripts/gnt-cluster | 10 ++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index e95f38a..3b414ed 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -74,6 +74,7 @@ __all__ = [
"NODE_PLACEMENT_OPT",
"NOHDR_OPT",
"NOIPCHECK_OPT",
+ "NOLVM_STORAGE_OPT",
"NONICS_OPT",
"NONLIVE_OPT",
"NOSTART_OPT",
@@ -715,6 +716,11 @@ ALLOCATABLE_OPT = cli_option("--allocatable",
dest="allocatable",
choices=_YESNO, default=None, metavar=_YORNO,
help="Set the allocatable flag on a volume")
+NOLVM_STORAGE_OPT = cli_option("--no-lvm-storage", dest="lvm_storage",
+ help="Disable support for lvm based instances"
+ " (cluster-wide)",
+ action="store_false", default=True)
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index 2ff7a52..b2ec12b 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -612,10 +612,7 @@ commands = {
constants.DEFAULT_FILE_STORAGE_DIR,
metavar="DIR",
default=constants.DEFAULT_FILE_STORAGE_DIR,),
- cli_option("--no-lvm-storage", dest="lvm_storage",
- help="No support for lvm based instances"
- " (cluster-wide)",
- action="store_false", default=True,),
+ NOLVM_STORAGE_OPT,
cli_option("--no-etc-hosts", dest="modify_etc_hosts",
help="Don't modify /etc/hosts"
" (cluster-wide)",
@@ -712,10 +709,7 @@ commands = {
" (cluster-wide) for disk allocation "
"and enable lvm based storage",
metavar="VG",),
- cli_option("--no-lvm-storage", dest="lvm_storage",
- help="Disable support for lvm based instances"
- " (cluster-wide)",
- action="store_false", default=True,),
+ NOLVM_STORAGE_OPT,
cli_option("--enabled-hypervisors", dest="enabled_hypervisors",
help="Comma-separated list of hypervisors",
type="string", default=None),
--
1.6.3.3