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>
"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"