summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py6
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py11
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py3
3 files changed, 13 insertions, 7 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index 6dd7a6d2..a241fe1b 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -663,12 +663,14 @@ class STLClient(object):
# create ports
for port_id in xrange(self.system_info["port_count"]):
- speed = self.system_info['ports'][port_id]['speed']
- driver = self.system_info['ports'][port_id]['driver']
+ speed = self.system_info['ports'][port_id]['speed']
+ driver = self.system_info['ports'][port_id]['driver']
+ macaddr = self.system_info['ports'][port_id]['macaddr']
self.ports[port_id] = Port(port_id,
speed,
driver,
+ macaddr,
self.username,
self.comm_link,
self.session_id)
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
index ef454b8c..f2d4cd95 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
@@ -41,7 +41,7 @@ class Port(object):
STATE_PAUSE: "PAUSE"}
- def __init__ (self, port_id, speed, driver, user, comm_link, session_id):
+ def __init__ (self, port_id, speed, driver, macaddr, user, comm_link, session_id):
self.port_id = port_id
self.state = self.STATE_IDLE
self.handler = None
@@ -51,6 +51,7 @@ class Port(object):
self.user = user
self.driver = driver
self.speed = speed
+ self.macaddr = macaddr
self.streams = {}
self.profile = None
self.session_id = session_id
@@ -520,9 +521,10 @@ class Port(object):
# generate port info
def get_info (self):
info = {}
- info['speed'] = self.speed
- info['driver'] = self.driver
- info['status'] = self.get_port_state_name()
+ info['speed'] = self.speed
+ info['driver'] = self.driver
+ info['status'] = self.get_port_state_name()
+ info['macaddr'] = self.macaddr
if self.attr.get('promiscuous'):
info['prom'] = "on" if self.attr['promiscuous']['enabled'] else "off"
@@ -544,6 +546,7 @@ class Port(object):
info = self.get_info()
return {"type": info['driver'],
+ "macaddr": info['macaddr'],
"maximum": "{speed} Gb/s".format(speed=info['speed']),
"status": info['status'],
"promiscuous" : info['prom']
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
index 353d2ef2..ec5435a3 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
@@ -180,7 +180,8 @@ class CTRexInfoGenerator(object):
relevant_ports = self.__get_relevant_ports(port_id_list)
return_stats_data = {}
- per_field_status = OrderedDict([("type", []),
+ per_field_status = OrderedDict([("macaddr", []),
+ ("type", []),
("maximum", []),
("status", []),
("promiscuous", []),