Commit 073271f6 authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the last “--hypervisor” (as list) option



This third form takes a list of name+options, and is used only in
gnt-cluster. Who knew that we have three forms of ‘-H’?
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 236fd9c4
......@@ -52,6 +52,7 @@ __all__ = [
"FIELDS_OPT",
"FILESTORE_DIR_OPT",
"FILESTORE_DRIVER_OPT",
"HVLIST_OPT",
"HVOPTS_OPT",
"HYPERVISOR_OPT",
"IALLOCATOR_OPT",
......@@ -527,6 +528,11 @@ HYPERVISOR_OPT = cli_option("-H", "--hypervisor-parameters", dest="hypervisor",
" format hypervisor:option=value,option=value,...",
default=None, type="identkeyval")
HVLIST_OPT = cli_option("-H", "--hypervisor-parameters", dest="hvparams",
help="Hypervisor and hypervisor options, in the"
" format hypervisor:option=value,option=value,...",
default=[], action="append", type="identkeyval")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -635,12 +635,7 @@ commands = {
help="Comma-separated list of hypervisors",
type="string",
default=constants.DEFAULT_ENABLED_HYPERVISOR),
cli_option("-H", "--hypervisor-parameters", dest="hvparams",
help="Hypervisor and hypervisor options, in the format"
" hypervisor:option=value,option=value,...",
default=[],
action="append",
type="identkeyval"),
HVLIST_OPT,
BACKEND_OPT,
cli_option("-N", "--nic-parameters", dest="nicparams",
type="keyval", default={},
......@@ -734,13 +729,7 @@ commands = {
cli_option("--enabled-hypervisors", dest="enabled_hypervisors",
help="Comma-separated list of hypervisors",
type="string", default=None),
cli_option("-H", "--hypervisor-parameters", dest="hvparams",
help="Hypervisor and hypervisor options, in the"
" format"
" hypervisor:option=value,option=value,...",
default=[],
action="append",
type="identkeyval"),
HVLIST_OPT,
BACKEND_OPT,
cli_option("-N", "--nic-parameters", dest="nicparams",
type="keyval", default={},
......
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