aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-06-23 15:57:27 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-01-16 09:19:48 +0100
commit01b7d4be5c5408365487851f3b8b1e6f10dfaa4b (patch)
tree87c52d5dd56a6eda169b4af2ba74c32c084036c2
parent11a3dee1b965ac38baf319e8b00db79a889a0200 (diff)
qmp-events: move 'DEVICE_TRAY_MOVED' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--docs/qmp-events.txt22
-rw-r--r--qapi/block.json10
2 files changed, 10 insertions, 22 deletions
diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt
index 71882a6c92..7cae0aa899 100644
--- a/docs/qmp-events.txt
+++ b/docs/qmp-events.txt
@@ -48,28 +48,6 @@ Data:
"path": "/machine/peripheral/virtio-net-pci-0" },
"timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
-DEVICE_TRAY_MOVED
------------------
-
-It's emitted whenever the tray of a removable device is moved by the guest
-or by HMP/QMP commands.
-
-Data:
-
-- "device": Block device name. This is always present for compatibility
- reasons, but it can be empty ("") if the image does not have a
- device name associated. (json-string)
-- "id": The name or QOM path of the guest device (json-string)
-- "tray-open": true if the tray has been opened or false if it has been closed
- (json-bool)
-
-{ "event": "DEVICE_TRAY_MOVED",
- "data": { "device": "ide1-cd0",
- "id": "/machine/unattached/device[22]",
- "tray-open": true
- },
- "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
-
DUMP_COMPLETED
--------------
diff --git a/qapi/block.json b/qapi/block.json
index 6f57d703f7..22da91441b 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -248,6 +248,16 @@
# @tray-open: true if the tray has been opened or false if it has been closed
#
# Since: 1.1
+#
+# Example:
+#
+# <- { "event": "DEVICE_TRAY_MOVED",
+# "data": { "device": "ide1-cd0",
+# "id": "/machine/unattached/device[22]",
+# "tray-open": true
+# },
+# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
+#
##
{ 'event': 'DEVICE_TRAY_MOVED',
'data': { 'device': 'str', 'id': 'str', 'tray-open': 'bool' } }