diff --git a/templates/hp_procurve_show_lldp_info_remote-device.textfsm b/templates/hp_procurve_show_lldp_info_remote-device.textfsm new file mode 100644 index 0000000000..d2c5e956a2 --- /dev/null +++ b/templates/hp_procurve_show_lldp_info_remote-device.textfsm @@ -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 diff --git a/templates/index b/templates/index index 12e049e690..dd393994f8 100644 --- a/templates/index +++ b/templates/index @@ -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]] diff --git a/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.raw b/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.raw new file mode 100644 index 0000000000..e0177c19c3 --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.raw @@ -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 + diff --git a/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.yml b/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.yml new file mode 100644 index 0000000000..91ee37824c --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_remote-device/hp_procurve_show_lldp_info_remote-device.yml @@ -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: ""