On 07/23/2013 07:03 AM, Kevin Wolf wrote: > This implements the visitor part of base types for unions. Parsed into > QMP, this example schema definiton...
s/definiton/definition/ > > { 'type': 'BlockOptionsBase', 'data': { 'read-only': 'bool' } } > { 'type': 'BlockOptionsQcow2, 'data': { 'lazy-refcounts': 'bool' } } > > { 'union': 'BlockOptions', > 'base': 'BlockOptionsBase', > 'data': { > 'raw': 'BlockOptionsRaw' > 'qcow2': 'BlockOptionsQcow2' > } } > > ...would describe the following JSON object: > > { "type": "qcow2", > "read-only": true, > "data": { "lazy-refcounts": false } } > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > scripts/qapi-visit.py | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature