summaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-04 09:05:19 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-05 18:39:01 +0200
commitd708cdbe8792a55f53e90c1c787e871d527e8d4b (patch)
tree9728fa21413b9a9ec3360db47593e920d2aa6bec /qapi-schema.json
parente53188ada516c814a729551be2448684d6d8ce08 (diff)
downloadqemu-d708cdbe8792a55f53e90c1c787e871d527e8d4b.tar.gz
qemu-d708cdbe8792a55f53e90c1c787e871d527e8d4b.tar.bz2
qemu-d708cdbe8792a55f53e90c1c787e871d527e8d4b.zip
qapi: Unify type bypass and add tests
For a few QMP commands, we are forced to pass an arbitrary type without tracking it properly in QAPI. Among the existing clients, this unnamed type was spelled 'dict', 'visitor', and '**'; this patch standardizes on '**', matching the documentation changes earlier in the series. Meanwhile, for the 'gen' key, we have been ignoring the value, although the schema consistently used "'no'" ('success-response' was hard-coded to checking for 'no'). But now that we can support a literal "false" in the schema, we might as well use that rather than ignoring the value or special-casing a random string. Note that these are one-way switches (use of 'gen':true is not the same as omitting 'gen'). Also, the use of '**' requires 'gen':false, but the use of 'gen':false does not mandate the use of '**'. There is no difference to the generated code. Add some tests on what we'd like to guarantee, although it will take later patches to clean up test results and actually enforce the use of a bool parameter. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json14
1 files changed, 7 insertions, 7 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index ac9594d66d..7f4cf86ee5 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1561,8 +1561,8 @@
##
{ 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' },
- 'returns': 'visitor',
- 'gen': 'no' }
+ 'returns': '**',
+ 'gen': false }
##
# @qom-set:
@@ -1579,8 +1579,8 @@
# Since: 1.2
##
{ 'command': 'qom-set',
- 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
- 'gen': 'no' }
+ 'data': { 'path': 'str', 'property': 'str', 'value': '**' },
+ 'gen': false }
##
# @set_password:
@@ -1943,7 +1943,7 @@
##
{ 'command': 'netdev_add',
'data': {'type': 'str', 'id': 'str', '*props': '**'},
- 'gen': 'no' }
+ 'gen': false }
##
# @netdev_del:
@@ -1976,8 +1976,8 @@
# Since: 2.0
##
{ 'command': 'object-add',
- 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
- 'gen': 'no' }
+ 'data': {'qom-type': 'str', 'id': 'str', '*props': '**'},
+ 'gen': false }
##
# @object-del: