diff --git a/lib/cli.py b/lib/cli.py index 3b1156c7a020f83f6276595007256466530fe631..be71648698d7289ad38e0321b413f3bfd668fec2 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -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. diff --git a/scripts/gnt-backup b/scripts/gnt-backup index 8ee9b67455131182e25f8c9542fe816f85cf37c9..372389dcc6f6bad77ce49d708ddcab1ab9206efa 100755 --- a/scripts/gnt-backup +++ b/scripts/gnt-backup @@ -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>", diff --git a/scripts/gnt-instance b/scripts/gnt-instance index 05b2a45a7b1f0759acc16218c50bf9b9f7863cd3..b4470db718d743bfc7c3baf9c52c22b5378c2475 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -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"