qmp-commands: move 'blockdev-open-tray' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
915a213f7a
commit
1133b1d674
@ -343,48 +343,6 @@ named schema entities. Entities are commands, events and various
|
|||||||
types. See docs/qapi-code-gen.txt for information on their structure
|
types. See docs/qapi-code-gen.txt for information on their structure
|
||||||
and intended use.
|
and intended use.
|
||||||
|
|
||||||
blockdev-open-tray
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Opens a block device's tray. If there is a block driver state tree inserted as a
|
|
||||||
medium, it will become inaccessible to the guest (but it will remain associated
|
|
||||||
to the block device, so closing the tray will make it accessible again).
|
|
||||||
|
|
||||||
If the tray was already open before, this will be a no-op.
|
|
||||||
|
|
||||||
Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
|
|
||||||
which no such event will be generated, these include:
|
|
||||||
- if the guest has locked the tray, @force is false and the guest does not
|
|
||||||
respond to the eject request
|
|
||||||
- if the BlockBackend denoted by @device does not have a guest device attached
|
|
||||||
to it
|
|
||||||
- if the guest device does not have an actual tray and is empty, for instance
|
|
||||||
for floppy disk drives
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
- "device": block device name (deprecated, use @id instead)
|
|
||||||
(json-string, optional)
|
|
||||||
- "id": the name or QOM path of the guest device (json-string, optional)
|
|
||||||
- "force": if false (the default), an eject request will be sent to the guest if
|
|
||||||
it has locked the tray (and the tray will not be opened immediately);
|
|
||||||
if true, the tray will be opened regardless of whether it is locked
|
|
||||||
(json-bool, optional)
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
-> { "execute": "blockdev-open-tray",
|
|
||||||
"arguments": { "id": "ide0-1-0" } }
|
|
||||||
|
|
||||||
<- { "timestamp": { "seconds": 1418751016,
|
|
||||||
"microseconds": 716996 },
|
|
||||||
"event": "DEVICE_TRAY_MOVED",
|
|
||||||
"data": { "device": "ide1-cd0",
|
|
||||||
"id": "ide0-1-0",
|
|
||||||
"tray-open": true } }
|
|
||||||
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
blockdev-close-tray
|
blockdev-close-tray
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
@ -2939,6 +2939,21 @@
|
|||||||
# it is locked
|
# it is locked
|
||||||
#
|
#
|
||||||
# Since: 2.5
|
# Since: 2.5
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# -> { "execute": "blockdev-open-tray",
|
||||||
|
# "arguments": { "id": "ide0-1-0" } }
|
||||||
|
#
|
||||||
|
# <- { "timestamp": { "seconds": 1418751016,
|
||||||
|
# "microseconds": 716996 },
|
||||||
|
# "event": "DEVICE_TRAY_MOVED",
|
||||||
|
# "data": { "device": "ide1-cd0",
|
||||||
|
# "id": "ide0-1-0",
|
||||||
|
# "tray-open": true } }
|
||||||
|
#
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
##
|
##
|
||||||
{ 'command': 'blockdev-open-tray',
|
{ 'command': 'blockdev-open-tray',
|
||||||
'data': { '*device': 'str',
|
'data': { '*device': 'str',
|
||||||
|
Loading…
Reference in New Issue
Block a user