qemu-patch-raspberry4/tests/qapi-schema/returns-whitelist.json
Markus Armbruster 1554a8fae9 qapi: Have each QAPI schema declare its returns white-list
qapi.py has a hardcoded white-list of command names that may violate
the rules on permitted return types.  Add a new pragma directive
'returns-whitelist', and use it to replace the hard-coded white-list.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1489582656-31133-6-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2017-03-16 07:13:02 +01:00

16 lines
532 B
JSON

# we enforce that 'returns' be a dict or array of dict unless whitelisted
{ 'pragma': { 'returns-whitelist': [
'human-monitor-command', 'query-tpm-models', 'guest-get-time' ] } }
{ 'command': 'human-monitor-command',
'data': {'command-line': 'str', '*cpu-index': 'int'},
'returns': 'str' }
{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
{ 'command': 'guest-get-time',
'returns': 'int' }
{ 'command': 'no-way-this-will-get-whitelisted',
'returns': [ 'int' ] }