diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-09-07 15:24:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-07 15:24:46 +0000 |
commit | 6138d2c4115f87ff71b2084cc1021701e2697c2a (patch) | |
tree | a42d7047d497684776ef9f109b4af107ae56b47a /yardstick/network_services/traffic_profile | |
parent | 8d378924fb95ccb7375170dead8e356968b6dae5 (diff) | |
parent | f054c181810e84d8cbe32561c193af11ca6e6b29 (diff) |
Merge "Adding ixia latency support for dynamic cgnapt"
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r-- | yardstick/network_services/traffic_profile/ixia_rfc2544.py | 20 |
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 36a464e2f..ddb41f3c0 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'] @@ -80,16 +81,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 @@ -104,7 +108,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) |