Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / qapi / control.json
blob6bdbf077c2eecdfcdca9ee78e2b735b5f524775f
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = QMP monitor control
7 ##
9 ##
10 # @qmp_capabilities:
12 # Enable QMP capabilities.
14 # @enable: An optional list of QMPCapability values to enable.  The
15 #     client must not enable any capability that is not mentioned in
16 #     the QMP greeting message.  If the field is not provided, it
17 #     means no QMP capabilities will be enabled.  (since 2.12)
19 # Example:
21 #     -> { "execute": "qmp_capabilities",
22 #          "arguments": { "enable": [ "oob" ] } }
23 #     <- { "return": {} }
25 # Notes: This command is valid exactly when first connecting: it must
26 #     be issued before any other command will be accepted, and will
27 #     fail once the monitor is accepting other commands.  (see qemu
28 #     docs/interop/qmp-spec.rst)
30 #     The QMP client needs to explicitly enable QMP capabilities,
31 #     otherwise all the QMP capabilities will be turned off by
32 #     default.
34 # Since: 0.13
36 { 'command': 'qmp_capabilities',
37   'data': { '*enable': [ 'QMPCapability' ] },
38   'allow-preconfig': true }
41 # @QMPCapability:
43 # Enumeration of capabilities to be advertised during initial client
44 # connection, used for agreeing on particular QMP extension behaviors.
46 # @oob: QMP ability to support out-of-band requests.  (Please refer to
47 #     qmp-spec.rst for more information on OOB)
49 # Since: 2.12
51 { 'enum': 'QMPCapability',
52   'data': [ 'oob' ] }
55 # @VersionTriple:
57 # A three-part version number.
59 # @major: The major version number.
61 # @minor: The minor version number.
63 # @micro: The micro version number.
65 # Since: 2.4
67 { 'struct': 'VersionTriple',
68   'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
71 # @VersionInfo:
73 # A description of QEMU's version.
75 # @qemu: The version of QEMU.  By current convention, a micro version
76 #     of 50 signifies a development branch.  A micro version greater
77 #     than or equal to 90 signifies a release candidate for the next
78 #     minor version.  A micro version of less than 50 signifies a
79 #     stable release.
81 # @package: QEMU will always set this field to an empty string.
82 #     Downstream versions of QEMU should set this to a non-empty
83 #     string.  The exact format depends on the downstream however it
84 #     highly recommended that a unique name is used.
86 # Since: 0.14
88 { 'struct': 'VersionInfo',
89   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
92 # @query-version:
94 # Returns the current version of QEMU.
96 # Returns: A @VersionInfo object describing the current version of
97 #     QEMU.
99 # Since: 0.14
101 # Example:
103 #     -> { "execute": "query-version" }
104 #     <- {
105 #           "return":{
106 #              "qemu":{
107 #                 "major":0,
108 #                 "minor":11,
109 #                 "micro":5
110 #              },
111 #              "package":""
112 #           }
113 #        }
115 { 'command': 'query-version', 'returns': 'VersionInfo',
116   'allow-preconfig': true }
119 # @CommandInfo:
121 # Information about a QMP command
123 # @name: The command name
125 # Since: 0.14
127 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
130 # @query-commands:
132 # Return a list of supported QMP commands by this server
134 # Returns: A list of @CommandInfo for all supported commands
136 # Since: 0.14
138 # Example:
140 #     -> { "execute": "query-commands" }
141 #     <- {
142 #          "return":[
143 #             {
144 #                "name":"query-balloon"
145 #             },
146 #             {
147 #                "name":"system_powerdown"
148 #             }
149 #          ]
150 #        }
152 # Note: This example has been shortened as the real response is too
153 #     long.
155 { 'command': 'query-commands', 'returns': ['CommandInfo'],
156   'allow-preconfig': true }
159 # @quit:
161 # This command will cause the QEMU process to exit gracefully.  While
162 # every attempt is made to send the QMP response before terminating,
163 # this is not guaranteed.  When using this interface, a premature EOF
164 # would not be unexpected.
166 # Since: 0.14
168 # Example:
170 #     -> { "execute": "quit" }
171 #     <- { "return": {} }
173 { 'command': 'quit',
174   'allow-preconfig': true }
177 # @MonitorMode:
179 # An enumeration of monitor modes.
181 # @readline: HMP monitor (human-oriented command line interface)
183 # @control: QMP monitor (JSON-based machine interface)
185 # Since: 5.0
187 { 'enum': 'MonitorMode', 'data': [ 'readline', 'control' ] }
190 # @MonitorOptions:
192 # Options to be used for adding a new monitor.
194 # @id: Name of the monitor
196 # @mode: Selects the monitor mode (default: readline in the system
197 #     emulator, control in qemu-storage-daemon)
199 # @pretty: Enables pretty printing (QMP only)
201 # @chardev: Name of a character device to expose the monitor on
203 # Since: 5.0
205 { 'struct': 'MonitorOptions',
206   'data': {
207       '*id': 'str',
208       '*mode': 'MonitorMode',
209       '*pretty': 'bool',
210       'chardev': 'str'
211   } }