summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2013-02-19 19:54:55 +0000
committerDaniel P. Berrange <berrange@redhat.com>2013-02-19 19:56:25 +0000
commita89daffeb99956ab38c0b6c1144803c5b3e851f9 (patch)
tree7622ee3e121063bc023be4a2388b4f3eb3944a30 /nova
parent1b9b66ba210c1dd886a95d79e5621e13fb64aa3a (diff)
downloadnova-a89daffeb99956ab38c0b6c1144803c5b3e851f9.tar.gz
nova-a89daffeb99956ab38c0b6c1144803c5b3e851f9.tar.xz
nova-a89daffeb99956ab38c0b6c1144803c5b3e851f9.zip
Fix XML config tests for disk/net/cpu tuning
Due to a bug in the XML matching code, some XML formatting problems related to disk/net/cpu tuning were not flaged as errors. The problems were all simply ordering of the elements. This patch also fixes some indentation problems at the same time Fixes bug #1130146 Change-Id: Iee392ed823002b8231b33c27b487c2538b2dc8cd Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_libvirt_config.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/nova/tests/test_libvirt_config.py b/nova/tests/test_libvirt_config.py
index 3e44ffe1a..f98e6dd51 100644
--- a/nova/tests/test_libvirt_config.py
+++ b/nova/tests/test_libvirt_config.py
@@ -492,12 +492,12 @@ class LibvirtConfigGuestDiskTest(LibvirtConfigBaseTest):
<source file="/tmp/hello"/>
<target bus="ide" dev="/dev/hda"/>
<iotune>
- <read_bytes_sec>1024000</read_bytes_sec>
- <read_iops_sec>1000</read_iops_sec>
- <write_bytes_sec>1024000</write_bytes_sec>
- <write_iops_sec>1000</write_iops_sec>
- <total_bytes_sec>2048000</total_bytes_sec>
- <total_iops_sec>2000</total_iops_sec>
+ <read_bytes_sec>1024000</read_bytes_sec>
+ <read_iops_sec>1000</read_iops_sec>
+ <write_bytes_sec>1024000</write_bytes_sec>
+ <write_iops_sec>1000</write_iops_sec>
+ <total_bytes_sec>2048000</total_bytes_sec>
+ <total_iops_sec>2000</total_iops_sec>
</iotune>
</disk>""")
@@ -611,11 +611,11 @@ class LibvirtConfigGuestInterfaceTest(LibvirtConfigBaseTest):
<mac address="DE:AD:BE:EF:CA:FE"/>
<model type="virtio"/>
<driver name="vhost"/>
- <bandwidth>
+ <target dev="vnet0"/>
+ <bandwidth>
<inbound average="1024000" peak="10240000" burst="1024000"/>
<outbound average="1024000" peak="10240000" burst="1024000"/>
- </bandwidth>
- <target dev="vnet0"/>
+ </bandwidth>
</interface>""")
def test_config_bridge(self):
@@ -640,14 +640,14 @@ class LibvirtConfigGuestInterfaceTest(LibvirtConfigBaseTest):
<mac address="DE:AD:BE:EF:CA:FE"/>
<model type="virtio"/>
<source bridge="br0"/>
- <bandwidth>
- <inbound average="1024000" peak="10240000" burst="1024000"/>
- <outbound average="1024000" peak="10240000" burst="1024000"/>
- </bandwidth>
<target dev="tap12345678"/>
<filterref filter="clean-traffic">
<parameter name="IP" value="192.168.122.1"/>
</filterref>
+ <bandwidth>
+ <inbound average="1024000" peak="10240000" burst="1024000"/>
+ <outbound average="1024000" peak="10240000" burst="1024000"/>
+ </bandwidth>
</interface>""")
def test_config_bridge_ovs(self):
@@ -854,11 +854,6 @@ class LibvirtConfigGuestTest(LibvirtConfigBaseTest):
<name>demo</name>
<memory>104857600</memory>
<vcpu>2</vcpu>
- <cputune>
- <shares>100</shares>
- <quota>50000</quota>
- <period>25000</period>
- </cputune>
<sysinfo type='smbios'>
<bios>
<entry name="vendor">Acme</entry>
@@ -876,6 +871,11 @@ class LibvirtConfigGuestTest(LibvirtConfigBaseTest):
<acpi/>
<apic/>
</features>
+ <cputune>
+ <shares>100</shares>
+ <quota>50000</quota>
+ <period>25000</period>
+ </cputune>
<devices>
<disk type="file" device="disk">
<source file="/tmp/img"/>