Commit 0f87c43e authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the “--file-driver” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 4a25828c
......@@ -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.
......
......@@ -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,
......
......@@ -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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment