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 # @DeviceEncrypted: the requested operation can't be fulfilled because the
18 # selected device is encrypted
20 # @DeviceNotActive: a device has failed to be become active
22 # @DeviceNotFound: the requested device has not been found
24 # @KVMMissingCap: the requested operation can't be fulfilled because a
25 # required KVM capability is missing
29 { 'enum': 'QapiErrorClass',
30 # Keep this in sync with ErrorClass in error.h
31 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
32 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
37 # A three-part version number.
39 # @major: The major version number.
41 # @minor: The minor version number.
43 # @micro: The micro version number.
47 { 'struct': 'VersionTriple',
48 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
54 # A description of QEMU's version.
56 # @qemu: The version of QEMU. By current convention, a micro
57 # version of 50 signifies a development branch. A micro version
58 # greater than or equal to 90 signifies a release candidate for
59 # the next minor version. A micro version of less than 50
60 # signifies a stable release.
62 # @package: QEMU will always set this field to an empty string. Downstream
63 # versions of QEMU should set this to a non-empty string. The
64 # exact format depends on the downstream however it highly
65 # recommended that a unique name is used.
69 { 'struct': 'VersionInfo',
70 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
75 # Returns the current version of QEMU.
77 # Returns: A @VersionInfo object describing the current version of QEMU.
83 # -> { "execute": "query-version" }
96 { 'command': 'query-version', 'returns': 'VersionInfo' }
101 # Information about a QMP command
103 # @name: The command name
107 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
112 # Return a list of supported QMP commands by this server
114 # Returns: A list of @CommandInfo for all supported commands
120 # -> { "execute": "query-commands" }
124 # "name":"query-balloon"
127 # "name":"system_powerdown"
132 # Note: This example has been shortened as the real response is too long.
135 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
140 # An enumeration of three options: on, off, and auto
142 # @auto: QEMU selects the value between on and off
150 { 'enum': 'OnOffAuto',
151 'data': [ 'auto', 'on', 'off' ] }
156 # An enumeration of three values: on, off, and split
166 { 'enum': 'OnOffSplit',
167 'data': [ 'on', 'off', 'split' ] }