diff --git a/ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm b/ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm new file mode 100644 index 0000000000..aca43e4117 --- /dev/null +++ b/ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm @@ -0,0 +1,32 @@ +Value CHASSIS_TYPE (\S.*\S) +Value CHASSIS_ID (\S.*\S) +Value SYSTEM_NAME (\S+) +Value SYSTEM_DESCRIPTION (\S.*\S) +Value MODEL (\S+) +Value CAPABILITIES_SUPPORTED (\S.*\S) +Value CAPABILITIES (\S.*\S) +Value MGMT_ADDRESS_TYPE (\S+) +Value MGMT_ADDRESS (\S+) + +Start + ^\s*LLDP\s+Local\s+Device\s+Information\s*$$ + ^\s*Chassis\s+Type\s*:\s+${CHASSIS_TYPE}\s*$$ + ^\s*Chassis\s+Id\s*:\s+${CHASSIS_ID}\s*$$ + ^\s*System\s+Name\s*:\s+${SYSTEM_NAME}\s*$$ + ^\s*System\s+Description\s*:\s+(?:ProCurve|HP|Aruba)\s+${MODEL}\s+${SYSTEM_DESCRIPTION}\s*$$ + ^\s*System\s+Description\s*:\s+${SYSTEM_DESCRIPTION}\s*$$ + ^\s*System\s+Capabilities\s+Supported\s*:\s+${CAPABILITIES_SUPPORTED}\s*$$ + ^\s*System\s+Capabilities\s+Enabled\s*:\s+${CAPABILITIES}\s*$$ + ^\s*Management\s+Address\s*:\s*$$ + ^\s+Type\s*:\s*${MGMT_ADDRESS_TYPE}\s*$$ + ^\s+Address\s*:\s*${MGMT_ADDRESS}\s*$$ + ^\s*LLDP\s+Port\s+Information\s*$$ -> Record PortSection + ^\s*$$ + ^. -> Error + +PortSection + ^\s*Port\s+PortType\s+PortId\s+PortDesc\s*$$ + ^\s*-+\s+-+\s+-+\s+-+\s*$$ + ^\s*\S+\s+\S+\s+\S+\s+\S+\s*$$ + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 8d4ecac01b..83b1c5e192 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -690,6 +690,7 @@ hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]] hp_procurve_show_lldp_info_remote-device_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] .+ hp_procurve_show_lldp_info_remote-device.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] +hp_procurve_show_lldp_info_local-device.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] l[[ocal-device]] hp_procurve_show_cdp_neighbors_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] cd[[p]] nei[[ghbors]] d[[etail]] hp_procurve_show_interfaces_brief.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] int[[erfaces]] b[[rief]] hp_procurve_show_port-security.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] port-s[[ecurity]] diff --git a/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.raw b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.raw new file mode 100644 index 0000000000..869fb87aa1 --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.raw @@ -0,0 +1,22 @@ + LLDP Local Device Information + + Chassis Type : mac-address + Chassis Id : 548028-aabbcf + System Name : SWITCH-1 + System Description : Aruba JL255A 2930F-24G-PoE+-4SFP+ Switch, revision W... + System Capabilities Supported: bridge, router + System Capabilities Enabled: bridge + + Management Address : + Type: ipv4 + Address: 192.0.2.1 + + LLDP Port Information + + Port PortType PortId PortDesc + -------- -------- -------- -------- + 1/1 local 1 1/1 + 1/2 local 2 1/2 + 1/25 local 25 1/25 + 2/1 local 54 2/1 + 3/28 local 134 3/28 diff --git a/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.yml b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.yml new file mode 100644 index 0000000000..42964a20a3 --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.yml @@ -0,0 +1,11 @@ +--- +parsed_sample: + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "548028-aabbcf" + chassis_type: "mac-address" + mgmt_address: "192.0.2.1" + mgmt_address_type: "ipv4" + model: "JL255A" + system_description: "2930F-24G-PoE+-4SFP+ Switch, revision W..." + system_name: "SWITCH-1" diff --git a/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.raw b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.raw new file mode 100644 index 0000000000..2e7643c236 --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.raw @@ -0,0 +1,27 @@ + LLDP Local Device Information + + Chassis Type : mac-address + Chassis Id : 54 80 28 aa bb cd + System Name : SWITCH-2 + System Description : HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002... + System Capabilities Supported: bridge + System Capabilities Enabled: bridge + + Management Address : + Type: ipv4 + Address: 192.0.2.2 + + LLDP Port Information + + Port PortType PortId PortDesc + -------- -------- -------- -------- + 1 local 1 1 + 2 local 2 2 + 3 local 3 3 + 4 local 4 4 + 5 local 5 5 + 6 local 6 6 + 7 local 7 7 + 8 local 8 8 + 9 local 9 9 + 10 local 10 10 diff --git a/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.yml b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.yml new file mode 100644 index 0000000000..d38082cecb --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.yml @@ -0,0 +1,11 @@ +--- +parsed_sample: + - capabilities: "bridge" + capabilities_supported: "bridge" + chassis_id: "54 80 28 aa bb cd" + chassis_type: "mac-address" + mgmt_address: "192.0.2.2" + mgmt_address_type: "ipv4" + model: "J9774A" + system_description: "2530-8G-PoEP Switch, revision YA.16.10.002..." + system_name: "SWITCH-2"