aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/helpers
diff options
context:
space:
mode:
authorMartin Banszel <martinx.banszel@intel.com>2017-07-19 19:35:02 +0000
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-05 17:48:02 -0700
commitd3ee35dc0015e073b7138f3b02508b40fc6288b1 (patch)
treed5350f427a7ba6dcea8d36b00ae217d0074f0511 /yardstick/network_services/helpers
parent79e811f096f8640189fc75862535f1f0cc4773c5 (diff)
Add fixes for heat deployed UDP_Replay and TRex
- Added a PROTOCOL_MAP to map the protocol names to codes -- the scapy requires the code, it fails if the proto is set e.g. to 'udp' - ip addresses must be str, not unicode -- explicit conversion to str added - removed unittest for setup_vnf_environment in test_tg_trex.py as it is the same function as already tested in test_sample_vnf.py - traffic_profile refactored -- code repetition decreased, unittest adapted Known issues: - there is a an attempt to stop already stopped trex. It fires an exception that stop command is issued on the disconnected client. Change-Id: I87e9029630f48b30e8f5b4f9d88ab3b25fd65f03 Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
Diffstat (limited to 'yardstick/network_services/helpers')
-rw-r--r--yardstick/network_services/helpers/samplevnf_helper.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/yardstick/network_services/helpers/samplevnf_helper.py b/yardstick/network_services/helpers/samplevnf_helper.py
index dfc5cb972..9d89d4188 100644
--- a/yardstick/network_services/helpers/samplevnf_helper.py
+++ b/yardstick/network_services/helpers/samplevnf_helper.py
@@ -229,10 +229,15 @@ class MultiPortConfig(object):
@staticmethod
def get_port_pairs(interfaces):
port_pair_list = []
- networks = defaultdict(list)
+ networks = {}
for private_intf in interfaces:
vintf = private_intf['virtual-interface']
- networks[vintf['vld_id']].append(vintf)
+ try:
+ vld_id = vintf['vld_id']
+ except KeyError:
+ pass
+ else:
+ networks.setdefault(vld_id, []).append(vintf)
for name, net in networks.items():
# partition returns a tuple