From 236fd9c44754b8de1daf3701c1081ac2037c9147 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 17 Sep 2009 12:26:28 +0200 Subject: [PATCH] =?UTF-8?q?Unify=20the=20=E2=80=9C--hypervisor=E2=80=9D=20?= =?UTF-8?q?(with=20name)=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-backup | 5 +---- scripts/gnt-instance | 5 +---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index 2fed4cfae..1bde74454 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -53,6 +53,7 @@ __all__ = [ "FILESTORE_DIR_OPT", "FILESTORE_DRIVER_OPT", "HVOPTS_OPT", + "HYPERVISOR_OPT", "IALLOCATOR_OPT", "FORCE_OPT", "NOHDR_OPT", @@ -521,6 +522,11 @@ HVOPTS_OPT = cli_option("-H", "--hypervisor-parameters", type="keyval", default={}, dest="hvparams", help="Hypervisor parameters") +HYPERVISOR_OPT = cli_option("-H", "--hypervisor-parameters", dest="hypervisor", + help="Hypervisor and hypervisor options, in the" + " format hypervisor:option=value,option=value,...", + default=None, type="identkeyval") + def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. diff --git a/scripts/gnt-backup b/scripts/gnt-backup index 0e404fa37..ba52b3959 100755 --- a/scripts/gnt-backup +++ b/scripts/gnt-backup @@ -242,10 +242,7 @@ import_opts = [ IALLOCATOR_OPT, FILESTORE_DIR_OPT, FILESTORE_DRIVER_OPT, - cli_option("-H", "--hypervisor", dest="hypervisor", - help="Hypervisor and hypervisor options, in the format" - " hypervisor:option=value,option=value,...", default=None, - type="identkeyval"), + HYPERVISOR_OPT, ] commands = { diff --git a/scripts/gnt-instance b/scripts/gnt-instance index 144c5d693..3a52ae927 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -1393,10 +1393,7 @@ add_opts = [ FILESTORE_DIR_OPT, FILESTORE_DRIVER_OPT, IALLOCATOR_OPT, - cli_option("-H", "--hypervisor", dest="hypervisor", - help="Hypervisor and hypervisor options, in the format" - " hypervisor:option=value,option=value,...", default=None, - type="identkeyval"), + HYPERVISOR_OPT, SUBMIT_OPT, ] -- GitLab