Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP Procurve show lldp info remote device #689

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions templates/hp_procurve_show_lldp_info_remote-device.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value Required LOCAL_PORT (\S+)
Value NEIGHBOR_CHASSIS_ID ((?:[a-z0-9]{2}\s){5}[a-z0-9]{2}|\S+)
Value NEIGHBOR_PORTID ((?:[a-z0-9]{2}\s){5}[a-z0-9]{2}|\S+)
Value NEIGHBOR_DESCR (\S+|.*?)
Value NEIGHBOR_SYSNAME (\S+)

Start
^\s*LLDP\sRemote\sDevices\sInformation\s*$$
^\s+LocalPort\s|\sChassisId.*$$
^\s+-.* -> LLDP
^\s*$$
^. -> Error

LLDP
^\s+${LOCAL_PORT}\s+\|\s${NEIGHBOR_CHASSIS_ID}\s+${NEIGHBOR_PORTID}\s*$$ -> Record
^\s+${LOCAL_PORT}\s+\|\s${NEIGHBOR_CHASSIS_ID}\s+${NEIGHBOR_PORTID}\s+${NEIGHBOR_SYSNAME}\s*$$ -> Record
^\s+${LOCAL_PORT}\s+\|\s${NEIGHBOR_CHASSIS_ID}\s+${NEIGHBOR_PORTID}\s+${NEIGHBOR_DESCR}\s+${NEIGHBOR_SYSNAME}\s*$$ -> Record
^\S+\#\s*$$
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]]
hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]]

hp_procurve_show_lldp_info_remote-device_detail.textfsm, .*, hp_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] .+
hp_procurve_show_lldp_info_remote-device.textfsm, .*, hp_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]]
hp_procurve_show_tech_buffers.textfsm, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[ffers]]
hp_procurve_show_mac-address.textfsm, .*, hp_procurve, sh[[ow]] mac-a[[ddress]]
hp_procurve_show_system.textfsm, .*, hp_procurve, sh[[ow]] syst[[em]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

LLDP Remote Devices Information

LocalPort | ChassisId PortId PortDescr SysName
--------- + ------------------ ------------------ --------- ------------------
1 | 3821c7-c1cd00 1 1 65432p-swi006-g...
3 | 3ce1a1-2218f0 3c e1 a1 22 18 f0
7 | bcf310-1f8b40 mgt0 AH-cust-AP21
25 | d8cb8a-6d303c d8 cb 8a 6d 30 3c
29 | 484d7e-e66c42 48 4d 7e e6 6c 42
36 | 603197-7aa548 1 UPLINK NAP203
37 | b00cd1-359a98 b0 0c d1 35 9a 98
42 | d8cb8a-894644 d8 cb 8a 89 46 44

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
parsed_sample:
- local_port: "1"
neighbor_chassis_id: "3821c7-c1cd00"
neighbor_descr: "1"
neighbor_portid: "1"
neighbor_sysname: "65432p-swi006-g..."
- local_port: "3"
neighbor_chassis_id: "3ce1a1-2218f0"
neighbor_descr: ""
neighbor_portid: "3c e1 a1 22 18 f0"
neighbor_sysname: ""
- local_port: "7"
neighbor_chassis_id: "bcf310-1f8b40"
neighbor_descr: ""
neighbor_portid: "mgt0"
neighbor_sysname: "AH-cust-AP21"
- local_port: "25"
neighbor_chassis_id: "d8cb8a-6d303c"
neighbor_descr: ""
neighbor_portid: "d8 cb 8a 6d 30 3c"
neighbor_sysname: ""
- local_port: "29"
neighbor_chassis_id: "484d7e-e66c42"
neighbor_descr: ""
neighbor_portid: "48 4d 7e e6 6c 42"
neighbor_sysname: ""
- local_port: "36"
neighbor_chassis_id: "603197-7aa548"
neighbor_descr: "UPLINK"
neighbor_portid: "1"
neighbor_sysname: "NAP203"
- local_port: "37"
neighbor_chassis_id: "b00cd1-359a98"
neighbor_descr: ""
neighbor_portid: "b0 0c d1 35 9a 98"
neighbor_sysname: ""
- local_port: "42"
neighbor_chassis_id: "d8cb8a-894644"
neighbor_descr: ""
neighbor_portid: "d8 cb 8a 89 46 44"
neighbor_sysname: ""