# -*- Mode: Python -*-
#
-# QAPI/QMP introspection
-#
# Copyright (C) 2015 Red Hat, Inc.
#
# Authors:
# See the COPYING file in the top-level directory.
##
-# @query-qmp-schema
+# = QMP introspection
+##
+
+##
+# @query-qmp-schema:
#
# Command query-qmp-schema exposes the QMP wire ABI as an array of
# SchemaInfo. This lets QMP clients figure out what commands and
'gen': false } # just to simplify qmp_query_json()
##
-# @SchemaMetaType
+# @SchemaMetaType:
#
# This is a @SchemaInfo's meta type, i.e. the kind of entity it
# describes.
'command', 'event' ] }
##
-# @SchemaInfo
+# @SchemaInfo:
#
# @name: the entity's name, inherited from @base.
+# The SchemaInfo is always referenced by this name.
# Commands and events have the name defined in the QAPI schema.
# Unlike command and event names, type names are not part of
# the wire ABI. Consequently, type names are meaningless
# strings here, although they are still guaranteed unique
# regardless of @meta-type.
#
-# All references to other SchemaInfo are by name.
-#
# @meta-type: the entity's meta type, inherited from @base.
#
# Additional members depend on the value of @meta-type.
'event': 'SchemaInfoEvent' } }
##
-# @SchemaInfoBuiltin
+# @SchemaInfoBuiltin:
#
# Additional SchemaInfo members for meta-type 'builtin'.
#
'data': { 'json-type': 'JSONType' } }
##
-# @JSONType
+# @JSONType:
#
-# The four primitive and two structured types according to RFC 7159
+# The four primitive and two structured types according to RFC 8259
# section 1, plus 'int' (split off 'number'), plus the obvious top
# type 'value'.
#
'object', 'array', 'value' ] }
##
-# @SchemaInfoEnum
+# @SchemaInfoEnum:
#
# Additional SchemaInfo members for meta-type 'enum'.
#
'data': { 'values': ['str'] } }
##
-# @SchemaInfoArray
+# @SchemaInfoArray:
#
# Additional SchemaInfo members for meta-type 'array'.
#
'data': { 'element-type': 'str' } }
##
-# @SchemaInfoObject
+# @SchemaInfoObject:
#
# Additional SchemaInfo members for meta-type 'object'.
#
# @members: the object type's (non-variant) members, in no particular order.
#
-# @tag: #optional the name of the member serving as type tag.
+# @tag: the name of the member serving as type tag.
# An element of @members with this name must exist.
#
-# @variants: #optional variant members, i.e. additional members that
+# @variants: variant members, i.e. additional members that
# depend on the type tag's value. Present exactly when
# @tag is present. The variants are in no particular order,
# and may even differ from the order of the values of the
# enum type of the @tag.
#
+# @features: names of features associated with the type, in no particular
+# order. (since: 4.1)
+#
# Values of this type are JSON object on the wire.
#
# Since: 2.5
{ 'struct': 'SchemaInfoObject',
'data': { 'members': [ 'SchemaInfoObjectMember' ],
'*tag': 'str',
- '*variants': [ 'SchemaInfoObjectVariant' ] } }
+ '*variants': [ 'SchemaInfoObjectVariant' ],
+ '*features': [ 'str' ] } }
##
-# @SchemaInfoObjectMember
+# @SchemaInfoObjectMember:
#
# An object member.
#
#
# @type: the name of the member's type.
#
-# @default: #optional default when used as command parameter.
+# @default: default when used as command parameter.
# If absent, the parameter is mandatory.
# If present, the value must be null. The parameter is
# optional, and behavior when it's missing is not specified
# @default's type must be null or match @type
##
-# @SchemaInfoObjectVariant
+# @SchemaInfoObjectVariant:
#
# The variant members for a value of the type tag.
#
'data': { 'case': 'str', 'type': 'str' } }
##
-# @SchemaInfoAlternate
+# @SchemaInfoAlternate:
#
# Additional SchemaInfo members for meta-type 'alternate'.
#
# @members: the alternate type's members, in no particular order.
# The members' wire encoding is distinct, see
-# docs/qapi-code-gen.txt section Alternate types.
+# docs/devel/qapi-code-gen.txt section Alternate types.
#
# On the wire, this can be any of the members.
#
'data': { 'members': [ 'SchemaInfoAlternateMember' ] } }
##
-# @SchemaInfoAlternateMember
+# @SchemaInfoAlternateMember:
#
# An alternate member.
#
'data': { 'type': 'str' } }
##
-# @SchemaInfoCommand
+# @SchemaInfoCommand:
#
# Additional SchemaInfo members for meta-type 'command'.
#
#
# @ret-type: the name of the command's result type.
#
-# TODO @success-response (currently irrelevant, because it's QGA, not QMP)
+# @allow-oob: whether the command allows out-of-band execution,
+# defaults to false (Since: 2.12)
+#
+# TODO: @success-response (currently irrelevant, because it's QGA, not QMP)
#
# Since: 2.5
##
{ 'struct': 'SchemaInfoCommand',
- 'data': { 'arg-type': 'str', 'ret-type': 'str' } }
+ 'data': { 'arg-type': 'str', 'ret-type': 'str',
+ '*allow-oob': 'bool' } }
##
-# @SchemaInfoEvent
+# @SchemaInfoEvent:
#
# Additional SchemaInfo members for meta-type 'event'.
#