diff --git a/lib/cli.py b/lib/cli.py index 23106bd1fb858b70c8d182b0e8b5597df52df0c5..1053d4fedbbaa117d01a06b8034c2a2a7bde12aa 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -63,6 +63,7 @@ __all__ = [ "IALLOCATOR_OPT", "IGNORE_CONSIST_OPT", "IGNORE_FAILURES_OPT", + "IGNORE_SIZE_OPT", "FORCE_OPT", "NET_OPT", "NEW_SECONDARY_OPT", @@ -660,6 +661,12 @@ AUTO_REPLACE_OPT = cli_option("-a", "--auto", dest="auto", help="Automatically replace faulty disks" " (only for the drbd template)") +IGNORE_SIZE_OPT = cli_option("--ignore-size", dest="ignore_size", + default=False, action="store_true", + help="Ignore current recorded size" + " (useful for forcing activation when" + " the recorded size is wrong)") + def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. diff --git a/scripts/gnt-instance b/scripts/gnt-instance index 7a7f734bd8e0cc503452b6e070b83e876f7d528a..8f59ffe18ba34cae31bac98da4527de7dd177bec 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -1481,13 +1481,7 @@ commands = { ], "<instance>", "Reboots an instance"), 'activate-disks': (ActivateDisks, ARGS_ONE_INSTANCE, - [DEBUG_OPT, SUBMIT_OPT, - cli_option("--ignore-size", dest="ignore_size", - default=False, action="store_true", - help="Ignore current recorded size" - " (useful for forcing activation when" - " the recorded size is wrong)"), - ], + [DEBUG_OPT, SUBMIT_OPT, IGNORE_SIZE_OPT], "<instance>", "Activate an instance's disks"), 'deactivate-disks': (DeactivateDisks, ARGS_ONE_INSTANCE,