aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorJohn O Loughlin <john.oloughlin@intel.com>2019-01-18 09:16:31 +0000
committerJohn O'Loughlin <john.oloughlin@intel.com>2019-02-07 09:19:20 +0000
commit65db4a71ee253c5710e5d58e124b06c08b2ef5b3 (patch)
treebc12849b54f07a3e17d10eef2cf8c5dc39a59c1a /yardstick
parent07c506d3fff732019651d89de14bf42fa8d9a365 (diff)
Add Warning for key issue ixload
Currently there is a section of code that assigns a gateway links[name]["ip"]["gateway"] = gateway If the ip field has not already been defined a key error is thrown and not handled. This error is then suppressed so the program fails silently and thus causes the test case to hang. JIRA: YARDSTICK-1586 Change-Id: I94a1081a2038fb58989b3033444ea5f3a6e178f0 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_ixload.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_ixload.py b/yardstick/network_services/vnf_generic/vnf/tg_ixload.py
index d25402740..495b14d2d 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_ixload.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_ixload.py
@@ -143,7 +143,12 @@ class IxLoadTrafficGen(sample_vnf.SampleVNFTrafficGen):
"external-interface"] if
intf["virtual-interface"]["vld_id"] == name)
- links[name]["ip"]["gateway"] = gateway
+ try:
+ links[name]["ip"]["gateway"] = gateway
+ except KeyError:
+ LOG.error("Invalid traffic profile: No IP section defined for %s", name)
+ raise
+
except StopIteration:
LOG.debug("Cant find gateway for link %s", name)
links[name]["ip"]["gateway"] = "0.0.0.0"