[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection |
Date: |
Mon, 24 Aug 2015 10:51:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 08/24/2015 07:07 AM, Eric Blake wrote:
> Where things would NOT be allowed due to our prohibition of nested
> structs is:
>
> { 'union': 'Flat', 'base': 'Base', 'discriminator': 'type',
> 'data': { 'okay': 'str', 'bad': { 'i': 'int' } } }
I typed that wrong.
{ 'union': 'Flat', 'base': 'Base', 'discriminator': 'type',
'data': { 'branch1': 'NamedTypeOkay',
'branch2': { 'anon-type-okay': 'str' },
'branch3': { 'okay': str', 'bad-nesting': { 'i': 'int' } } } }
and where anonymous types are still okay is that if we add long-hand for
expressing optional types, or otherwise use a dict in place of a type,
we can do:
{ 'union': 'Flat', 'base': 'Base', 'discriminator': 'type',
'data': { 'branch1': 'NamedTypeOkay',
'branch2': { 'anon-type-okay': { 'type': 'str',
'optional': true } } } }
,
That is, there is a difference between the dictionary expressing an
anonymous type, and the dictionary expressing additional attributes
belonging to a member of a struct.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH RFC v3 19/32] qapi: Clean up after recent conversions to QAPISchemaVisitor, (continued)
- [Qemu-devel] [PATCH RFC v3 22/32] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO(), Markus Armbruster, 2015/08/04
- [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Markus Armbruster, 2015/08/04
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Eric Blake, 2015/08/05
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Eric Blake, 2015/08/05
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Eric Blake, 2015/08/23
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Markus Armbruster, 2015/08/24
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Eric Blake, 2015/08/24
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection,
Eric Blake <=
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Markus Armbruster, 2015/08/24
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Eric Blake, 2015/08/24
- Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection, Markus Armbruster, 2015/08/25