Commit 990b7886 authored by Iustin Pop's avatar Iustin Pop

Unify the “--node” (as instance placement) option

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent f2a0828c
......@@ -61,6 +61,7 @@ __all__ = [
"IGNORE_CONSIST_OPT",
"FORCE_OPT",
"NET_OPT",
"NODE_PLACEMENT_OPT",
"NOHDR_OPT",
"NOIPCHECK_OPT",
"NONICS_OPT",
......@@ -574,6 +575,11 @@ NONLIVE_OPT = cli_option("--non-live", dest="live",
" freeze the instance, save the state, transfer and"
" only then resume running on the secondary node)")
NODE_PLACEMENT_OPT = cli_option("-n", "--node", dest="node",
help="Target node and optional secondary node",
metavar="<pnode>[:<snode>]",
completion_suggest=OPT_COMPL_INST_ADD_NODES)
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -211,10 +211,7 @@ def RemoveExport(opts, args):
# this is defined separately due to readability only
import_opts = [
DEBUG_OPT,
cli_option("-n", "--node", dest="node",
help="Target node and optional secondary node",
metavar="<pnode>[:<snode>]",
completion_suggest=OPT_COMPL_INST_ADD_NODES),
NODE_PLACEMENT_OPT,
BACKEND_OPT,
DISK_TEMPLATE_OPT,
DISK_OPT,
......
......@@ -1363,10 +1363,7 @@ m_inst_opt = cli_option("--instance", dest="multi_mode",
# this is defined separately due to readability only
add_opts = [
DEBUG_OPT,
cli_option("-n", "--node", dest="node",
help="Target node and optional secondary node",
metavar="<pnode>[:<snode>]",
completion_suggest=OPT_COMPL_INST_ADD_NODES),
NODE_PLACEMENT_OPT,
OS_OPT,
BACKEND_OPT,
DISK_TEMPLATE_OPT,
......
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