1554a8fae9
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>
16 lines
532 B
JSON
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' ] }
|