4 # = QAPI common definitions
12 # @GenericError: this is used for errors that don't require a specific error
13 # class. This should be the default case for most errors
15 # @CommandNotFound: the requested command has not been found
17 # @DeviceNotActive: a device has failed to be become active
19 # @DeviceNotFound: the requested device has not been found
21 # @KVMMissingCap: the requested operation can't be fulfilled because a
22 # required KVM capability is missing
26 { 'enum': 'QapiErrorClass',
27 # Keep this in sync with ErrorClass in error.h
28 'data': [ 'GenericError', 'CommandNotFound',
29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
34 # A three-part version number.
36 # @major: The major version number.
38 # @minor: The minor version number.
40 # @micro: The micro version number.
44 { 'struct': 'VersionTriple',
45 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
51 # A description of QEMU's version.
53 # @qemu: The version of QEMU. By current convention, a micro
54 # version of 50 signifies a development branch. A micro version
55 # greater than or equal to 90 signifies a release candidate for
56 # the next minor version. A micro version of less than 50
57 # signifies a stable release.
59 # @package: QEMU will always set this field to an empty string. Downstream
60 # versions of QEMU should set this to a non-empty string. The
61 # exact format depends on the downstream however it highly
62 # recommended that a unique name is used.
66 { 'struct': 'VersionInfo',
67 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
72 # Returns the current version of QEMU.
74 # Returns: A @VersionInfo object describing the current version of QEMU.
80 # -> { "execute": "query-version" }
93 { 'command': 'query-version', 'returns': 'VersionInfo' }
98 # Information about a QMP command
100 # @name: The command name
104 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
109 # Return a list of supported QMP commands by this server
111 # Returns: A list of @CommandInfo for all supported commands
117 # -> { "execute": "query-commands" }
121 # "name":"query-balloon"
124 # "name":"system_powerdown"
129 # Note: This example has been shortened as the real response is too long.
132 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
137 # An enumeration of the I/O operation types
139 # @read: read operation
141 # @write: write operation
145 { 'enum': 'IoOperationType',
146 'data': [ 'read', 'write' ] }
151 # An enumeration of three options: on, off, and auto
153 # @auto: QEMU selects the value between on and off
161 { 'enum': 'OnOffAuto',
162 'data': [ 'auto', 'on', 'off' ] }
167 # An enumeration of three values: on, off, and split
177 { 'enum': 'OnOffSplit',
178 'data': [ 'on', 'off', 'split' ] }
183 # A fat type wrapping 'str', to be embedded in lists.
187 { 'struct': 'String',
194 # This is a string value or the explicit lack of a string (null
195 # pointer in C). Intended for cases when 'optional absent' already
196 # has a different meaning.
198 # @s: the string value
199 # @n: no string value
203 { 'alternate': 'StrOrNull',
204 'data': { 's': 'str',