---
lib/cli.py | 5 +++++
scripts/gnt-backup | 3 +--
scripts/gnt-instance | 3 +--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 3b1156c..be71648 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 8ee9b67..372389d 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 05b2a45..b4470db 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"
--
1.6.3.3