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 three options: on, off, and auto
139 # @auto: QEMU selects the value between on and off
147 { 'enum': 'OnOffAuto',
148 'data': [ 'auto', 'on', 'off' ] }
153 # An enumeration of three values: on, off, and split
163 { 'enum': 'OnOffSplit',
164 'data': [ 'on', 'off', 'split' ] }