Eric Blake
c818408e44
qapi: Implement boxed types for commands/events
...
Turn on the ability to pass command and event arguments in
a single boxed parameter, which must name a non-empty type
(although the type can be a struct with all optional members).
For structs, it makes it possible to pass a single qapi type
instead of a breakout of all struct members (useful if the
arguments are already in a struct or if the number of members
is large); for other complex types, it is now possible to use
a union or alternate as the data for a command or event.
The empty type may be technically feasible if needed down the
road, but it's easier to forbid it now and relax things to allow
it later, than it is to allow it now and have to special case
how the generated 'q_empty' type is handled (see commit 7ce106a9
for reasons why nothing is generated for the empty type). An
alternate type is never considered empty, but now that a boxed
type can be either an object or an alternate, we have to provide
a trivial QAPISchemaAlternateType.is_empty(). The new call to
arg_type.is_empty() during QAPISchemaCommand.check() requires
that we first check the type in question; but there is no chance
of introducing a cycle since objects do not refer back to commands.
We still have a split in syntax checking between ad-hoc parsing
up front (merely validates that 'boxed' has a sane value) and
during .check() methods (if 'boxed' is set, then 'data' must name
a non-empty user-defined type).
Generated code is unchanged, as long as no client uses the
new feature.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1468468228-27827-10-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Test files renamed to *-boxed-*]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-07-19 13:21:08 +02:00
..
2014-05-08 14:19:58 -04:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:00 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-21 09:56:49 +02:00
2015-09-21 09:56:49 +02:00
2015-09-21 09:56:49 +02:00
2015-09-21 09:56:49 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2016-07-19 13:21:08 +02:00
2015-09-04 15:47:15 +02:00
2016-07-19 13:21:08 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-09-04 15:47:15 +02:00
2015-05-05 18:39:01 +02:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2016-03-18 10:29:25 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-10-12 18:44:54 +02:00
2014-03-11 09:07:41 -04:00
2015-10-12 18:44:54 +02:00
2014-03-11 09:07:41 -04:00
2016-03-18 10:29:25 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-09-15 10:59:28 +01:00
2015-09-15 10:59:28 +01:00
2015-09-15 10:59:28 +01:00
2015-09-15 10:59:28 +01:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:00 +02:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2016-07-19 13:21:08 +02:00
2015-05-05 18:39:02 +02:00
2014-06-23 11:01:25 -04:00
2014-06-23 11:01:25 -04:00
2014-06-23 11:01:25 -04:00
2015-06-18 14:19:47 +02:00
2015-06-18 14:19:47 +02:00
2015-06-18 14:19:47 +02:00
2015-06-18 14:19:47 +02:00
2016-03-18 10:29:26 +01:00
2015-05-05 18:39:00 +02:00
2016-03-18 10:29:26 +01:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:46:49 +02:00
2015-09-21 09:56:49 +02:00
2015-09-21 09:56:49 +02:00
2015-09-21 09:56:49 +02:00
2015-10-12 18:46:49 +02:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:00 +02:00
2015-12-17 08:21:29 +01:00
2015-10-12 18:44:54 +02:00
2015-10-12 18:44:54 +02:00
2015-10-12 18:44:54 +02:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2015-10-12 18:46:49 +02:00
2015-05-05 18:39:00 +02:00
2015-10-12 18:46:49 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2014-05-08 14:19:58 -04:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:41 -04:00
2015-10-12 18:46:49 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2014-05-08 14:19:58 -04:00
2014-03-11 09:07:42 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:42 -04:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2016-07-19 13:21:08 +02:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2015-06-18 14:12:34 +02:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2015-06-18 14:12:34 +02:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2015-10-12 18:44:54 +02:00
2014-05-08 14:19:58 -04:00
2015-10-12 18:44:54 +02:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2016-03-18 10:29:25 +01:00
2014-05-16 10:35:59 -04:00
2014-05-16 10:35:59 -04:00
2014-05-16 10:35:59 -04:00
2014-05-16 10:35:59 -04:00
2016-03-18 10:29:25 +01:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2016-03-18 10:29:25 +01:00
2015-05-05 18:39:01 +02:00
2016-07-19 13:21:08 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-09-04 15:47:15 +02:00
2015-05-05 18:39:02 +02:00
2014-05-08 14:19:58 -04:00
2016-07-19 13:21:08 +02:00
2016-07-19 13:21:08 +02:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:10 -05:00
2013-07-29 10:37:10 -05:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:28 +01:00
2015-11-02 08:30:28 +01:00
2015-11-02 08:30:28 +01:00
2015-11-02 08:30:28 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-12-17 08:21:27 +01:00
2015-11-02 08:30:25 +01:00
2015-11-02 08:30:25 +01:00
2015-11-02 08:30:25 +01:00
2015-11-02 08:30:25 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-11-02 08:30:26 +01:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-09-04 15:47:15 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-09-04 15:47:16 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:02 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:02 +02:00
2015-12-17 08:21:29 +01:00
2015-05-05 18:39:02 +02:00
2015-10-12 18:44:54 +02:00
2015-05-05 18:39:02 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2015-09-04 15:47:16 +02:00
2016-07-19 13:21:08 +02:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2014-05-08 14:19:58 -04:00
2013-07-29 10:37:11 -05:00
2013-07-29 10:37:11 -05:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2014-05-08 14:19:58 -04:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-09-04 15:47:16 +02:00
2015-05-05 18:39:00 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:00 +02:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-12-17 08:21:29 +01:00
2015-10-12 18:44:54 +02:00
2015-12-17 08:21:29 +01:00
2015-10-12 18:44:54 +02:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2016-02-19 11:08:56 +01:00
2015-10-12 18:46:49 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2014-03-11 09:07:41 -04:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:02 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00
2015-05-05 18:39:01 +02:00