Commit 1f587d3d authored by Iustin Pop's avatar Iustin Pop

Move the “--yes-do-it” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent b58726e8
......@@ -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):
......
......@@ -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],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment