---
lib/cli.py | 5 +++++
scripts/gnt-instance | 5 +----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 7015460..776c42a 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -72,6 +72,7 @@ __all__ = [
"OS_OPT",
"OS_SIZE_OPT",
"SEP_OPT",
+ "SHOWCMD_OPT",
"SINGLE_NODE_OPT",
"SUBMIT_OPT",
"SYNC_OPT",
@@ -597,6 +598,10 @@ NOSTART_OPT = cli_option("--no-start", dest="start",
default=True,
action="store_false",
help="Don't start the instance after creation")
+SHOWCMD_OPT = cli_option("--show-cmd", dest="show_command",
+ action="store_true", default=False,
+ help="Show command instead of executing it")
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 3bccbe9..c75a99e 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1385,10 +1385,7 @@ commands = {
"<instances_file.json>",
"Create a bunch of instances based on specs in the file."),
'console': (ConnectToInstanceConsole, ARGS_ONE_INSTANCE,
- [DEBUG_OPT,
- cli_option("--show-cmd", dest="show_command",
- action="store_true", default=False,
- help=("Show command instead of executing it"))],
+ [DEBUG_OPT, SHOWCMD_OPT],
"[--show-cmd] <instance>",
"Opens a console on the specified instance"),
'failover': (FailoverInstance, ARGS_ONE_INSTANCE,
--
1.6.3.3