diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-05-21 17:38:50 +0100 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-06-21 12:42:51 +0000 |
commit | 28b4f64c06df81aed7144b0c74c7851d8cb4402d (patch) | |
tree | bd7fb18514f521030c53bb8fe33d1bb4b18f2ef0 /yardstick/benchmark | |
parent | 5506dbf8d9163318f8028b7fabca416a3b7a2438 (diff) |
Error when adding SR-IOV interfaces in SR-IOV context
Method "add_sriov_interfaces" in Libvirt class throws an error when trying
to add SR-IOV interfaces in the XML file.
Function "setup_sriov_context" in SriovContext if passing to
"_enable_interfaces" method the XML file name instead of passing the XML
string.
JIRA: YARDSTICK-1189
Change-Id: If021c102311ecb98cb26934f78067dfc720e4291
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
(cherry picked from commit 72df0eaac4a2a1f23439af7f249c2b5d18d1b819)
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r-- | yardstick/benchmark/contexts/standalone/sriov.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yardstick/benchmark/contexts/standalone/sriov.py b/yardstick/benchmark/contexts/standalone/sriov.py index 5db419e6a..d4c27fa9c 100644 --- a/yardstick/benchmark/contexts/standalone/sriov.py +++ b/yardstick/benchmark/contexts/standalone/sriov.py @@ -197,10 +197,10 @@ class SriovContext(Context): slot = index + idx + 10 vf['vpci'] = \ "{}:{}:{:02x}.{}".format(vpci.domain, vpci.bus, slot, vpci.function) - model.Libvirt.add_sriov_interfaces( - vf['vpci'], vf['vf_pci']['vf_pci'], vf['mac'], str(cfg)) self.connection.execute("ifconfig %s up" % vf['interface']) self.connection.execute(vf_spoofchk.format(vf['interface'])) + return model.Libvirt.add_sriov_interfaces( + vf['vpci'], vf['vf_pci']['vf_pci'], vf['mac'], str(cfg)) def setup_sriov_context(self): nodes = [] @@ -223,7 +223,7 @@ class SriovContext(Context): network_ports = collections.OrderedDict( {k: v for k, v in vnf["network_ports"].items() if k != 'mgmt'}) for idx, vfs in enumerate(network_ports.values()): - self._enable_interfaces(index, idx, vfs, cfg) + xml_str = self._enable_interfaces(index, idx, vfs, xml_str) # copy xml to target... model.Libvirt.write_file(cfg, xml_str) |