---
lib/cli.py | 6 ++++++
scripts/gnt-backup | 4 +---
scripts/gnt-instance | 4 +---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 0ff5b43..949903f 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -50,6 +50,7 @@ __all__ = [
"DISK_TEMPLATE_OPT",
"FIELDS_OPT",
"FILESTORE_DIR_OPT",
+ "FILESTORE_DRIVER_OPT",
"FORCE_OPT",
"NOHDR_OPT",
"NONICS_OPT",
@@ -493,6 +494,11 @@ FILESTORE_DIR_OPT = cli_option("--file-storage-dir",
dest="file_storage_dir",
" file storage dir to store file-based disks",
default=None, metavar="<DIR>")
+FILESTORE_DRIVER_OPT = cli_option("--file-driver", dest="file_driver",
+ help="Driver to use for image files",
+ default="loop", metavar="<DRIVER>",
+ choices=list(constants.FILE_DRIVER))
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-backup b/scripts/gnt-backup
index 2f030e5..d159132 100755
--- a/scripts/gnt-backup
+++ b/scripts/gnt-backup
@@ -246,9 +246,7 @@ import_opts = [
" <NAME> iallocator plugin", default=None, type="string",
completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
FILESTORE_DIR_OPT,
- cli_option("--file-driver", dest="file_driver", help="Driver to use"
- " for image files", default="loop", metavar="<DRIVER>",
- choices=list(constants.FILE_DRIVER)),
+ FILESTORE_DRIVER_OPT,
cli_option("-H", "--hypervisor", dest="hypervisor",
help="Hypervisor and hypervisor options, in the format"
" hypervisor:option=value,option=value,...", default=None,
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 2598a7a..321bf20 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1397,9 +1397,7 @@ add_opts = [
action="store_false", help="Don't check that the instance's IP"
" is alive (only valid with --no-start)"),
FILESTORE_DIR_OPT,
- cli_option("--file-driver", dest="file_driver", help="Driver to use"
- " for image files", default="loop", metavar="<DRIVER>",
- choices=list(constants.FILE_DRIVER)),
+ FILESTORE_DRIVER_OPT,
cli_option("-I", "--iallocator", metavar="<NAME>",
help="Select nodes for the instance automatically using the"
" <NAME> iallocator plugin", default=None, type="string",
--
1.6.3.3