From edeb878adca61c187046146127bb0fd67e038f57 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 17 Sep 2009 13:25:48 +0200
Subject: [PATCH] =?UTF-8?q?Move=20the=20=E2=80=9C--no-start=E2=80=9D=20opt?=
 =?UTF-8?q?ion=20to=20cli.py?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cli.py           | 5 +++++
 scripts/gnt-instance | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index 7a53ffef3..70154602c 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -67,6 +67,7 @@ __all__ = [
   "NOIPCHECK_OPT",
   "NONICS_OPT",
   "NONLIVE_OPT",
+  "NOSTART_OPT",
   "NWSYNC_OPT",
   "OS_OPT",
   "OS_SIZE_OPT",
@@ -592,6 +593,10 @@ SINGLE_NODE_OPT = cli_option("-n", "--node", dest="node", help="Target node",
                              metavar="<node>",
                              completion_suggest=OPT_COMPL_ONE_NODE)
 
+NOSTART_OPT = cli_option("--no-start", dest="start", default=True,
+                         action="store_false",
+                         help="Don't start the instance after creation")
+
 
 def _ParseArgs(argv, commands, aliases):
   """Parser for the command line arguments.
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index bb88cf200..6329233f3 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1367,9 +1367,7 @@ add_opts = [
   NET_OPT,
   NONICS_OPT,
   NWSYNC_OPT,
-  cli_option("--no-start", dest="start", default=True,
-             action="store_false", help="Don't start the instance after"
-             " creation"),
+  NOSTART_OPT,
   NOIPCHECK_OPT,
   FILESTORE_DIR_OPT,
   FILESTORE_DRIVER_OPT,
-- 
GitLab