[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specifi
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add |
Date: |
Wed, 1 Jul 2015 22:22:30 +0200 |
It doesn't take a 'props' argument, let alone one in the format
"NAME=VALUE,..."
The bogus arguments specification doesn't matter due to 'gen': false.
Clean it up to be incomplete rather than wrong, and document the
incompleteness.
Signed-off-by: Markus Armbruster <address@hidden>
---
docs/qapi-code-gen.txt | 2 +-
qapi-schema.json | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index bf9e854..2367c66 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -466,7 +466,7 @@ try to avoid adding new commands that rely on this, and
instead use
type-safe unions. For an example of bypass usage:
{ 'command': 'netdev_add',
- 'data': {'type': 'str', 'id': 'str', '*props': '**'},
+ 'data': {'type': 'str', 'id': 'str'},
'gen': false }
Normally, the QAPI schema is used to describe synchronous exchanges,
diff --git a/qapi-schema.json b/qapi-schema.json
index 815689a..e246acb 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2062,11 +2062,12 @@
#
# @id: the name of the new network backend
#
-# @props: #optional a list of properties to be passed to the backend in
-# the format 'name=value', like 'ifname=tap0,script=no'
+# Additional arguments depend on the type.
#
-# Notes: The semantics of @props is not well defined. Future commands will be
-# introduced that provide stronger typing for backend creation.
+# TODO This command effectively bypasses QAPI completely due to its
+# "additional arguments" business. It shouldn't have been added to
+# the schema in this form. It should be qapified properly, or
+# replaced by a properly qapified command.
#
# Since: 0.14.0
#
@@ -2074,8 +2075,8 @@
# If @type is not a valid network backend, DeviceNotFound
##
{ 'command': 'netdev_add',
- 'data': {'type': 'str', 'id': 'str', '*props': '**'},
- 'gen': false }
+ 'data': {'type': 'str', 'id': 'str'},
+ 'gen': false } # so we can get the additional arguments
##
# @netdev_del:
--
1.9.3
- Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation, (continued)
- [Qemu-devel] [PATCH RFC v2 38/47] qapi-commands: De-duplicate output marshaling functions, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 43/47] qmp: Improve netdev_add usage example in the manual, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add,
Markus Armbruster <=
- [Qemu-devel] [PATCH RFC v2 46/47] qapi-introspect: Map all integer types to 'int', Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 39/47] qapi: Improve built-in type documentation, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 21/47] qapi: New QAPISchema intermediate reperesentation, Markus Armbruster, 2015/07/01