---
lib/cli.py | 3 +++
scripts/gnt-cluster | 6 +-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index d8afc49..4cd7999 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -103,6 +103,7 @@ __all__ = [
"USEUNITS_OPT",
"VERBOSE_OPT",
"VG_NAME_OPT",
+ "YES_DOIT_OPT",
# Generic functions for CLI programs
"GenericMain",
"GetClient",
@@ -743,6 +744,8 @@ VG_NAME_OPT = cli_option("-g", "--vg-name", dest="vg_name",
" name (cluster-wide) for disk allocation [xenvg]",
metavar="VG", default=None)
+YES_DOIT_OPT = cli_option("--yes-do-it", dest="yes_do_it",
+ help="Destroy cluster", action="store_true")
def _ParseArgs(argv, commands, aliases):
diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index d6191d9..5e74e85 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -627,11 +627,7 @@ commands = {
"[opts...] <cluster_name>",
"Initialises a new cluster configuration"),
'destroy': (DestroyCluster, ARGS_NONE,
- [DEBUG_OPT,
- cli_option("--yes-do-it", dest="yes_do_it",
- help="Destroy cluster",
- action="store_true"),
- ],
+ [DEBUG_OPT, YES_DOIT_OPT],
"", "Destroy cluster"),
'rename': (RenameCluster, [ArgHost(min=1, max=1)],
[DEBUG_OPT, FORCE_OPT],
--
1.6.3.3