Commit d48031a1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a new CONFIRM_OPT option to cli.py



Today we are not very consistent as to what ‘--force’ represents:
sometimes confirmation, sometimes forcing a possible dangerous option,
etc.

This patch adds a new ‘--yes’ option that should be used for all simple
confirmations of genre “yes, I really want to remove the instance”.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 17c61836
......@@ -51,7 +51,7 @@ __all__ = ["DEBUG_OPT", "NOHDR_OPT", "SEP_OPT", "GenericMain",
"FormatError", "SplitNodeOption", "SubmitOrSend",
"JobSubmittedException", "FormatTimestamp", "ParseTimespec",
"ToStderr", "ToStdout", "UsesRPC",
"GetOnlineNodes", "JobExecutor", "SYNC_OPT",
"GetOnlineNodes", "JobExecutor", "SYNC_OPT", "CONFIRM_OPT",
]
......@@ -182,6 +182,9 @@ FIELDS_OPT = make_option("-o", "--output", dest="output", action="store",
FORCE_OPT = make_option("-f", "--force", dest="force", action="store_true",
default=False, help="Force the operation")
CONFIRM_OPT = make_option("--yes", dest="confirm", action="store_true",
default=False, help="Do not require confirmation")
TAG_SRC_OPT = make_option("--from", dest="tags_source",
default=None, help="File with tag names")
......
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