Skip to content
Snippets Groups Projects
Commit 8d823629 authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the “--secondary-ip” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent df62e5db
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ __all__ = [
"ON_SECONDARY_OPT",
"OS_OPT",
"OS_SIZE_OPT",
"SECONDARY_IP_OPT",
"SELECT_OS_OPT",
"SEP_OPT",
"SHOWCMD_OPT",
......@@ -676,6 +677,10 @@ SRC_NODE_OPT = cli_option("--src-node", dest="src_node", help="Source node",
SRC_DIR_OPT = cli_option("--src-dir", dest="src_dir", help="Source directory",
metavar="<dir>")
SECONDARY_IP_OPT = cli_option("-s", "--secondary-ip", dest="secondary_ip",
help="Specify the secondary ip for the node",
metavar="ADDRESS", default=None)
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -589,11 +589,7 @@ def WatcherOps(opts, args):
commands = {
'init': (InitCluster, [ArgHost(min=1, max=1)],
[DEBUG_OPT,
cli_option("-s", "--secondary-ip", dest="secondary_ip",
help="Specify the secondary ip for this node;"
" if given, the entire cluster must have secondary"
" addresses",
metavar="ADDRESS", default=None),
SECONDARY_IP_OPT,
cli_option("-m", "--mac-prefix", dest="mac_prefix",
help="Specify the mac prefix for the instance IP"
" addresses, in the format XX:XX:XX",
......
......@@ -624,9 +624,7 @@ def SetNodeParams(opts, args):
commands = {
'add': (AddNode, [ArgHost(min=1, max=1)],
[DEBUG_OPT,
cli_option("-s", "--secondary-ip", dest="secondary_ip",
help="Specify the secondary ip for the node",
metavar="ADDRESS", default=None),
SECONDARY_IP_OPT,
cli_option("--readd", dest="readd",
default=False, action="store_true",
help="Readd old node after replacing it"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment