---
lib/cli.py | 7 +++++++
scripts/gnt-instance | 8 +-------
scripts/gnt-node | 7 +------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 5047d5d..28c486f 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -58,6 +58,7 @@ __all__ = [
"HVOPTS_OPT",
"HYPERVISOR_OPT",
"IALLOCATOR_OPT",
+ "IGNORE_CONSIST_OPT",
"FORCE_OPT",
"NET_OPT",
"NOHDR_OPT",
@@ -560,6 +561,12 @@ OS_SIZE_OPT = cli_option("-s", "--os-size", dest="sd_size",
" given disk size, in MiB unless a suffix is used",
default=None, type="unit", metavar="<size>")
+IGNORE_CONSIST_OPT = cli_option("--ignore-consistency",
+ dest="ignore_consistency",
+ action="store_true", default=False,
+ help="Ignore the consistency of the disks on"
+ " the secondary")
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 9c7dd84..7a293da 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1402,13 +1402,7 @@ commands = {
"[--show-cmd] <instance>",
"Opens a console on the specified instance"),
'failover': (FailoverInstance, ARGS_ONE_INSTANCE,
- [DEBUG_OPT, FORCE_OPT,
- cli_option("--ignore-consistency", dest="ignore_consistency",
- action="store_true", default=False,
- help="Ignore the consistency of the disks on"
- " the secondary"),
- SUBMIT_OPT,
- ],
+ [DEBUG_OPT, FORCE_OPT, IGNORE_CONSIST_OPT, SUBMIT_OPT],
"[-f] <instance>",
"Stops the instance and starts it on the backup node, using"
" the remote mirror (only for instances of type drbd)"),
diff --git a/scripts/gnt-node b/scripts/gnt-node
index d68e1b8..15dd03a 100755
--- a/scripts/gnt-node
+++ b/scripts/gnt-node
@@ -647,12 +647,7 @@ commands = {
"Relocate the secondary instances from a node"
" to other nodes (only for instances with drbd disk template)"),
'failover': (FailoverNode, ARGS_ONE_NODE,
- [DEBUG_OPT, FORCE_OPT,
- cli_option("--ignore-consistency", dest="ignore_consistency",
- action="store_true", default=False,
- help="Ignore the consistency of the disks on"
- " the secondary"),
- ],
+ [DEBUG_OPT, FORCE_OPT, IGNORE_CONSIST_OPT],
"[-f] <node>",
"Stops the primary instances on a node and start them on their"
" secondary node (only for instances with drbd disk template)"),
--
1.6.3.3