s390x/info registers: print vector registers properly
[qemu/ar7.git] / qapi / introspect.json
blobcc50dc6bcb5044e69fd2132ec4c82136669d10df
1 # -*- Mode: Python -*-
3 # QAPI/QMP introspection
5 # Copyright (C) 2015 Red Hat, Inc.
7 # Authors:
8 #  Markus Armbruster <armbru@redhat.com>
10 # This work is licensed under the terms of the GNU GPL, version 2 or later.
11 # See the COPYING file in the top-level directory.
14 # @query-qmp-schema
16 # Command query-qmp-schema exposes the QMP wire ABI as an array of
17 # SchemaInfo.  This lets QMP clients figure out what commands and
18 # events are available in this QEMU, and their parameters and results.
20 # However, the SchemaInfo can't reflect all the rules and restrictions
21 # that apply to QMP.  It's interface introspection (figuring out
22 # what's there), not interface specification.  The specification is in
23 # the QAPI schema.
25 # Returns: array of @SchemaInfo, where each element describes an
26 # entity in the ABI: command, event, type, ...
28 # Note: the QAPI schema is also used to help define *internal*
29 # interfaces, by defining QAPI types.  These are not part of the QMP
30 # wire ABI, and therefore not returned by this command.
32 # Since: 2.5
34 { 'command': 'query-qmp-schema',
35   'returns': [ 'SchemaInfo' ],
36   'gen': false }                # just to simplify qmp_query_json()
39 # @SchemaMetaType
41 # This is a @SchemaInfo's meta type, i.e. the kind of entity it
42 # describes.
44 # @builtin: a predefined type such as 'int' or 'bool'.
46 # @enum: an enumeration type
48 # @array: an array type
50 # @object: an object type (struct or union)
52 # @alternate: an alternate type
54 # @command: a QMP command
56 # @event: a QMP event
58 # Since: 2.5
60 { 'enum': 'SchemaMetaType',
61   'data': [ 'builtin', 'enum', 'array', 'object', 'alternate',
62             'command', 'event' ] }
65 # @SchemaInfoBase
67 # Members common to any @SchemaInfo.
69 # Since: 2.5
71 { 'struct': 'SchemaInfoBase',
72   'data': { 'name': 'str', 'meta-type': 'SchemaMetaType' } }
75 # @SchemaInfo
77 # @name: the entity's name, inherited from @base.
78 #        Commands and events have the name defined in the QAPI schema.
79 #        Unlike command and event names, type names are not part of
80 #        the wire ABI.  Consequently, type names are meaningless
81 #        strings here.
83 # All references to other SchemaInfo are by name.
85 # @meta-type: the entity's meta type, inherited from @base.
87 # Additional members depend on the value of @meta-type.
89 # Since: 2.5
91 { 'union': 'SchemaInfo',
92   'base': 'SchemaInfoBase',
93   'discriminator': 'meta-type',
94   'data': {
95       'builtin': 'SchemaInfoBuiltin',
96       'enum': 'SchemaInfoEnum',
97       'array': 'SchemaInfoArray',
98       'object': 'SchemaInfoObject',
99       'alternate': 'SchemaInfoAlternate',
100       'command': 'SchemaInfoCommand',
101       'event': 'SchemaInfoEvent' } }
104 # @SchemaInfoBuiltin
106 # Additional SchemaInfo members for meta-type 'builtin'.
108 # @json-type: the JSON type used for this type on the wire.
110 # Since: 2.5
112 { 'struct': 'SchemaInfoBuiltin',
113   'data': { 'json-type': 'JSONType' } }
116 # @JSONType
118 # The four primitive and two structured types according to RFC 7159
119 # section 1, plus 'int' (split off 'number'), plus the obvious top
120 # type 'value'.
122 # Since: 2.5
124 { 'enum': 'JSONType',
125   'data': [ 'string', 'number', 'int', 'boolean', 'null',
126             'object', 'array', 'value' ] }
129 # @SchemaInfoEnum
131 # Additional SchemaInfo members for meta-type 'enum'.
133 # @values: the enumeration type's values.
135 # Values of this type are JSON string on the wire.
137 # Since: 2.5
139 { 'struct': 'SchemaInfoEnum',
140   'data': { 'values': ['str'] } }
143 # @SchemaInfoArray
145 # Additional SchemaInfo members for meta-type 'array'.
147 # @element-type: the array type's element type.
149 # Values of this type are JSON array on the wire.
151 # Since: 2.5
153 { 'struct': 'SchemaInfoArray',
154   'data': { 'element-type': 'str' } }
157 # @SchemaInfoObject
159 # Additional SchemaInfo members for meta-type 'object'.
161 # @members: the object type's (non-variant) members.
163 # @tag: #optional the name of the member serving as type tag.
164 #       An element of @members with this name must exist.
166 # @variants: #optional variant members, i.e. additional members that
167 #            depend on the type tag's value.  Present exactly when
168 #            @tag is present.
170 # Values of this type are JSON object on the wire.
172 # Since: 2.5
174 { 'struct': 'SchemaInfoObject',
175   'data': { 'members': [ 'SchemaInfoObjectMember' ],
176             '*tag': 'str',
177             '*variants': [ 'SchemaInfoObjectVariant' ] } }
180 # @SchemaInfoObjectMember
182 # An object member.
184 # @name: the member's name, as defined in the QAPI schema.
186 # @type: the name of the member's type.
188 # @default: #optional default when used as command parameter.
189 #           If absent, the parameter is mandatory.
190 #           If present, the value must be null.  The parameter is
191 #           optional, and behavior when it's missing is not specified
192 #           here.
193 #           Future extension: if present and non-null, the parameter
194 #           is optional, and defaults to this value.
196 # Since: 2.5
198 { 'struct': 'SchemaInfoObjectMember',
199   'data': { 'name': 'str', 'type': 'str', '*default': 'any' } }
200 # @default's type must be null or match @type
203 # @SchemaInfoObjectVariant
205 # The variant members for a value of the type tag.
207 # @case: a value of the type tag.
209 # @type: the name of the object type that provides the variant members
210 #        when the type tag has value @case.
212 # Since: 2.5
214 { 'struct': 'SchemaInfoObjectVariant',
215   'data': { 'case': 'str', 'type': 'str' } }
218 # @SchemaInfoAlternate
220 # Additional SchemaInfo members for meta-type 'alternate'.
222 # @members: the alternate type's members.
223 #           The members' wire encoding is distinct, see
224 #           docs/qapi-code-gen.txt section Alternate types.
226 # On the wire, this can be any of the members.
228 # Since: 2.5
230 { 'struct': 'SchemaInfoAlternate',
231   'data': { 'members': [ 'SchemaInfoAlternateMember' ] } }
234 # @SchemaInfoAlternateMember
236 # An alternate member.
238 # @type: the name of the member's type.
240 # Since: 2.5
242 { 'struct': 'SchemaInfoAlternateMember',
243   'data': { 'type': 'str' } }
246 # @SchemaInfoCommand
248 # Additional SchemaInfo members for meta-type 'command'.
250 # @arg-type: the name of the object type that provides the command's
251 #            parameters.
253 # @ret-type: the name of the command's result type.
255 # TODO @success-response (currently irrelevant, because it's QGA, not QMP)
257 # Since: 2.5
259 { 'struct': 'SchemaInfoCommand',
260   'data': { 'arg-type': 'str', 'ret-type': 'str' } }
263 # @SchemaInfoEvent
265 # Additional SchemaInfo members for meta-type 'event'.
267 # @arg-type: the name of the object type that provides the event's
268 #            parameters.
270 # Since: 2.5
272 { 'struct': 'SchemaInfoEvent',
273   'data': { 'arg-type': 'str' } }