diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-21 17:16:47 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-27 11:48:47 -0200 |
commit | b202381800d81fbff9978abbdea95760dd363bb6 (patch) | |
tree | 572a252464539e052b1fca18e61779dc3788bac7 /qapi-schema.json | |
parent | 58e21ef5ab262fb91256435c31cc7bfeead59754 (diff) |
qapi: Convert query-block
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r-- | qapi-schema.json | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json index a1bf90deea..5e3570e53d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -352,6 +352,91 @@ { 'command': 'query-cpus', 'returns': ['CpuInfo'] } ## +# @BlockDeviceInfo: +# +# Information about the backing device for a block device. +# +# @file: the filename of the backing device +# +# @ro: true if the backing device was open read-only +# +# @drv: the name of the block format used to open the backing device. As of +# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', +# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', +# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', +# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' +# +# @backing_file: #optional the name of the backing file (for copy-on-write) +# +# @encrypted: true if the backing device is encrypted +# +# Since: 0.14.0 +# +# Notes: This interface is only found in @BlockInfo. +## +{ 'type': 'BlockDeviceInfo', + 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', + '*backing_file': 'str', 'encrypted': 'bool' } } + +## +# @BlockDeviceIoStatus: +# +# An enumeration of block device I/O status. +# +# @ok: The last I/O operation has succeeded +# +# @failed: The last I/O operation has failed +# +# @nospace: The last I/O operation has failed due to a no-space condition +# +# Since: 1.0 +## +{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } + +## +# @BlockInfo: +# +# Block device information. This structure describes a virtual device and +# the backing device associated with it. +# +# @device: The device name associated with the virtual device. +# +# @type: This field is returned only for compatibility reasons, it should +# not be used (always returns 'unknown') +# +# @removable: True if the device supports removable media. +# +# @locked: True if the guest has locked this device from having its media +# removed +# +# @tray_open: #optional True if the device has a tray and it is open +# (only present if removable is true) +# +# @io-status: #optional @BlockDeviceIoStatus. Only present if the device +# supports it and the VM is configured to stop on errors +# +# @inserted: #optional @BlockDeviceInfo describing the device if media is +# present +# +# Since: 0.14.0 +## +{ 'type': 'BlockInfo', + 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', + 'locked': 'bool', '*inserted': 'BlockDeviceInfo', + '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} } + +## +# @query-block: +# +# Get a list of BlockInfo for all virtual block devices. +# +# Returns: a list of @BlockInfo describing each virtual block device +# +# Since: 0.14.0 +## +{ 'command': 'query-block', 'returns': ['BlockInfo'] } + +## # @quit: # # This command will cause the QEMU process to exit gracefully. While every |