Commit fdcf4d84 authored by Iustin Pop's avatar Iustin Pop

Move the “--show-cmd” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent edeb878a
......@@ -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.
......
......@@ -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,
......
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