1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00
libvirt/tests/libxlxml2domconfigdata/basic-pv.xml
Jim Fehlig d8e8b63d30 libxl: Add a test suite for libxl_domain_config generator
The libxl library allows a libxl_domain_config object to be serialized
from/to a JSON string. Use this to allow testing of the XML to
libxl_domain_config conversion process. Test XML is converted to
libxl_domain_config, which is then serialized to json. A json template
corresponding to the test XML is converted to a libxl_domain_config
object using libxl_domain_config_from_json(), and then serialized
back to json using libxl_domain_config_to_json(). The two json
docs are then compared.

Using libxl to convert the json template to a libxl_domain_config
object and then back to json provides a simple way to account for
any changes or additions to the json representation across Xen
releases.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
[update to v3.5.0-rc1, improve error reporting, use /bin/true emulator]
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2017-08-04 10:17:55 -06:00

29 lines
836 B
XML

<domain type='xen'>
<name>test-pv</name>
<uuid>039e9ee6-4a84-3055-4c81-8ba426ae2656</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>4</vcpu>
<bootloader>pygrub</bootloader>
<os>
<type arch='x86_64' machine='xenpv'>linux</type>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='qemu'/>
<source file='/var/lib/xen/images/test-pv.img'/>
<target dev='xvda'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:3e:86:60'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
</devices>
</domain>