summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/network_services/helpers/samplevnf_helper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yardstick/network_services/helpers/samplevnf_helper.py b/yardstick/network_services/helpers/samplevnf_helper.py
index 1eefc5ffa..543d814df 100644
--- a/yardstick/network_services/helpers/samplevnf_helper.py
+++ b/yardstick/network_services/helpers/samplevnf_helper.py
@@ -499,7 +499,10 @@ class MultiPortConfig(object):
def get_route_data(self, src_key, data_key, port):
route_list = self.vnfd['vdu'][0].get(src_key, [])
- return next((route[data_key] for route in route_list if route['if'] == port), None)
+ try:
+ return next((route[data_key] for route in route_list if route['if'] == port), None)
+ except (TypeError, StopIteration, KeyError):
+ return None
def get_ports_gateway(self, port):
return self.get_route_data('routing_table', 'gateway', port)