---
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 2fed4cf..1bde744 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 0e404fa..ba52b39 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 144c5d6..3a52ae9 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,
]
--
1.6.3.3