From feb09e6a6385629c2fe5a8b651fe516cf64a3240 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 17 Sep 2009 13:39:22 +0200 Subject: [PATCH] =?UTF-8?q?Move=20the=20=E2=80=9C--on-secondary=E2=80=9D?= =?UTF-8?q?=20option=20to=20cli.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- 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 6e3621dfd..db0ed6c7d 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 53d374d07..b06f6d10d 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" -- GitLab