---
lib/cli.py | 7 +++++++
scripts/gnt-instance | 8 +-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 5afc7b2..f19b0d3 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 f5a8a10..07c780a 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,
--
1.6.3.3