Skip to content

Commit a904f6c

Browse files
authored
Support LLDP chassis IDs with colon characters (#2176)
1 parent 6abe28c commit a904f6c

9 files changed

+57
-23
lines changed

ntc_templates/templates/cisco_ios_show_lldp_neighbors_detail.textfsm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Value LOCAL_INTERFACE (\S+)
2-
Value CHASSIS_ID (([^:]+|::))
2+
Value CHASSIS_ID (.*)
33
Value NEIGHBOR_PORT_ID (.*)
44
Value NEIGHBOR_INTERFACE (.*)
55
Value NEIGHBOR_NAME (.+?)

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail1.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ parsed_sample:
88
mac_address: ""
99
manufacturer: ""
1010
mgmt_address: ""
11-
neighbor_description: "Juniper Networks, Inc. ex2200-24t-4g , version 12.3R9.4\
12-
\ Build date: 2015-02-12 11:25:30 UTC"
11+
neighbor_description: "Juniper Networks, Inc. ex2200-24t-4g , version 12.3R9.4 Build date: 2015-02-12 11:25:30 UTC"
1312
neighbor_interface: "ge-0/0/0.0"
1413
neighbor_name: ""
1514
neighbor_port_id: "502"
@@ -31,8 +30,7 @@ parsed_sample:
3130
mac_address: ""
3231
manufacturer: ""
3332
mgmt_address: "192.168.1.81"
34-
neighbor_description: "HPE OfficeConnect Switch 1820 48G J9981A, PT.02.01, Linux\
35-
\ 3.6.5-79c95a77, U-Boot 2012.10-00116-g3ab515c (Jul 30 2014 - 10:52:01)"
33+
neighbor_description: "HPE OfficeConnect Switch 1820 48G J9981A, PT.02.01, Linux 3.6.5-79c95a77, U-Boot 2012.10-00116-g3ab515c (Jul 30 2014 - 10:52:01)"
3634
neighbor_interface: "13"
3735
neighbor_name: "HpSwitch"
3836
neighbor_port_id: "94f1.2879.5555"

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail2.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ parsed_sample:
88
mac_address: ""
99
manufacturer: ""
1010
mgmt_address: "11.11.11.11"
11-
neighbor_description: "Cisco NX-OS(tm) n7700, Software (n7700-s2-dk9), Version\
12-
\ 6.2(10), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled\
13-
\ 10/9/2014 12:00:00"
11+
neighbor_description: "Cisco NX-OS(tm) n7700, Software (n7700-s2-dk9), Version 6.2(10), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 10/9/2014 12:00:00"
1412
neighbor_interface: "PO2631-10Gx2-R261R5"
1513
neighbor_name: "USSC-CAMPUS-CORE-GW2"
1614
neighbor_port_id: "Eth1/6"
@@ -32,9 +30,7 @@ parsed_sample:
3230
mac_address: ""
3331
manufacturer: ""
3432
mgmt_address: "33.33.33.3"
35-
neighbor_description: "Cisco NX-OS(tm) n7700, Software (n7700-s2-dk9), Version\
36-
\ 6.2(10), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled\
37-
\ 10/9/2014 12:00:00"
33+
neighbor_description: "Cisco NX-OS(tm) n7700, Software (n7700-s2-dk9), Version 6.2(10), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 10/9/2014 12:00:00"
3834
neighbor_interface: "PO2631-10Gx2-R261R5"
3935
neighbor_name: "USSC-CAMPUS-CORE-GW1.acme123.com"
4036
neighbor_port_id: "Eth1/6"
@@ -56,8 +52,7 @@ parsed_sample:
5652
mac_address: ""
5753
manufacturer: ""
5854
mgmt_address: "55.55.55.55"
59-
neighbor_description: "Cisco IOS Software, C3750 Software (C3750-IPSERVICESK9-M),\
60-
\ Version 12.2(53)SE2, RELEASE SOFTWARE (fc3)"
55+
neighbor_description: "Cisco IOS Software, C3750 Software (C3750-IPSERVICESK9-M), Version 12.2(53)SE2, RELEASE SOFTWARE (fc3)"
6156
neighbor_interface: "GigabitEthernet2/0/24"
6257
neighbor_name: "DMZ-SW1"
6358
neighbor_port_id: "Gi2/0/24"

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ parsed_sample:
3030
mac_address: ""
3131
manufacturer: ""
3232
mgmt_address: "172.16.0.10"
33-
neighbor_description: "Cisco IOS Software, s6t64 Software (s6t64-ADVENTERPRISEK9-M),\
34-
\ Version 15.4(1)SY3, RELEASE SOFTWARE (fc4)"
33+
neighbor_description: "Cisco IOS Software, s6t64 Software (s6t64-ADVENTERPRISEK9-M), Version 15.4(1)SY3, RELEASE SOFTWARE (fc4)"
3534
neighbor_interface: "asw22"
3635
neighbor_name: "dsw01"
3736
neighbor_port_id: "Te1/2/13"

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail5.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,14 @@ parsed_sample:
6767
sw_revision: ""
6868
vlan_id: ""
6969
- capabilities: "B,S"
70-
chassis_id: "S7-1200 6DS7 212-1BH40-0XB0 S V-LCCC5820 \
71-
\ 10 V 4 3 1"
70+
chassis_id: "S7-1200 6DS7 212-1BH40-0XB0 S V-LCCC5820 10 V 4 3 1"
7271
fw_revision: ""
7372
hw_revision: ""
7473
local_interface: ""
7574
mac_address: ""
7675
manufacturer: ""
7776
mgmt_address: "10.176.0.245"
78-
neighbor_description: "Siemens, SIMATIC S7, CPU-1200, 6ES7 211-1CC40-0XB0, HW:\
79-
\ 10, FW: V.4.3.1, S V-LDCE8620"
77+
neighbor_description: "Siemens, SIMATIC S7, CPU-1200, 6ES7 211-1CC40-0XB0, HW: 10, FW: V.4.3.1, S V-LDCE8620"
8078
neighbor_interface: "Siemens, SIMATIC S7, Ethernet Port, X1 P1"
8179
neighbor_name: ""
8280
neighbor_port_id: "port-001.ploobdfad"

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail_01.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ parsed_sample:
88
mac_address: "2416.abcd.ab12"
99
manufacturer: ""
1010
mgmt_address: "172.16.1.1"
11-
neighbor_description: "Cisco IOS Software [Bengaluru], Catalyst L3 Switch Software\
12-
\ (CAT9K_IOSXE), Version 17.6.5, RELEASE SOFTWARE (fc2)"
11+
neighbor_description: "Cisco IOS Software [Bengaluru], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 17.6.5, RELEASE SOFTWARE (fc2)"
1312
neighbor_interface: "GigabitEthernet1/0/16"
1413
neighbor_name: "sdalab-bldg1-as01.devices.example.com"
1514
neighbor_port_id: "Gi1/0/16"

tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail_02.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ parsed_sample:
88
mac_address: "aabb.cc00.0310"
99
manufacturer: ""
1010
mgmt_address: "192.168.128.102"
11-
neighbor_description: "Cisco IOS Software [IOSXE], Linux Software\
12-
\ (X86_64BI_LINUX_L2-ADVENTERPRISEK9-M), Version 17.15.1, RELEASE SOFTWARE (fc4)"
11+
neighbor_description: "Cisco IOS Software [IOSXE], Linux Software (X86_64BI_LINUX_L2-ADVENTERPRISEK9-M), Version 17.15.1, RELEASE SOFTWARE (fc4)"
1312
neighbor_interface: "Ethernet0/1"
1413
neighbor_name: "SW-MGMT.cisco.com"
1514
neighbor_port_id: "Et0/1"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
------------------------------------------------
2+
Local Intf: Tw2/0/33
3+
Chassis id: 00:61:75:F5:B5:FF
4+
Port id: 0061.75f5.b5ff
5+
Port Description: eth0
6+
System Name: Foo-BAR-TSC-101-G3
7+
8+
System Description:
9+
QSC (foobar-10)
10+
11+
Time remaining: 77 seconds
12+
System Capabilities: B,W,R,S
13+
Enabled Capabilities: S
14+
Management Addresses - not advertised
15+
Auto Negotiation - supported, enabled
16+
Physical media capabilities:
17+
1000baseT(FD)
18+
100base-TX(FD)
19+
Other/unknown
20+
Media Attachment Unit type: 29
21+
Vlan ID: - not advertised
22+
Peer Source MAC: 0061.75f5.b5ff
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
parsed_sample:
3+
- capabilities: "S"
4+
chassis_id: "00:61:75:F5:B5:FF"
5+
fw_revision: ""
6+
hw_revision: ""
7+
local_interface: "Tw2/0/33"
8+
mac_address: "0061.75f5.b5ff"
9+
manufacturer: ""
10+
mgmt_address: ""
11+
neighbor_description: "QSC (foobar-10)"
12+
neighbor_interface: "eth0"
13+
neighbor_name: "Foo-BAR-TSC-101-G3"
14+
neighbor_port_id: "0061.75f5.b5ff"
15+
platform: ""
16+
power_class: ""
17+
power_device_type: ""
18+
power_pair: ""
19+
power_priority: ""
20+
power_requested: ""
21+
power_source: ""
22+
serial: ""
23+
sw_revision: ""
24+
vlan_id: ""

0 commit comments

Comments
 (0)