aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-09-24 21:57:08 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-30 01:23:07 -0700
commit4bce5a017eecb80914ca4395cd380d9ff0e361ab (patch)
tree21863adb0143f2cbf3dd20a438538896fbce57c5 /yardstick/network_services/traffic_profile
parentff1b02d5d4757fce15fa2818360693611abf4dd9 (diff)
Adding multi-port support for ixia taffic generator
Change-Id: Ic8aa130f3cdc7bd8dec39d06a6b824340bf658b2 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py62
1 files changed, 33 insertions, 29 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index ee58172d8..28480b8e9 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -43,35 +43,39 @@ class IXIARFC2544Profile(TrexProfile):
traffic = static_traffic[traffickey]
# outer_l2
index = 0
- for key, value in profile_data[traffickey].items():
- framesize = value['outer_l2']['framesize']
- traffic['outer_l2']['framesize'] = framesize
- traffic['framesPerSecond'] = True
- traffic['bidir'] = False
- traffic['outer_l2']['srcmac'] = \
- mac["src_mac_{}".format(traffic['id'])]
- traffic['outer_l2']['dstmac'] = \
- mac["dst_mac_{}".format(traffic['id'])]
-
- # outer_l3
- if "outer_l3v6" in list(value.keys()):
- traffic['outer_l3'] = value['outer_l3v6']
- srcip4 = value['outer_l3v6']['srcip6']
- traffic['outer_l3']['srcip4'] = srcip4.split("-")[0]
- dstip4 = value['outer_l3v6']['dstip6']
- traffic['outer_l3']['dstip4'] = dstip4.split("-")[0]
- else:
- traffic['outer_l3'] = value['outer_l3v4']
- srcip4 = value['outer_l3v4']['srcip4']
- traffic['outer_l3']['srcip4'] = srcip4.split("-")[0]
- dstip4 = value['outer_l3v4']['dstip4']
- traffic['outer_l3']['dstip4'] = dstip4.split("-")[0]
-
- traffic['outer_l3']['type'] = key
- traffic['outer_l3']['count'] = value['outer_l3v4']['count']
- # outer_l4
- traffic['outer_l4'] = value['outer_l4']
- index = index + 1
+ try:
+ for key, value in profile_data[traffickey].items():
+ framesize = value['outer_l2']['framesize']
+ traffic['outer_l2']['framesize'] = framesize
+ traffic['framesPerSecond'] = True
+ traffic['bidir'] = False
+ traffic['outer_l2']['srcmac'] = \
+ mac["src_mac_{}".format(traffic['id'])]
+ traffic['outer_l2']['dstmac'] = \
+ mac["dst_mac_{}".format(traffic['id'])]
+
+ # outer_l3
+ if "outer_l3v6" in list(value.keys()):
+ traffic['outer_l3'] = value['outer_l3v6']
+ srcip4 = value['outer_l3v6']['srcip6']
+ traffic['outer_l3']['srcip4'] = srcip4.split("-")[0]
+ dstip4 = value['outer_l3v6']['dstip6']
+ traffic['outer_l3']['dstip4'] = dstip4.split("-")[0]
+ else:
+ traffic['outer_l3'] = value['outer_l3v4']
+ srcip4 = value['outer_l3v4']['srcip4']
+ traffic['outer_l3']['srcip4'] = srcip4.split("-")[0]
+ dstip4 = value['outer_l3v4']['dstip4']
+ traffic['outer_l3']['dstip4'] = dstip4.split("-")[0]
+
+ traffic['outer_l3']['type'] = key
+ traffic['outer_l3']['count'] = value['outer_l3v4']['count']
+ # outer_l4
+ traffic['outer_l4'] = value['outer_l4']
+ index = index + 1
+ except Exception:
+ continue
+
result.update({traffickey: traffic})
return result