mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
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>
|
||
|---|---|---|
| .. | ||
| specs | ||
| atomics.txt | ||
| blkverify.txt | ||
| bootindex.txt | ||
| ccid.txt | ||
| ich9-ehci-uhci.cfg | ||
| libcacard.txt | ||
| live-block-ops.txt | ||
| memory.txt | ||
| migration.txt | ||
| q35-chipset.cfg | ||
| qapi-code-gen.txt | ||
| qdev-device-use.txt | ||
| qemupciserial.inf | ||
| rdma.txt | ||
| spice-port-fqdn.txt | ||
| tracing.txt | ||
| usb-storage.txt | ||
| usb2.txt | ||
| virtio-balloon-stats.txt | ||
| vnc-ledstate-Pseudo-encoding.txt | ||
| writing-qmp-commands.txt | ||
| xbzrle.txt | ||
| xen-save-devices-state.txt | ||