Added test suite for the XML <-> XM config file conversion

This commit is contained in:
Daniel P. Berrange
2007-01-19 20:30:05 +00:00
parent 1b0f541704
commit bc073b5a4d
16 changed files with 575 additions and 116 deletions

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,2 @@
EXTRA_DIST = $(wildcard *.xml) $(wildcard *.cfg)

View File

@@ -0,0 +1,22 @@
name = "XenGuest2"
uuid = "c7a5fdb2cdaf9455926ad65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ]
vif = [ "mac=00:16:3E:66:92:9C,type=ioemu" ]

View File

@@ -0,0 +1,38 @@
<domain type='xen'>
<name>XenGuest2</name>
<uuid>c7a5fdb2cdaf9455926ad65c16db1809</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot>cdrom</boot>
</os>
<currentMemory>403456</currentMemory>
<memory>592896</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest2'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3E:66:92:9C'/>
</interface>
<graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'/>
</devices>
</domain>

View File

@@ -0,0 +1,23 @@
name = "XenGuest2"
uuid = "c7a5fdb2cdaf9455926ad65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
cdrom = "/root/boot.iso"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,ioemu:hda,w" ]
vif = [ "mac=00:16:3E:66:92:9C,type=ioemu" ]

View File

@@ -0,0 +1,38 @@
<domain type='xen'>
<name>XenGuest2</name>
<uuid>c7a5fdb2cdaf9455926ad65c16db1809</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot>cdrom</boot>
</os>
<currentMemory>403456</currentMemory>
<memory>592896</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest2'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3E:66:92:9C'/>
</interface>
<graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'/>
</devices>
</domain>

View File

@@ -0,0 +1,12 @@
name = "XenGuest1"
uuid = "c7a5fdb0cdaf9455926ad65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [ "type=vnc,vncunused=1,vnclisten=127.0.0.1,vncpasswd=123poi" ]
disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ]
vif = [ "mac=00:16:3E:66:94:9C,ip=192.168.0.9" ]

View File

@@ -0,0 +1,24 @@
<domain type='xen'>
<name>XenGuest1</name>
<uuid>c7a5fdb0cdaf9455926ad65c16db1809</uuid>
<bootloader>/usr/bin/pygrub</bootloader>
<currentMemory>403456</currentMemory>
<memory>592896</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest1'/>
<target dev='xvda'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3E:66:94:9C'/>
<ip address='192.168.0.9'/>
</interface>
<graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'/>
<console/>
</devices>
</domain>

View File

@@ -0,0 +1,16 @@
name = "XenGuest1"
uuid = "c7a5fdb0cdaf9455926ad65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ]
vif = [ "mac=00:16:3E:66:94:9C,ip=192.168.0.9" ]

View File

@@ -0,0 +1,24 @@
<domain type='xen'>
<name>XenGuest1</name>
<uuid>c7a5fdb0cdaf9455926ad65c16db1809</uuid>
<bootloader>/usr/bin/pygrub</bootloader>
<currentMemory>403456</currentMemory>
<memory>592896</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest1'/>
<target dev='xvda'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3E:66:94:9C'/>
<ip address='192.168.0.9'/>
</interface>
<graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'/>
<console/>
</devices>
</domain>