Commit a72d0a79 authored by Iustin Pop's avatar Iustin Pop

Move the “--on-primary” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent a14db5ff
......@@ -73,6 +73,7 @@ __all__ = [
"NONLIVE_OPT",
"NOSTART_OPT",
"NWSYNC_OPT",
"ON_PRIMARY_OPT",
"OS_OPT",
"OS_SIZE_OPT",
"SELECT_OS_OPT",
......@@ -642,6 +643,11 @@ NEW_SECONDARY_OPT = cli_option("-n", "--new-secondary", dest="dst_node",
metavar="NODE", default=None,
completion_suggest=OPT_COMPL_ONE_NODE)
ON_PRIMARY_OPT = cli_option("-p", "--on-primary", dest="on_primary",
default=False, action="store_true",
help="Replace the disk(s) on the primary"
" node (only for the drbd template)")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -1437,10 +1437,7 @@ commands = {
'replace-disks': (ReplaceDisks, ARGS_ONE_INSTANCE,
[DEBUG_OPT,
NEW_SECONDARY_OPT,
cli_option("-p", "--on-primary", dest="on_primary",
default=False, action="store_true",
help=("Replace the disk(s) on the primary"
" node (only for the drbd template)")),
ON_PRIMARY_OPT,
cli_option("-s", "--on-secondary", dest="on_secondary",
default=False, action="store_true",
help=("Replace the disk(s) on the secondary"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment