Skip to content
Snippets Groups Projects
Commit 38f29a36 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

cli: Add common command flags for hv/disk state


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 784cd737
No related branches found
No related tags found
No related merge requests found
......@@ -185,6 +185,8 @@ __all__ = [
"VERBOSE_OPT",
"VG_NAME_OPT",
"YES_DOIT_OPT",
"DISK_STATE_OPT",
"HV_STATE_OPT",
# Generic functions for CLI programs
"ConfirmOperation",
"GenericMain",
......@@ -1293,6 +1295,18 @@ IGNORE_ERRORS_OPT = cli_option("-I", "--ignore-errors", default=[],
choices=list(constants.CV_ALL_ECODES_STRINGS),
help="Error code to be ignored")
DISK_STATE_OPT = cli_option("--disk-state", default=[], dest="disk_state",
action="append",
help=("Specify disk state information in the format"
" storage_type/identifier:option=value,..."),
type="identkeyval")
HV_STATE_OPT = cli_option("--hypervisor-state", default=[], dest="hv_state",
action="append",
help=("Specify hypervisor state information in the"
" format hypervisor:option=value,..."),
type="identkeyval")
#: Options provided by all commands
COMMON_OPTS = [DEBUG_OPT]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment