---
lib/cli.py | 6 ++++++
scripts/gnt-instance | 5 +----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index b754db2..c2a0709 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -74,6 +74,7 @@ __all__ = [
"NOSTART_OPT",
"NWSYNC_OPT",
"ON_PRIMARY_OPT",
+ "ON_SECONDARY_OPT",
"OS_OPT",
"OS_SIZE_OPT",
"SELECT_OS_OPT",
@@ -648,6 +649,11 @@ ON_PRIMARY_OPT = cli_option("-p", "--on-primary",
dest="on_primary",
help="Replace the disk(s) on the primary"
" node (only for the drbd template)")
+ON_SECONDARY_OPT = cli_option("-s", "--on-secondary", dest="on_secondary",
+ default=False, action="store_true",
+ help="Replace the disk(s) on the secondary"
+ " node (only for the drbd template)")
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 8ae812a..f803855 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1438,10 +1438,7 @@ commands = {
[DEBUG_OPT,
NEW_SECONDARY_OPT,
ON_PRIMARY_OPT,
- cli_option("-s", "--on-secondary", dest="on_secondary",
- default=False, action="store_true",
- help=("Replace the disk(s) on the secondary"
- " node (only for the drbd template)")),
+ ON_SECONDARY_OPT,
cli_option("-a", "--auto", dest="auto",
default=False, action="store_true",
help=("Automatically replace faulty disks"
--
1.6.3.3