diff options
author | 2017-09-21 15:01:01 +0000 | |
---|---|---|
committer | 2017-09-21 15:01:01 +0000 | |
commit | 4529399c79b1e61ea37cb79e790adc130c98cf45 (patch) | |
tree | c534015d4409a9d60c66191335fc336dce00a6cd /yardstick/network_services/traffic_profile/ixia_rfc2544.py | |
parent | b00112e33caffee6b6b01402537e68007fdc8cb2 (diff) | |
parent | 133f90ad75679ce0c51b9c1b714ee1039928c896 (diff) |
Merge "tg_rfc2544_ixia: use traffic id from JSON to update mac"
Diffstat (limited to 'yardstick/network_services/traffic_profile/ixia_rfc2544.py')
-rw-r--r-- | yardstick/network_services/traffic_profile/ixia_rfc2544.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py index cb8a34796..ee58172d8 100644 --- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -103,7 +103,9 @@ class IXIARFC2544Profile(TrexProfile): self.ports = [port for port in port_generator()] - def execute_traffic(self, traffic_generator, ixia_obj, mac={}, xfile=None): + def execute_traffic(self, traffic_generator, ixia_obj, mac=None, xfile=None): + if mac is None: + mac = {} if self.first_run: self.full_profile = {} self.pg_id = 0 @@ -121,15 +123,18 @@ class IXIARFC2544Profile(TrexProfile): return str(multiplier) def start_ixia_latency(self, traffic_generator, ixia_obj, - mac={}, xfile=None): + mac=None, xfile=None): + if mac is None: + mac = {} self.update_traffic_profile(traffic_generator) traffic = \ self._get_ixia_traffic_profile(self.full_profile, mac, xfile) - self._ixia_traffic_generate(traffic_generator, traffic, - ixia_obj, xfile) + self._ixia_traffic_generate(traffic_generator, traffic, ixia_obj) def get_drop_percentage(self, traffic_generator, samples, tol_min, - tolerance, ixia_obj, mac={}, xfile=None): + tolerance, ixia_obj, mac=None, xfile=None): + if mac is None: + mac = {} status = 'Running' drop_percent = 100 in_packets = sum([samples[iface]['in_packets'] for iface in samples]) |