diff options
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/tg_ixload.py | 7 |
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 97b36d708..38b00a4b2 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_ixload.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_ixload.py @@ -142,7 +142,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" |