Commit 12054861 authored by Iustin Pop's avatar Iustin Pop

Move the “--reboot-type” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 14e9e7f3
......@@ -96,6 +96,7 @@ __all__ = [
"OS_OPT",
"OS_SIZE_OPT",
"READD_OPT",
"REBOOT_TYPE_OPT",
"SECONDARY_IP_OPT",
"SELECT_OS_OPT",
"SEP_OPT",
......@@ -791,6 +792,12 @@ NONPLUS1_OPT = cli_option("--no-nplus1-mem", dest="skip_nplusone_mem",
help="Skip N+1 memory redundancy tests",
action="store_true", default=False)
REBOOT_TYPE_OPT = cli_option("-t", "--type", dest="reboot_type",
help="Type of reboot: soft/hard/full",
default=constants.INSTANCE_REBOOT_HARD,
metavar="<REBOOT>",
choices=list(constants.REBOOT_TYPES))
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -1466,12 +1466,7 @@ commands = {
],
"<instance>", "Starts an instance"),
'reboot': (RebootInstance, [ArgInstance(min=1)],
[DEBUG_OPT, m_force_multi,
cli_option("-t", "--type", dest="reboot_type",
help="Type of reboot: soft/hard/full",
default=constants.INSTANCE_REBOOT_HARD,
metavar="<REBOOT>",
choices=list(constants.REBOOT_TYPES)),
[DEBUG_OPT, m_force_multi, REBOOT_TYPE_OPT,
cli_option("--ignore-secondaries", dest="ignore_secondaries",
default=False, action="store_true",
help="Ignore errors from secondaries"),
......
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