libvirt/tests/libxlxml2domconfigdata/basic-hvm.json
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

90 lines
1.9 KiB
JSON

{
"c_info": {
"type": "hvm",
"name": "test-hvm",
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
},
"b_info": {
"max_vcpus": 4,
"avail_vcpus": [
0,
1,
2,
3
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"video_memkb": 8192,
"shadow_memkb": 12288,
"device_model_version": "qemu_xen",
"device_model": "/bin/true",
"sched_params": {
"weight": 1000
},
"type.hvm": {
"pae": "True",
"apic": "True",
"acpi": "True",
"vga": {
"kind": "cirrus"
},
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
},
"spice": {
},
"boot": "c",
"rdm": {
}
},
"arch_arm": {
}
},
"disks": [
{
"pdev_path": "/var/lib/xen/images/test-hvm.img",
"vdev": "hda",
"backend": "qdisk",
"format": "raw",
"removable": 1,
"readwrite": 1
}
],
"nics": [
{
"devid": 0,
"mac": "00:16:3e:66:12:b4",
"bridge": "br0",
"script": "/etc/xen/scripts/vif-bridge",
"nictype": "vif_ioemu"
}
],
"vfbs": [
{
"devid": -1,
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
}
}
],
"vkbs": [
{
"devid": -1
}
],
"on_reboot": "restart"
}