From 831040bf899cddae79bf14a14cf99b195881711b Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 17 Sep 2009 13:57:50 +0200 Subject: [PATCH] =?UTF-8?q?Unify=20the=20=E2=80=9C--no-lvm-storage?= =?UTF-8?q?=E2=80=9D=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- 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 c1492ba3d..717d99efe 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 2ff7a525d..b2ec12bd1 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), -- GitLab