aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/standalone/model.py
diff options
context:
space:
mode:
authorDino Madarang <dinox.madarang@intel.com>2017-12-27 15:52:12 -0800
committerDino Madarang <dinox.madarang@intel.com>2018-01-16 09:51:35 -0700
commit32e9ee7b2a8f095319a806780a93beef0c6cc382 (patch)
tree736d307d565a8693aa8cdcf09adb803598da98ca /yardstick/benchmark/contexts/standalone/model.py
parentd579e62b431a31856a03098dc5323948ccfa4fdb (diff)
bugfix: Fix duplicate 'address' in standlone SRIOV
* Add unit test per Rodolfo's comment Creating a VM using generted xml file /tmp/vm_sriov_0.xml returns an XML error: missing source address type. This fix modifies generted xml from: <source> <address> <address bus="0x1a" domain="0x0000" function="0x0" slot="0x10" type="pci" /> </address> </source> to: <source> <address bus="0x1a" domain="0x0000" function="0x0" slot="0x10" type="pci" /> </source> Change-Id: I694153e7468986bacb19ba3e09e761993aad7184 Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts/standalone/model.py')
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index 85ae14b1d..0d58e91b0 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -212,9 +212,8 @@ class Libvirt(object):
mac.set('address', vf_mac)
source = ET.SubElement(interface, 'source')
- addr = ET.SubElement(source, 'address')
pci_address = PciAddress(vf_pci.strip())
- cls._add_interface_address(addr, pci_address)
+ cls._add_interface_address(source, pci_address)
pci_vm_address = PciAddress(vm_pci.strip())
cls._add_interface_address(interface, pci_vm_address)