diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-05-21 17:38:50 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-05-22 11:40:07 +0100 |
commit | 72df0eaac4a2a1f23439af7f249c2b5d18d1b819 (patch) | |
tree | cdd7ce91fa5b8a644cb73fac5cba1188f953e2ad /yardstick/benchmark/contexts | |
parent | b7f867ba873806a10972108fa19d26b2ae19fa58 (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>
Diffstat (limited to 'yardstick/benchmark/contexts')
-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 95472fdda..2f93e530b 100644 --- a/yardstick/benchmark/contexts/standalone/sriov.py +++ b/yardstick/benchmark/contexts/standalone/sriov.py @@ -194,10 +194,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 = [] @@ -220,7 +220,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) |