Commit 3f75b4f3 authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the “--no-wait-for-sync” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 1232284c
......@@ -50,6 +50,7 @@ __all__ = [
"FIELDS_OPT",
"FORCE_OPT",
"NOHDR_OPT",
"NWSYNC_OPT",
"SEP_OPT",
"SUBMIT_OPT",
"SYNC_OPT",
......@@ -470,6 +471,10 @@ DEBUG_SIMERR_OPT = cli_option("--debug-simulate-errors", default=False,
help="Debugging option that makes the operation"
" treat most runtime checks as failed")
NWSYNC_OPT = cli_option("--no-wait-for-sync", dest="wait_for_sync",
default=True, action="store_false",
help="Don't wait for sync (DANGEROUS!)")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -236,8 +236,7 @@ import_opts = [
type="identkeyval"),
cli_option("--no-nics", default=False, action="store_true",
help="Do not create any network cards for the instance"),
cli_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
action="store_false", help="Don't wait for sync (DANGEROUS!)"),
NWSYNC_OPT,
cli_option("--src-node", dest="src_node", help="Source node",
metavar="<node>",
completion_suggest=OPT_COMPL_ONE_NODE),
......
......@@ -1393,8 +1393,7 @@ add_opts = [
type="identkeyval"),
cli_option("--no-nics", default=False, action="store_true",
help="Do not create any network cards for the instance"),
cli_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
action="store_false", help="Don't wait for sync (DANGEROUS!)"),
NWSYNC_OPT,
cli_option("--no-start", dest="start", default=True,
action="store_false", help="Don't start the instance after"
" creation"),
......@@ -1642,12 +1641,7 @@ commands = {
'grow-disk': (GrowDisk,
[ArgInstance(min=1, max=1), ArgUnknown(min=1, max=1),
ArgUnknown(min=1, max=1)],
[DEBUG_OPT, SUBMIT_OPT,
cli_option("--no-wait-for-sync",
dest="wait_for_sync", default=True,
action="store_false",
help="Don't wait for sync (DANGEROUS!)"),
],
[DEBUG_OPT, SUBMIT_OPT, NWSYNC_OPT],
"<instance> <disk> <size>", "Grow an instance's disk"),
'list-tags': (ListTags, ARGS_ONE_INSTANCE, [DEBUG_OPT],
"<instance_name>", "List the tags of the given 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