69dd62dfd6
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> |
||
---|---|---|
.. | ||
kvm | ||
qemu-guest-agent | ||
tracetool | ||
analyse-9p-simpletrace.py | ||
check-qerror.sh | ||
checkpatch.pl | ||
cleanup-trace-events.pl | ||
create_config | ||
feature_to_c.sh | ||
get_maintainer.pl | ||
gtester-cat | ||
hxtool | ||
make_device_config.sh | ||
make-release | ||
ordereddict.py | ||
qapi-commands.py | ||
qapi-types.py | ||
qapi-visit.py | ||
qapi.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qtest | ||
refresh-pxe-roms.sh | ||
signrom.py | ||
simpletrace.py | ||
texi2pod.pl | ||
tracetool.py | ||
update-linux-headers.sh |