diff --git a/lib/cli.py b/lib/cli.py index e58d9511a4e90613a199164254bebf0dee9fe871..341216596c3df595a3af7af7e595f506de931551 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -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. diff --git a/scripts/gnt-instance b/scripts/gnt-instance index d6daeba86ab061a25a24dbb2708a25009f0a3d61..1d1976f875fcc1db430f325bec841890a31611d2 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -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)],