---
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 be71648..0ff5b43 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -49,6 +49,7 @@ __all__ = [
"DEBUG_SIMERR_OPT",
"DISK_TEMPLATE_OPT",
"FIELDS_OPT",
+ "FILESTORE_DIR_OPT",
"FORCE_OPT",
"NOHDR_OPT",
"NONICS_OPT",
@@ -487,6 +488,11 @@ NONICS_OPT = cli_option("--no-nics", default=False,
action="store_true",
help="Do not create any network cards for"
" the instance")
+FILESTORE_DIR_OPT = cli_option("--file-storage-dir", dest="file_storage_dir",
+ help="Relative path under default cluster-wide"
+ " file storage dir to store file-based disks",
+ default=None, metavar="<DIR>")
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-backup b/scripts/gnt-backup
index 372389d..2f030e5 100755
--- a/scripts/gnt-backup
+++ b/scripts/gnt-backup
@@ -245,10 +245,7 @@ import_opts = [
help="Select nodes for the instance automatically using the"
" <NAME> iallocator plugin", default=None, type="string",
completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
- cli_option("--file-storage-dir", dest="file_storage_dir",
- help="Relative path under default cluster-wide file storage dir"
- " to store file-based disks", default=None,
- metavar="<DIR>"),
+ 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)),
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index b4470db..2598a7a 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1396,10 +1396,7 @@ add_opts = [
cli_option("--no-ip-check", dest="ip_check", default=True,
action="store_false", help="Don't check that the instance's IP"
" is alive (only valid with --no-start)"),
- cli_option("--file-storage-dir", dest="file_storage_dir",
- help="Relative path under default cluster-wide file storage dir"
- " to store file-based disks", default=None,
- metavar="<DIR>"),
+ 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)),
--
1.6.3.3