summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-11-09 18:19:09 +0200
committerimarom <imarom@cisco.com>2016-11-09 18:19:09 +0200
commitab28fccc187c6134eeb0400ce0b113a77e498bb2 (patch)
tree8ac54ad7a53992fb25e48d14eee274a2fdab3f37 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parentd09b123992f990a6c219dd47707cc703fe9055b5 (diff)
RX features - added port attributes for IPv4 and DG
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py23
1 files changed, 15 insertions, 8 deletions
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 96c5e832..418ee5a6 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
@@ -785,10 +785,15 @@ class Port(object):
else:
info['rx_filter_mode'] = 'N/A'
+
+ info['mac_addr'] = attr.get('mac_addr', 'N/A')
+ info['ipv4'] = attr.get('ipv4', 'N/A')
+ info['default_gateway'] = attr.get('default_gateway', 'N/A')
+ info['next_hop_mac'] = attr.get('next_hop_mac', 'N/A')
+
# RX info
rx_info = self.status['rx_info']
-
# RX sniffer
if 'sniffer' in rx_info:
sniffer = rx_info['sniffer']
@@ -819,16 +824,18 @@ class Port(object):
info = self.get_formatted_info()
- return {"driver": info['driver'],
- "description": info.get('description', 'N/A')[:18],
- "HW src mac": info['hw_macaddr'],
- "SW src mac": info['src_macaddr'],
- "SW dst mac": info['dst_macaddr'],
- "PCI Address": info['pci_addr'],
- "NUMA Node": info['numa'],
+ return {"driver": info['driver'],
+ "description": info.get('description', 'N/A')[:18],
+ "MAC addr": info['mac_addr'],
+ "Next hop MAC": info['next_hop_mac'],
+ "IPv4": info['ipv4'],
+ "Default gateway": info['default_gateway'],
+ "PCI Address": info['pci_addr'],
+ "NUMA Node": info['numa'],
"--": "",
"---": "",
"----": "",
+ "-----": "",
"link speed": info['speed'],
"port status": info['status'],
"link status": info['link'],