aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-08-31 20:35:32 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-07 15:21:18 +0000
commitf054c181810e84d8cbe32561c193af11ca6e6b29 (patch)
treeae86452b99fd1092ef0c65c9d172528c467ba2d3 /yardstick/network_services/traffic_profile
parentf7a3cef287979664d1812cdd4dd88276732ec8b8 (diff)
Adding ixia latency support for dynamic cgnapt
Change-Id: I346f6064c39cb5662c2b17ca0f520addbe5eae4c Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index ba532b820..4745b24b5 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -46,6 +46,7 @@ class IXIARFC2544Profile(TrexProfile):
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']
@@ -79,16 +80,19 @@ class IXIARFC2544Profile(TrexProfile):
self.tmp_drop = 0
self.tmp_throughput = 0
+ def update_traffic_profile(self):
+ self.profile = 'private_1'
+ for key, value in self.params.items():
+ if "private" in key or "public" in key:
+ self.profile_data = self.params[key]
+ self.get_streams(self.profile_data)
+ self.full_profile.update({key: self.profile_data})
+
def execute(self, traffic_generator, ixia_obj, mac={}, xfile=None):
if self.first_run:
self.full_profile = {}
self.pg_id = 0
- self.profile = 'private_1'
- for key, value in self.params.items():
- if "private" in key or "public" in key:
- self.profile_data = self.params[key]
- self.get_streams(self.profile_data)
- self.full_profile.update({key: self.profile_data})
+ self.update_traffic_profile()
traffic = \
self._get_ixia_traffic_profile(self.full_profile, mac, xfile)
self.max_rate = self.rate
@@ -103,7 +107,9 @@ class IXIARFC2544Profile(TrexProfile):
def start_ixia_latency(self, traffic_generator, ixia_obj,
mac={}, xfile=None):
- traffic = self._get_ixia_traffic_profile(self.full_profile, mac)
+ self.update_traffic_profile()
+ traffic = \
+ self._get_ixia_traffic_profile(self.full_profile, mac, xfile)
self._ixia_traffic_generate(traffic_generator, traffic,
ixia_obj, xfile)