From 32e9ee7b2a8f095319a806780a93beef0c6cc382 Mon Sep 17 00:00:00 2001 From: Dino Madarang Date: Wed, 27 Dec 2017 15:52:12 -0800 Subject: 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:
to:
Change-Id: I694153e7468986bacb19ba3e09e761993aad7184 Signed-off-by: Dino Simeon Madarang Reviewed-by: Rodolfo Alonso Hernandez Reviewed-by: Ross Brattain Reviewed-by: Alain Jebara Reviewed-by: Emma Foley --- yardstick/benchmark/contexts/standalone/model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'yardstick/benchmark/contexts/standalone/model.py') 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) -- cgit 1.2.3-korg