From 67840b40ab0ac18e2a9a3706dc7513a05e134433 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 17 Sep 2009 13:31:16 +0200
Subject: [PATCH] =?UTF-8?q?Move=20the=20=E2=80=9C--select-os=E2=80=9D=20op?=
 =?UTF-8?q?tion=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 | 5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index 2d6dc220a..e58d9511a 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -73,6 +73,7 @@ __all__ = [
   "NWSYNC_OPT",
   "OS_OPT",
   "OS_SIZE_OPT",
+  "SELECT_OS_OPT",
   "SEP_OPT",
   "SHOWCMD_OPT",
   "SINGLE_NODE_OPT",
@@ -623,6 +624,10 @@ ALL_OPT = cli_option("--all", dest="show_all",
                      help="Show info on all instances on the cluster."
                      " This can take a long time to run, use wisely")
 
+SELECT_OS_OPT = cli_option("--select-os", dest="select_os",
+                           action="store_true", default=False,
+                           help="Interactive OS reinstall, lists available"
+                           " OS templates for selection")
 
 
 def _ParseArgs(argv, commands, aliases):
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 0a1e5ee3c..d6daeba86 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1423,10 +1423,7 @@ commands = {
                  m_force_multi,
                  m_node_opt, m_pri_node_opt, m_sec_node_opt,
                  m_clust_opt, m_inst_opt,
-                 cli_option("--select-os", dest="select_os",
-                            action="store_true", default=False,
-                            help="Interactive OS reinstall, lists available"
-                            " OS templates for selection"),
+                 SELECT_OS_OPT,
                  SUBMIT_OPT,
                  ],
                 "[-f] <instance>", "Reinstall a stopped instance"),
-- 
GitLab