summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/network_services/vnf_generic/vnf/prox_vnf.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
index 214c9f3a0..cb09b43f6 100644
--- a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
@@ -71,8 +71,14 @@ class ProxApproxVnf(SampleVNF):
"1, 2 or 4 ports only supported at this time")
port_stats = self.vnf_execute('port_stats', range(len(self.vnfd_helper.interfaces)))
- rx_total = port_stats[6]
- tx_total = port_stats[7]
+ try:
+ rx_total = port_stats[6]
+ tx_total = port_stats[7]
+ except IndexError:
+ LOG.error("port_stats parse fail %s", port_stats)
+ # return empty dict so we don't mess up existing KPIs
+ return {}
+
result = {
"packets_in": tx_total,
"packets_dropped": (tx_total - rx_total),