-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize CDP, LLDP, ISDP capture groups (#1469)
* replace LOCAL_PORT with LOCAL_INTERFACE in CDP/LLDP templates to normalize * replace REMOTE_PORT with NEIGHBOR_INTERFACE in CDP/LLDP templates to normalize * add LOCAL_INTERFACE to data_model.md * add NEIGHBOR_INTERFACE to data_model.md and reformat * replace NEIGHBOR_PORT with NEIGHBOR_INTERFACE in hp_procurve_show_cdp_neighbors_detail to normalize * replace PORT_INFO with NEIGHBOR_INTERFACE for juniper_junos_show_lldp_neighbors to normalize * replace SYSTEM_CAPABILITIES_SUPPORTED with CAPABILITIES_SUPPORTED in hp_procurve_show_lldp_info_remote-device_detail to normalize * replace several capture groups for broadcom_icos_show_isdp_neighbors to normalize with CDP/LLDP * replace CAPABILITY with CAPABILITIES to normalize across CDP/LLDP * replace SYSTEM_CAPABILITIES_ENABLED with CAPABILITIES for hp_procurve_show_lldp_info_remote-device_detail to normalize * replace NEIGHBOR_CAPABILITY with CAPABILITIES for hp_procurve_show_cdp_neighbors_detail to normalize * replace capabilities and neighbor interface capture groups for aruba_aoscx_show_lldp_neighbors-info_detail to normalize * correct swapped capture groups in hp_comware_display_lldp_neighbor-information_verbose - replace NEIGHBOR_INTERFACE with NEIGHBOR_INTERFACE_DESCRIPTION - replace NEIGHBOR_PORT_ID with NEIGHBOR_INTERFACE * replace NEIGHBOR_INTERFACE_DESCR with NEIGHBOR_INTERFACE_DESCRIPTION in ipinfusion_ocnos_show_lldp_table to normalize * replace PORT_DESCR with NEIGHBOR_INTERFACE_DESCRIPTION in hp_procurve_show_lldp_info_remote-device_detail to normalize * replace several capture groups in arista_eos_show_lldp_neighbors_detail to normalize * replace DEST_HOST and DESTINATION_HOST with CHASSIS_ID (and some instances of system name with NEIGHBOR_NAME to normalize * replace DEVICE_ID with CHASSIS_ID in cisco_s300_show_lldp_neighbors to normalize * replace NEIGHBOR_ID with CHASSIS_ID in hp_procurve_show_cdp_neighbors_detail to normalize * replace NEIGHBOR_CHASSIS_ID with CHASSIS_ID and PVID with VLAN_ID in hp_procurve_show_lldp_info_remote-device_detail to normalize * replace NEIGHBOR with NEIGHBOR_NAME in several CDP and LLDP templates to normalize * replace SYSTEM_NAME with NEIGHBOR_NAME to normalize * replace NEIGHBOR_SYSNAME with NEIGHBOR_NAME in two hp_procurve LLDP templates to normalize * replace CHASSIS_NAME with NEIGHBOR_NAME in aruba_aoscx_show_lldp_neighbors-info_detail to normalize * normalize hp_procurve_show_lldp_info_remote-device with other CDP or LLDP templates - replace NEIGHBOR_PORTID with NEIGHBOR_INTERFACE - replace NEIGHBOR_DESCR with NEIGHBOR_DESCRIPTION * normalize hp_procurve_show_lldp_info_remote-device_detail with other CDP or LLDP templates - replace NEIGHBOR_PORTID with NEIGHBOR_INTERFACE - replace SYSTEM_DESCR with NEIGHBOR_DESCRIPTION * normalize aruba_aoscx_show_lldp_neighbors-info_detail with other CDP or LLDP templates - replace CHASSIS_DESC with NEIGHBOR_DESCRIPTION - replace PORT_ID with NEIGHBOR_PORT_ID * replace SYSTEM_DESCRIPTION with NEIGHBOR_DESCRIPTION to normalize cisco_ios_show_lldp_neighbors_detail * replace SYSTEM_DESCRIPTION with NEIGHBOR_DESCRIPTION to normalize cisco_nxos_show_lldp_neighbors_detail * replace SYSTEM_DESCRIPTION with NEIGHBOR_DESCRIPTION to normalize huawei_vrp_display_lldp_neighbor * - normalize PLATFORM_VERSION with NEIGHBOR_DESCRIPTION in arista_eos_show_lldp_neighbors_detail - normalize SOFTWARE_VERSION with NEIGHBOR_DESCRIPTION in cisco_ios_show_cdp_neighbors_detail * - replace NEIGHBOR_VERSION with NEIGHBOR_DESCRIPTION in hp_procurve_show_cdp_neighbors_detail - replace SOFTWARE_VERSION with NEIGHBOR_DESCRIPTION in cisco_wlc_ssh_show_cdp_neighbors_detail * replace NEIGHBOR_CHASSIS_ID with CHASSIS_ID in hp_procurve_show_lldp_info_remote-device to normalize * - replace NEIGHBOR_PLATFORM with PLATFORM in hp_procurve_show_cdp_neighbors_detail - replace MODEL with PLATFORM in cisco_ios_show_lldp_neighbors_detail - replace MODEL_NAME with PLATFORM in huawei_vrp_display_lldp_neighbor * replace MANUFACTURER_NAME with MANUFACTURER in huawei_vrp_display_lldp_neighbor to normalize * normalize management address capture groups in CDP/LLDP templates - replace REMOTE_MANAGEMENT_ADDRESS with MGMT_ADDRESS in hp_procurve_show_lldp_info_remote-device_detail - replace MGMT_ADDR with MGMT_ADDRESS in aruba_aoscx_show_lldp_neighbors-info_detail - replace MGMT_IP with MGMT_ADDRESS in cisco_nxos and cisco_xr cdp template - replace MANAGEMENT_IP with MGMT_ADDRESS in several templates Note: Chose not to include "IP" in the capture group name because Arista data sometimes includes Ethernet MAC addresses * replace NEIGHBOR_ADDRESS with MGMT_ADDRESS in hp_procurve_show_cdp_neighbors_detail add mgmt_address to data_model.md * replace PORT_ID with NEIGHBOR_INTERFACE in broadcom_icos_show_lldp_remote-device_all to normalize * normalize and capitalize capture groups in brocade_fastiron and brocade_netiron show_lldp_neighbors_detail templates * couple more fixes to normalize - 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 * fixing failed local merge in regard to huawei_vrp lldp
- Loading branch information
Showing
79 changed files
with
1,720 additions
and
1,663 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
4 changes: 2 additions & 2 deletions
4
ntc_templates/templates/arista_eos_show_lldp_neighbors.textfsm
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Value NEIGHBOR (\S+) | ||
Value NEIGHBOR_NAME (\S+) | ||
Value LOCAL_INTERFACE (\S+) | ||
Value NEIGHBOR_INTERFACE (\S+) | ||
|
||
Start | ||
^Port.*TTL -> LLDP | ||
|
||
LLDP | ||
^${LOCAL_INTERFACE}\s+${NEIGHBOR}\s+${NEIGHBOR_INTERFACE}\s+.* -> Record | ||
^${LOCAL_INTERFACE}\s+${NEIGHBOR_NAME}\s+${NEIGHBOR_INTERFACE}\s+.* -> Record | ||
|
22 changes: 11 additions & 11 deletions
22
ntc_templates/templates/arista_eos_show_lldp_neighbors_detail.textfsm
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
Value Required DEST_HOST (\S+) | ||
Value SYSTEM_ID (.+?) | ||
Value Required NEIGHBOR_NAME (\S+) | ||
Value CHASSIS_ID (.+?) | ||
Value MGMT_ADDRESS (.+?) | ||
Value PLATFORM_VERSION (.+?) | ||
Value REMOTE_PORT (.+?) | ||
Value Filldown LOCAL_PORT (\S+?) | ||
Value Filldown NEIGH_COUNT ([1-9]\d*) | ||
Value NEIGHBOR_DESCRIPTION (.+?) | ||
Value NEIGHBOR_INTERFACE (.+?) | ||
Value Filldown LOCAL_INTERFACE (\S+?) | ||
Value Filldown NEIGHBOR_COUNT ([1-9]\d*) | ||
Value AGE (.+?) | ||
|
||
Start | ||
^\S+\s+${LOCAL_PORT}\s+\S+\s+${NEIGH_COUNT}.* | ||
^\S+\s+${LOCAL_INTERFACE}\s+\S+\s+${NEIGHBOR_COUNT}.* | ||
^.*age\s+${AGE}$$ -> Interface | ||
|
||
Interface | ||
^\s+Chassis ID\s+:\s+${SYSTEM_ID}$$ | ||
^\s+Chassis ID\s+:\s+${CHASSIS_ID}$$ | ||
^\s+-\s+Port ID type -> Port_ID | ||
^\s+-\s+\S+\s+Name:\s+\"${DEST_HOST}\" | ||
^.*System Description:\s+\"${PLATFORM_VERSION}(\"|$$) | ||
^\s+-\s+\S+\s+Name:\s+\"${NEIGHBOR_NAME}\" | ||
^.*System Description:\s+\"${NEIGHBOR_DESCRIPTION}(\"|$$) | ||
^\s+\S+\s+Address\s+:\s+${MGMT_ADDRESS}$$ | ||
^\s*$$ -> Record Start | ||
|
||
Port_ID | ||
^\s+Port ID\s+:(\s+\"|\s+)${REMOTE_PORT}(\"|$$) -> Interface | ||
^\s+Port ID\s+:(\s+\"|\s+)${NEIGHBOR_INTERFACE}(\"|$$) -> Interface |
34 changes: 17 additions & 17 deletions
34
ntc_templates/templates/aruba_aoscx_show_lldp_neighbors-info_detail.textfsm
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
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
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
6 changes: 3 additions & 3 deletions
6
ntc_templates/templates/brocade_fastiron_show_lldp_neighbors.textfsm
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
Value Required NEIGHBOR (\S+) | ||
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}\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 |
42 changes: 21 additions & 21 deletions
42
ntc_templates/templates/brocade_fastiron_show_lldp_neighbors_detail.textfsm
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
Value Filldown interface ([0-9\/]+) | ||
Value Required neimac (\w+\.\w+\.\w+) | ||
Value ttlsecs (\d+) | ||
Value neihostnametid (.+) | ||
Value neiinterface ([a-zA-Z0-9\/\s]+) | ||
Value neipvid (\d+|none) | ||
Value neimgmtip (\d+\.\d+\.\d+\.\d+) | ||
Value neilacpindex (\d+) | ||
Value neimaxframesize (\d+) | ||
Value neiopmau ([a-zA-Z0-9\-]+) | ||
Value neicapabilities (.+) | ||
Value Filldown LOCAL_INTERFACE ([0-9\/]+) | ||
Value Required NEIGHBOR_PORT_ID (\w+\.\w+\.\w+) | ||
Value HOLDTIME (\d+) | ||
Value NEIGHBOR_NAME (.+) | ||
Value NEIGHBOR_INTERFACE ([a-zA-Z0-9\/\s]+) | ||
Value VLAN_ID (\d+|none) | ||
Value MGMT_ADDRESS (\d+\.\d+\.\d+\.\d+) | ||
Value NEIGHBOR_LACP_INDEX (\d+) | ||
Value NEIGHBOR_MAX_FRAME_SIZE (\d+) | ||
Value NEIGHBOR_MAU ([a-zA-Z0-9\-]+) | ||
Value CAPABILITIES (.+) | ||
|
||
Start | ||
^\w -> Continue.Record | ||
^Local\s+port:\s+${interface} | ||
^\s+\+\s+System\s+name\s+:\s+"${neihostnametid}" | ||
^\s+\+\s+Port\s+description\s+:\s+"${neiinterface}" | ||
^\s+Enabled\s+capabilities\s*:\s+${neicapabilities} | ||
^\s+\+\s+Port\s+VLAN\s+ID:\s+${neipvid} | ||
^\s+\+\s+Management\s+address\s+\(IPv4\):\s+${neimgmtip} | ||
^\s+\+\s+Link\s+aggregation:\s+aggregated\s+\(aggregated\s+port\s+ifIndex:\s+${neilacpindex}\) | ||
^\s+\+\s+Maximum\s+frame\s+size:\s+${neimaxframesize} | ||
^\s+Operational\s+MAU\s+type\s+:\s+${neiopmau} | ||
^\s+Neighbor:\s+${neimac},\s+TTL\s+${ttlsecs} | ||
^Local\s+port:\s+${LOCAL_INTERFACE} | ||
^\s+\+\s+System\s+name\s+:\s+"${NEIGHBOR_NAME}" | ||
^\s+\+\s+Port\s+description\s+:\s+"${NEIGHBOR_INTERFACE}" | ||
^\s+Enabled\s+capabilities\s*:\s+${CAPABILITIES} | ||
^\s+\+\s+Port\s+VLAN\s+ID:\s+${VLAN_ID} | ||
^\s+\+\s+Management\s+address\s+\(IPv4\):\s+${MGMT_ADDRESS} | ||
^\s+\+\s+Link\s+aggregation:\s+aggregated\s+\(aggregated\s+port\s+ifIndex:\s+${NEIGHBOR_LACP_INDEX}\) | ||
^\s+\+\s+Maximum\s+frame\s+size:\s+${NEIGHBOR_MAX_FRAME_SIZE} | ||
^\s+Operational\s+MAU\s+type\s+:\s+${NEIGHBOR_MAU} | ||
^\s+Neighbor:\s+${NEIGHBOR_PORT_ID},\s+TTL\s+${HOLDTIME} |
42 changes: 21 additions & 21 deletions
42
ntc_templates/templates/brocade_netiron_show_lldp_neighbors_detail.textfsm
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
Value Filldown interface ([0-9\/]+) | ||
Value Required neimac (\w+\.\w+\.\w+) | ||
Value ttlsecs (\d+) | ||
Value neihostnametid (.+) | ||
Value neiinterface ([a-zA-Z0-9\/\s]+) | ||
Value neipvid (\d+|none) | ||
Value neimgmtip (\d+\.\d+\.\d+\.\d+) | ||
Value neilacpindex (\d+) | ||
Value neimaxframesize (\d+) | ||
Value neiopmau ([a-zA-Z0-9\-]+) | ||
Value neicapabilities (.+) | ||
Value Filldown LOCAL_INTERFACE ([0-9\/]+) | ||
Value Required NEIGHBOR_PORT_ID (\w+\.\w+\.\w+) | ||
Value HOLDTIME (\d+) | ||
Value NEIGHBOR_NAME (.+) | ||
Value NEIGHBOR_INTERFACE ([a-zA-Z0-9\/\s]+) | ||
Value VLAN_ID (\d+|none) | ||
Value MGMT_ADDRESS (\d+\.\d+\.\d+\.\d+) | ||
Value NEIGHBOR_LACP_INDEX (\d+) | ||
Value NEIGHBOR_MAX_FRAME_SIZE (\d+) | ||
Value NEIGHBOR_MAU ([a-zA-Z0-9\-]+) | ||
Value CAPABILITIES (.+) | ||
|
||
Start | ||
^\w -> Continue.Record | ||
^Local\s+port:\s+${interface} | ||
^\s+\+\s+System\s+name\s+:\s+"${neihostnametid}" | ||
^\s+\+\s+Port\s+description\s+:\s+"${neiinterface}" | ||
^\s+Enabled\s+capabilities\s*:\s+${neicapabilities} | ||
^\s+\+\s+Port\s+VLAN\s+ID:\s+${neipvid} | ||
^\s+\+\s+Management\s+address\s+\(IPv4\):\s+${neimgmtip} | ||
^\s+\+\s+Link\s+aggregation:\s+aggregated\s+\(aggregated\s+port\s+ifIndex:\s+${neilacpindex}\) | ||
^\s+\+\s+Maximum\s+frame\s+size:\s+${neimaxframesize} | ||
^\s+Operational\s+MAU\s+type\s+:\s+${neiopmau} | ||
^\s+Neighbor:\s+${neimac},\s+TTL\s+${ttlsecs} | ||
^Local\s+port:\s+${LOCAL_INTERFACE} | ||
^\s+\+\s+System\s+name\s+:\s+"${NEIGHBOR_NAME}" | ||
^\s+\+\s+Port\s+description\s+:\s+"${NEIGHBOR_INTERFACE}" | ||
^\s+Enabled\s+capabilities\s*:\s+${CAPABILITIES} | ||
^\s+\+\s+Port\s+VLAN\s+ID:\s+${VLAN_ID} | ||
^\s+\+\s+Management\s+address\s+\(IPv4\):\s+${MGMT_ADDRESS} | ||
^\s+\+\s+Link\s+aggregation:\s+aggregated\s+\(aggregated\s+port\s+ifIndex:\s+${NEIGHBOR_LACP_INDEX}\) | ||
^\s+\+\s+Maximum\s+frame\s+size:\s+${NEIGHBOR_MAX_FRAME_SIZE} | ||
^\s+Operational\s+MAU\s+type\s+:\s+${NEIGHBOR_MAU} | ||
^\s+Neighbor:\s+${NEIGHBOR_PORT_ID},\s+TTL\s+${HOLDTIME} |
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
18 changes: 9 additions & 9 deletions
18
ntc_templates/templates/cisco_ios_show_cdp_neighbors_detail.textfsm
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
Value Required DESTINATION_HOST (\S+) | ||
Value MANAGEMENT_IP (\d+\.\d+\.\d+\.\d+|\w+\.\w+\.\w+) | ||
Value Required NEIGHBOR_NAME (\S+) | ||
Value MGMT_ADDRESS (\d+\.\d+\.\d+\.\d+|\w+\.\w+\.\w+) | ||
Value PLATFORM (.*) | ||
Value REMOTE_PORT (.*) | ||
Value LOCAL_PORT (.*) | ||
Value SOFTWARE_VERSION (.*$) | ||
Value NEIGHBOR_INTERFACE (.*) | ||
Value LOCAL_INTERFACE (.*) | ||
Value NEIGHBOR_DESCRIPTION (.*$) | ||
Value CAPABILITIES (.+?) | ||
|
||
Start | ||
^Device ID: ${DESTINATION_HOST} | ||
^Device ID: ${NEIGHBOR_NAME} | ||
^Entry address\(es\)\s*:\s* -> ParseIP | ||
^Platform\s*:\s*${PLATFORM}\s*,\s*Capabilities\s*:\s*${CAPABILITIES}\s+$$ | ||
^Platform\s*:\s*${PLATFORM}\s*,\s*Capabilities\s*:\s*${CAPABILITIES}$$ | ||
^Interface: ${LOCAL_PORT}, Port ID \(outgoing port\): ${REMOTE_PORT} | ||
^Interface: ${LOCAL_INTERFACE}, Port ID \(outgoing port\): ${NEIGHBOR_INTERFACE} | ||
^Version : -> GetVersion | ||
# Capture time-stamp if vty line has command time-stamping turned on | ||
^Load\s+for\s+ | ||
^Time\s+source\s+is | ||
|
||
ParseIP | ||
^.*IP address: ${MANAGEMENT_IP} -> Start | ||
^.*IP address: ${MGMT_ADDRESS} -> Start | ||
^Platform\s*:\s*${PLATFORM}\s*,\s*Capabilities\s*:\s*${CAPABILITIES}\s+$$ -> Start | ||
^Platform\s*:\s*${PLATFORM}\s*,\s*Capabilities\s*:\s*${CAPABILITIES}$$ -> Start | ||
^.* -> Start | ||
|
||
GetVersion | ||
^${SOFTWARE_VERSION} -> Record Start | ||
^${NEIGHBOR_DESCRIPTION} -> Record Start |
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
Oops, something went wrong.