aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-01 18:21:11 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-05 10:58:29 -0700
commit15d9333cf16c533cd438ca4195f50e91b479feec (patch)
tree252edb0f9cdd1afd48f1a54affc22b5632b3887f /yardstick/network_services/vnf_generic/vnf/prox_vnf.py
parentd332664dd680d877ef822660c2f8bed2ef0a7322 (diff)
PROX: catch ports stats parse error
for some reason port status returned fewer fields, catch this for debug and return empty result dict so test continues and hopefully we get a valid stat read on next call. Change-Id: I54f1a86707d2a00efcb82a7e0239d12f90a6542c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/prox_vnf.py')
-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),