Commit b6e841a8 authored by Iustin Pop's avatar Iustin Pop

Move the “--ignore-failures” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 67840b40
......@@ -61,6 +61,7 @@ __all__ = [
"HYPERVISOR_OPT",
"IALLOCATOR_OPT",
"IGNORE_CONSIST_OPT",
"IGNORE_FAILURES_OPT",
"FORCE_OPT",
"NET_OPT",
"NODE_LIST_OPT",
......@@ -629,6 +630,12 @@ SELECT_OS_OPT = cli_option("--select-os", dest="select_os",
help="Interactive OS reinstall, lists available"
" OS templates for selection")
IGNORE_FAILURES_OPT = cli_option("--ignore-failures", dest="ignore_failures",
action="store_true", default=False,
help="Remove the instance from the cluster"
" configuration even if there are failures"
" during the removal process")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -1428,14 +1428,7 @@ commands = {
],
"[-f] <instance>", "Reinstall a stopped instance"),
'remove': (RemoveInstance, ARGS_ONE_INSTANCE,
[DEBUG_OPT, FORCE_OPT,
cli_option("--ignore-failures", dest="ignore_failures",
action="store_true", default=False,
help=("Remove the instance from the cluster even"
" if there are failures during the removal"
" process (shutdown, disk removal, etc.)")),
SUBMIT_OPT,
],
[DEBUG_OPT, FORCE_OPT, IGNORE_FAILURES_OPT, SUBMIT_OPT],
"[-f] <instance>", "Shuts down the instance and removes it"),
'rename': (RenameInstance,
[ArgInstance(min=1, max=1), ArgHost(min=1, max=1)],
......
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