---
lib/cli.py | 6 ++++++
scripts/gnt-backup | 5 +----
scripts/gnt-instance | 5 +----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 9062c2e..bebe52e 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -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.
diff --git a/scripts/gnt-backup b/scripts/gnt-backup
index c7a981e..ecca744 100755
--- a/scripts/gnt-backup
+++ b/scripts/gnt-backup
@@ -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,
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 84a17e4..d0593e2 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -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,
--
1.6.3.3