Skip to content

Commit

Permalink
Fix XML config tests for disk/net/cpu tuning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
berrange committed Feb 19, 2013
1 parent 1b9b66b commit a89daff
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions nova/tests/test_libvirt_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,12 @@ def test_config_iotune(self):
<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>""")

Expand Down Expand Up @@ -611,11 +611,11 @@ def test_config_ethernet(self):
<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):
Expand All @@ -640,14 +640,14 @@ def test_config_bridge(self):
<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):
Expand Down Expand Up @@ -854,11 +854,6 @@ def test_config_kvm(self):
<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>
Expand All @@ -876,6 +871,11 @@ def test_config_kvm(self):
<acpi/>
<apic/>
</features>
<cputune>
<shares>100</shares>
<quota>50000</quota>
<period>25000</period>
</cputune>
<devices>
<disk type="file" device="disk">
<source file="/tmp/img"/>
Expand Down

0 comments on commit a89daff

Please sign in to comment.