qemu/scripts
Kevin Wolf 69dd62dfd6 qapi: Anonymous unions
The discriminator for anonymous unions is the data type. This allows to
have a union type that allows both of these:

    { 'file': 'my_existing_block_device_id' }
    { 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } }

Unions like this are specified in the schema with an empty dict as
discriminator. For this example you could take:

    { 'union': 'BlockRef',
      'discriminator': {},
      'data': { 'definition': 'BlockOptions',
                'reference': 'str' } }
    { 'type': 'ExampleObject',
      'data: { 'file': 'BlockRef' } }

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2013-07-26 21:10:11 +02:00
..
2012-03-30 08:14:11 -05:00
2012-07-17 15:43:16 -05:00
2013-07-26 21:10:11 +02:00
2013-07-26 21:10:11 +02:00
2013-07-26 21:10:11 +02:00
2012-03-24 12:57:02 +00:00
2012-03-30 08:14:11 -05:00
2012-04-16 15:41:20 +02:00
2012-08-15 15:18:54 +01:00
2012-03-24 14:10:25 +00:00
2013-06-14 15:33:10 +01:00