Skip to content

Commit

Permalink
couple more fixes to normalize
Browse files Browse the repository at this point in the history
- HOLD_TIME > HOLDTIME in brocade_fastiron_show_lldp_neighbors
- VERSION > NEIGHBOR_DESCRIPTION in cisco_nxos_show_cdp_neighbors_detail
- VERSION > NEIGHBOR_DESCRIPTION in cisco_xr_show_cdp_neighbors_detail
  • Loading branch information
mjbear committed Sep 4, 2023
1 parent 364bde9 commit 4e7c86f
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Value Required NEIGHBOR_NAME (\S+)
Value Required LOCAL_INTERFACE (\S+)
Value Required HOLD_TIME (\d+)
Value Required HOLDTIME (\d+)
Value Required CAPABILITIES (\S+)
Value Required NEIGHBOR_INTERFACE (\S+)

Start
^Capability.*
^\s+\(.*
^Device\s+ID\s+Local\s+Intf\s+Hold-time\s+Capability\s+Port\s+ID\s*$$
^${NEIGHBOR_NAME}\s+${LOCAL_INTERFACE}\s+${HOLD_TIME}\s+${CAPABILITIES}\s+${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR_NAME}\s+${LOCAL_INTERFACE}\s+${HOLDTIME}\s+${CAPABILITIES}\s+${NEIGHBOR_INTERFACE} -> Record
^Total.*
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Value MGMT_ADDRESS (.*)
Value PLATFORM (.*)
Value NEIGHBOR_INTERFACE (.*)
Value LOCAL_INTERFACE (.*)
Value VERSION (.*)
Value NEIGHBOR_DESCRIPTION (.*)
Value INTERFACE_IP (.*)
Value CAPABILITIES (.*[^\s])

Expand All @@ -25,4 +25,4 @@ GetInterfaceIP
^.*IP.+Address: ${INTERFACE_IP} -> Start

GetVersion
^${VERSION} -> Start
^${NEIGHBOR_DESCRIPTION} -> Start
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Value MGMT_ADDRESS (.*)
Value PLATFORM (.*)
Value NEIGHBOR_INTERFACE (.*)
Value LOCAL_INTERFACE (.*)
Value VERSION (.*)
Value NEIGHBOR_DESCRIPTION (.*)
Value CAPABILITIES (.*)

Start
Expand All @@ -20,5 +20,5 @@ GetIP
^.*IP.+address: ${MGMT_ADDRESS} -> Start

GetVersion
^${VERSION} -> Record Start
^${NEIGHBOR_DESCRIPTION} -> Record Start

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
parsed_sample:
- capabilities: "B,R"
hold_time: "120"
holdtime: "120"
local_interface: "Gi1/3"
neighbor_interface: "Gi0/3"
neighbor_name: "core-sw01"
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,48 @@ parsed_sample:
interface_ip: "10.1.100.1"
local_interface: "mgmt0"
mgmt_address: "10.1.100.1"
neighbor_description: "Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M),\
\ Version 12.2(44)SE2, RELEASE SOFTWARE (fc2)"
neighbor_interface: "FastEthernet1/0/32"
neighbor_name: ""
platform: "cisco WS-C3750-48TS"
version: "Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M), Version 12.2(44)SE2,\
\ RELEASE SOFTWARE (fc2)"
- capabilities: "Router Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "dc-lf03(SAL19069XXX)"
interface_ip: "10.1.100.226"
local_interface: "Ethernet1/1"
mgmt_address: "10.1.100.226"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 7.0(3)I5(1)"
neighbor_interface: "Ethernet1/1"
neighbor_name: "dc-lf03"
platform: "N9K-C9372TX"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I5(1)"
- capabilities: "Router Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "dc-lf03(SAL1906XXXX)"
interface_ip: "10.1.100.226"
local_interface: "Ethernet1/3"
mgmt_address: "10.1.100.226"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 7.0(3)I5(1)"
neighbor_interface: "Ethernet1/3"
neighbor_name: "dc-lf03"
platform: "N9K-C9372TX"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I5(1)"
- capabilities: "Router Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "dc-sp01(SAL19069XXX)"
interface_ip: "10.1.1.1"
local_interface: "Ethernet1/49"
mgmt_address: "10.1.100.222"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 7.0(3)I2(2d)"
neighbor_interface: "Ethernet1/52"
neighbor_name: "dc-sp01"
platform: "N9K-C9372TX"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I2(2d)"
- capabilities: "Router Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "dc-sp02(SAL19069XXX)"
interface_ip: "10.1.1.9"
local_interface: "Ethernet1/50"
mgmt_address: "10.1.100.223"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 7.0(3)I2(2d)"
neighbor_interface: "Ethernet1/52"
neighbor_name: "dc-sp02"
platform: "N9K-C9372TX"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I2(2d)"
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,38 @@ parsed_sample:
interface_ip: "10.115.143.251"
local_interface: "mgmt0"
mgmt_address: "10.115.143.251"
neighbor_description: "Cisco IOS Software, C3560E Software (C3560E-UNIVERSALK9-M),\
\ Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)"
neighbor_interface: "GigabitEthernet0/20"
neighbor_name: ""
platform: "WS-C3560X-24"
version: "Cisco IOS Software, C3560E Software (C3560E-UNIVERSALK9-M), Version\
\ 12.2(55)SE5, RELEASE SOFTWARE (fc1)"
- capabilities: "Router Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "DC3TESTW01-55.test.co.nz(SSI3707070J)"
interface_ip: "10.115.17.253"
local_interface: "Ethernet1/1"
mgmt_address: "10.115.143.120"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 5.2(1)N1(4)"
neighbor_interface: "Ethernet1/31"
neighbor_name: "DC3TESTW01-55"
platform: "N5K-C5548UP"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 5.2(1)N1(4)"
- capabilities: "Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "DC3TESTW02.test.co.nz(SSI11111D2M)"
interface_ip: "10.115.143.21"
local_interface: "Ethernet1/21"
mgmt_address: "10.115.143.21"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 5.2(1)N1(4)"
neighbor_interface: "Ethernet1/21"
neighbor_name: "DC3TESTW02"
platform: "N5K-C5020P-BF"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 5.2(1)N1(4)"
- capabilities: "Switch IGMP Filtering Supports-STP-Dispute"
chassis_id: "DC3TESTW02.test.co.nz(SSI44444D2M)"
interface_ip: "10.115.143.21"
local_interface: "Ethernet1/22"
mgmt_address: "10.115.143.21"
neighbor_description: "Cisco Nexus Operating System (NX-OS) Software, Version\
\ 5.2(1)N1(4)"
neighbor_interface: "Ethernet1/22"
neighbor_name: "DC3TESTW02"
platform: "N5K-C5020P-BF"
version: "Cisco Nexus Operating System (NX-OS) Software, Version 5.2(1)N1(4)"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parsed_sample:
interface_ip: ""
local_interface: "Ethernet1/1"
mgmt_address: ""
neighbor_description: "6.47.10 (long-term)"
neighbor_interface: "ether1"
neighbor_name: ""
platform: "MikroTik"
version: "6.47.10 (long-term)"
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ parsed_sample:
interface_ip: "10.0.0.1"
local_interface: "Ethernet7/14"
mgmt_address: "10.0.0.1"
neighbor_description: "Cisco IOS Software [Everest], Catalyst L3 Switch Software\
\ (CAT9K_IOSXE), Version 16.6.6, RELEASE SOFTWARE (fc1)"
neighbor_interface: "TenGigabitEthernet1/1/7"
neighbor_name: ""
platform: "C9300-48UXM"
version: "Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT9K_IOSXE),\
\ Version 16.6.6, RELEASE SOFTWARE (fc1)"
- capabilities: "Switch IGMP Filtering"
chassis_id: "redacted.test.com"
interface_ip: "10.0.0.3"
local_interface: "Ethernet7/15"
mgmt_address: "10.0.0.4"
neighbor_description: "Cisco IOS Software [Everest], Catalyst L3 Switch Software\
\ (CAT9K_IOSXE), Version 16.6.6, RELEASE SOFTWARE (fc1)"
neighbor_interface: "TenGigabitEthernet1/1/8"
neighbor_name: ""
platform: "C9300-48UXM"
version: "Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT9K_IOSXE),\
\ Version 16.6.6, RELEASE SOFTWARE (fc1)"
Loading

0 comments on commit 4e7c86f

Please sign in to comment.