aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-20 17:33:34 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-25 08:30:20 -0700
commit717999408252e973d3e288fb6aefd1b02e1c3f44 (patch)
tree5f0de0005ca4b3b71c702e651f2d0c4d803e1753 /yardstick/network_services/traffic_profile
parent93c0560ee8b3aa69f771cb77161dac58278f92ac (diff)
tg_rfc2544_ixia: use traffic id from JSON to update mac
we were using raw sort index of the interfaces to set the MAC address, but we should be using the traffic id from the static JSON instead. Change-Id: I13284db04abb3eaf8c9826974a9e5aa1c37b3891 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.py15
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])