-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve LLDP neighbor detail parsing on older IOS versions (#846)
- Loading branch information
Showing
4 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
test/ios/mocked_data/test_get_lldp_neighbors_detail/older_ios/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"GigabitEthernet0/24": [ | ||
{ | ||
"parent_interface": "N/A", | ||
"remote_chassis_id": "f4a7.39cd.2e40", | ||
"remote_port": "ge-0/0/23", | ||
"remote_port_description": "ptp to switch", | ||
"remote_system_capab": "B,R", | ||
"remote_system_description": "Juniper Networks, Inc. ex3300-24p , version 12.3R12.4 Build date: 2016-01-20 05:03:06 UTC", | ||
"remote_system_enable_capab": "B,R", | ||
"remote_system_name": "switch1" | ||
} | ||
], | ||
"GigabitEthernet0/1": [ | ||
{ | ||
"parent_interface": "N/A", | ||
"remote_chassis_id": "a8b1.d41d.8680", | ||
"remote_port": "Gi0/2", | ||
"remote_port_description": "GigabitEthernet0/2", | ||
"remote_system_capab": "B", | ||
"remote_system_description": "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(1)SE2, RELEASE SOFTWARE (fc3)", | ||
"remote_system_enable_capab": "B", | ||
"remote_system_name": "switch2" | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
test/ios/mocked_data/test_get_lldp_neighbors_detail/older_ios/show_lldp_neighbors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
Capability codes: | ||
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device | ||
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other | ||
|
||
Device ID Local Intf Hold-time Capability Port ID | ||
switch1 Gi0/24 120 B,R ge-0/0/23 | ||
switch2 Gi0/1 120 B Gi0/2 | ||
|
||
Total entries displayed: 2 | ||
|
68 changes: 68 additions & 0 deletions
68
test/ios/mocked_data/test_get_lldp_neighbors_detail/older_ios/show_lldp_neighbors_detail.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
|
||
Chassis id: f4a7.39cd.2e40 | ||
Port id: ge-0/0/23 | ||
Port Description: ptp to switch | ||
System Name: switch1 | ||
|
||
System Description: | ||
Juniper Networks, Inc. ex3300-24p , version 12.3R12.4 Build date: 2016-01-20 05:03:06 UTC | ||
|
||
Time remaining: 105 seconds | ||
System Capabilities: B,R | ||
Enabled Capabilities: B,R | ||
Management Addresses - not advertised | ||
Auto Negotiation - supported, enabled | ||
Physical media capabilities: | ||
Other/unknown | ||
100base-TX(HD) | ||
Symm Pause(FD) | ||
Symm, Asym Pause(FD) | ||
1000baseX(FD) | ||
1000baseT(HD) | ||
Media Attachment Unit type - not advertised | ||
|
||
MED Information: | ||
|
||
MED Codes: | ||
(NP) Network Policy, (LI) Location Identification | ||
(PS) Power Source Entity, (PD) Power Device | ||
(IN) Inventory | ||
|
||
Inventory information - not advertised | ||
Capabilities: NP, LI, PS | ||
Device type: Network connectivity | ||
Network Policies - not advertised | ||
Power requirements - not advertised | ||
--------------------------------------------- | ||
|
||
|
||
Chassis id: a8b1.d41d.8680 | ||
Port id: Gi0/2 | ||
Port Description: GigabitEthernet0/2 | ||
System Name: switch2 | ||
|
||
System Description: | ||
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(1)SE2, RELEASE SOFTWARE (fc3) | ||
Technical Support: http://www.cisco.com/techsupport | ||
Copyright (c) 1986-2011 by Cisco Systems, Inc. | ||
Compiled Thu 22-Dec-11 00:46 by prod_rel_team | ||
|
||
Time remaining: 115 seconds | ||
System Capabilities: B | ||
Enabled Capabilities: B | ||
Management Addresses: | ||
IP: 10.10.10.10 | ||
Auto Negotiation - supported, enabled | ||
Physical media capabilities: | ||
Other/unknown | ||
Symm Pause(FD) | ||
Symm, Asym Pause(FD) | ||
1000baseX(FD) | ||
1000baseT(HD) | ||
Media Attachment Unit type: 30 | ||
--------------------------------------------- | ||
|
||
|
||
Total entries displayed: 2 | ||
|