aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorDominik Csapak <d.csapak@proxmox.com>2018-12-05 12:01:30 +0100
committerMarkus Armbruster <armbru@redhat.com>2018-12-18 07:55:47 +0100
commitecd7a0d5bbfbbb6922dfe4049227256d1eafa3b8 (patch)
tree034f9355026fa6eeb7400ea6e7af22faaef47d98 /qapi
parentd43013e24de2f101f2d878823d78e2c1f8e2d6ed (diff)
downloadqemu-ecd7a0d5bbfbbb6922dfe4049227256d1eafa3b8.zip
qemu-ecd7a0d5bbfbbb6922dfe4049227256d1eafa3b8.tar.gz
qemu-ecd7a0d5bbfbbb6922dfe4049227256d1eafa3b8.tar.bz2
qmp: Add reason to SHUTDOWN and RESET events
This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do. This patch also updates the iotests to the new expected output that includes the reason. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Message-Id: <20181205110131.23049-3-d.csapak@proxmox.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/run-state.json8
1 files changed, 6 insertions, 2 deletions
diff --git a/qapi/run-state.json b/qapi/run-state.json
index de7725b..436ba4e 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -141,6 +141,8 @@
# a guest-initiated ACPI shutdown request or other hardware-specific action)
# rather than a host request (such as sending qemu a SIGINT). (since 2.10)
#
+# @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0)
+#
# Note: If the command-line option "-no-shutdown" has been specified, qemu will
# not exit, and a STOP event will eventually follow the SHUTDOWN event
#
@@ -152,7 +154,7 @@
# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
#
##
-{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
+{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
##
# @POWERDOWN:
@@ -180,6 +182,8 @@
# rather than a host request (such as the QMP command system_reset).
# (since 2.10)
#
+# @reason: The @ShutdownCause of the RESET. (since 4.0)
+#
# Since: 0.12.0
#
# Example:
@@ -188,7 +192,7 @@
# "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
#
##
-{ 'event': 'RESET', 'data': { 'guest': 'bool' } }
+{ 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
##
# @STOP: