kvm: get more accurate info from qmp, if possible
[ganeti-local] / lib / cli.py
index cde9991..5cceb7b 100644 (file)
@@ -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]