Commit 26023ecd authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the “--no-nics” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 4f365444
......@@ -51,6 +51,7 @@ __all__ = [
"FIELDS_OPT",
"FORCE_OPT",
"NOHDR_OPT",
"NONICS_OPT",
"NWSYNC_OPT",
"SEP_OPT",
"SUBMIT_OPT",
......@@ -482,6 +483,10 @@ DISK_TEMPLATE_OPT = cli_option("-t", "--disk-template", dest="disk_template",
default=None, metavar="TEMPL",
choices=list(constants.DISK_TEMPLATES))
NONICS_OPT = cli_option("--no-nics", default=False, action="store_true",
help="Do not create any network cards for"
" the instance")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -231,8 +231,7 @@ import_opts = [
default=[], dest="nics",
action="append",
type="identkeyval"),
cli_option("--no-nics", default=False, action="store_true",
help="Do not create any network cards for the instance"),
NONICS_OPT,
NWSYNC_OPT,
cli_option("--src-node", dest="src_node", help="Source node",
metavar="<node>",
......
......@@ -1388,8 +1388,7 @@ add_opts = [
default=[], dest="nics",
action="append",
type="identkeyval"),
cli_option("--no-nics", default=False, action="store_true",
help="Do not create any network cards for the instance"),
NONICS_OPT,
NWSYNC_OPT,
cli_option("--no-start", dest="start", default=True,
action="store_false", help="Don't start the instance after"
......
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