get_lldp_neighbors_detail test for SG350X-48P

This commit is contained in:
Petr Klima committed 2020-11-03 15:52:39 +01:00
1 parent 0cb23fa5de
commit 17be10cd6a
5 files changed
+124 -7

No files matched your search

+5 -4
View File
@@ -428,7 +428,7 @@ class S350Driver(NetworkDriver):
remote_system_name, remote_system_description, \
remote_system_capab, remote_system_enable_capab = (u'N/A',) * 7
output = self._send_command('show lldp neighbor {}'.format(local_port))
output = self._send_command('show lldp neighbors {}'.format(local_port))
for line in output.splitlines():
if line.startswith('Port ID'):
@@ -459,6 +459,7 @@ class S350Driver(NetworkDriver):
else:
caps.append(cap[0])
print(caps)
entry = {
'parent_interface': u'N/A',
'remote_port': remote_port_id,
@@ -466,11 +467,11 @@ class S350Driver(NetworkDriver):
'remote_chassis_id': remote_chassis_id,
'remote_system_name': remote_system_name,
'remote_system_description': remote_system_description,
'remote_system_capab': u', '.join(caps),
'remote_system_enable_capab': u', '.join(caps),
'remote_system_capab': caps,
'remote_system_enable_capab': caps,
}
details[local_port] = entry
details[local_port] = [ entry, ]
return details
@@ -0,0 +1,51 @@
Device ID: 11:ac:00:66:ff:aa
Port ID: 11:ac:00:66:ff:aa
Capabilities: Bridge, Wlan-Access-Point
System Name: SBC
System description: ABC-SC-BM, 1.2.34.11111
Port description: br0
Management Address: 192.168.1.121
Management Address: fe80::76ac:b9ff:fe66:ffaa
Time To Live: 90
802.3 MAC/PHY Configuration/Status
Auto-negotiation support: Not supported
Auto-negotiation status: Disabled
Auto-negotiation Advertised Capabilities:
Operational MAU type: Unknown
802.3 Link Aggregation
Aggregation capability: Capable of being aggregated
Aggregation status: Currently not in aggregation
802.3 EEE:
Remote Tx: 17 uSec
Remote Rx: 17 uSec
Remote Tx Echo: 17 uSec
Remote Rx Echo: 17 uSec
802.1 PVID: None
802.1 PPVID:
802.1 VLAN:
802.1 Protocol:
LLDP-MED capabilities: Capabilities, Network Policy, Location, POE-PSE, POE-PD, Inventory
LLDP-MED Device Type: Network Connectivity
Hardware revision:
Firmware revision:
Software revision: 1.2.345
Serial number:
Manufacturer name:
Model name:
Asset ID:
@@ -0,0 +1,16 @@
{ "gi1/0/1" : [ {
"parent_interface" : "N/A",
"remote_chassis_id" : "11:ac:00:66:ff:aa",
"remote_port" : "11:ac:00:66:ff:aa",
"remote_port_description" : "br0",
"remote_system_capab" : [
"B",
"W"
],
"remote_system_description" : "ABC-SC-BM, 1.2.34.11111",
"remote_system_enable_capab" : [
"B",
"W"
],
"remote_system_name" : "SBC"
} ] }
@@ -6,7 +6,5 @@ TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other
Port Device ID Port ID System Name Capabilities TTL
--------- ----------------- ----------------- ----------------- ------------ -----
gi1/0/37 b0:b8:67:c2:32:aa b0:b8:67:c2:32:aa AM W 110
te1/0/3 00:8e:73:24:5d:e2 gi28 sw1 B, R 116
te1/0/4 sw2 te1/0/4 sw2 B, R 100
gi1/0/1 74:ac:aa:ff:1a:5f 74:ac:aa:ff:1a:5f UBNT B, W 90
@@ -0,0 +1,51 @@
Device ID: 11:ac:00:66:ff:aa
Port ID: 11:ac:00:66:ff:aa
Capabilities: Bridge, Wlan-Access-Point
System Name: SBC
System description: ABC-SC-BM, 1.2.34.11111
Port description: br0
Management Address: 192.168.1.121
Management Address: fe80::76ac:b9ff:fe66:ffaa
Time To Live: 90
802.3 MAC/PHY Configuration/Status
Auto-negotiation support: Not supported
Auto-negotiation status: Disabled
Auto-negotiation Advertised Capabilities:
Operational MAU type: Unknown
802.3 Link Aggregation
Aggregation capability: Capable of being aggregated
Aggregation status: Currently not in aggregation
802.3 EEE:
Remote Tx: 17 uSec
Remote Rx: 17 uSec
Remote Tx Echo: 17 uSec
Remote Rx Echo: 17 uSec
802.1 PVID: None
802.1 PPVID:
802.1 VLAN:
802.1 Protocol:
LLDP-MED capabilities: Capabilities, Network Policy, Location, POE-PSE, POE-PD, Inventory
LLDP-MED Device Type: Network Connectivity
Hardware revision:
Firmware revision:
Software revision: 1.2.345
Serial number:
Manufacturer name:
Model name:
Asset ID: