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..b51d2988fe --- /dev/null +++ b/ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm @@ -0,0 +1,34 @@ +Value Filldown CHASSIS_TYPE (\S+) +Value Filldown CHASSIS_ID (\S+) +Value Filldown SYSTEM_NAME (\S+) +Value Filldown DESCRIPTION (.+?) +Value Filldown CAPABILITIES_SUPPORTED (.+?) +Value Filldown CAPABILITIES (.+?) +Value Filldown MGMT_TYPE (\S+) +Value Filldown MGMT_ADDRESS (\S+) +Value Required LOCAL_INTERFACE (\S+) +Value PORT_TYPE (\S+) +Value PORT_ID (\S+) +Value PORT_DESCRIPTION (\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+${DESCRIPTION}\s*$$ + ^\s*System\s+Capabilities\s+Supported:\s+${CAPABILITIES_SUPPORTED}\s*$$ + ^\s*System\s+Capabilities\s+Enabled:\s+${CAPABILITIES}\s*$$ + ^\s*Management\s+Address\s*:\s*$$ + ^\s+Type:\s+${MGMT_TYPE}\s*$$ + ^\s+Address:\s+${MGMT_ADDRESS}\s*$$ + ^\s*LLDP\s+Port\s+Information\s*$$ -> PORTS + ^\s*$$ + ^. -> Error + +PORTS + ^\s*Port\s+PortType\s+PortId\s+PortDesc\s*$$ + ^\s*---+ + ^\s+${LOCAL_INTERFACE}\s+${PORT_TYPE}\s+${PORT_ID}\s+${PORT_DESCRIPTION}\s*$$ -> Record + ^\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/hp_procurve_show_lldp_info_local-device.raw b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.raw new file mode 100644 index 0000000000..c45741b31b --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.raw @@ -0,0 +1,23 @@ + + LLDP Local Device Information + + Chassis Type : mac-address + Chassis Id : a1b2c3-d4e5f6 + System Name : switch-vsf-01 + System Description : Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16.... + System Capabilities Supported: bridge, router + System Capabilities Enabled: bridge + + Management Address : + Type: ipv4 + Address: 192.168.1.1 + + LLDP Port Information + + Port PortType PortId PortDesc + -------- -------- -------- -------- + 1/1 local 1 1/1 + 1/2 local 2 1/2 + 1/3 local 3 1/3 + 2/1 local 54 2/1 + 2/2 local 55 2/2 diff --git a/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.yml b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.yml new file mode 100644 index 0000000000..c7cded7fed --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.yml @@ -0,0 +1,62 @@ +--- +parsed_sample: + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "a1b2c3-d4e5f6" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "1/1" + mgmt_address: "192.168.1.1" + mgmt_type: "ipv4" + port_description: "1/1" + port_id: "1" + port_type: "local" + system_name: "switch-vsf-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "a1b2c3-d4e5f6" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "1/2" + mgmt_address: "192.168.1.1" + mgmt_type: "ipv4" + port_description: "1/2" + port_id: "2" + port_type: "local" + system_name: "switch-vsf-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "a1b2c3-d4e5f6" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "1/3" + mgmt_address: "192.168.1.1" + mgmt_type: "ipv4" + port_description: "1/3" + port_id: "3" + port_type: "local" + system_name: "switch-vsf-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "a1b2c3-d4e5f6" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "2/1" + mgmt_address: "192.168.1.1" + mgmt_type: "ipv4" + port_description: "2/1" + port_id: "54" + port_type: "local" + system_name: "switch-vsf-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "a1b2c3-d4e5f6" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "2/2" + mgmt_address: "192.168.1.1" + mgmt_type: "ipv4" + port_description: "2/2" + port_id: "55" + port_type: "local" + system_name: "switch-vsf-01" diff --git a/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.raw b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.raw new file mode 100644 index 0000000000..140779aeab --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.raw @@ -0,0 +1,23 @@ + + LLDP Local Device Information + + Chassis Type : mac-address + Chassis Id : f6e5d4-c3b2a1 + System Name : switch-standalone-01 + System Description : Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16.... + System Capabilities Supported: bridge, router + System Capabilities Enabled: bridge + + Management Address : + Type: ipv4 + Address: 192.168.2.1 + + 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 diff --git a/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.yml b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.yml new file mode 100644 index 0000000000..f4df3a63e1 --- /dev/null +++ b/tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.yml @@ -0,0 +1,62 @@ +--- +parsed_sample: + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "f6e5d4-c3b2a1" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "1" + mgmt_address: "192.168.2.1" + mgmt_type: "ipv4" + port_description: "1" + port_id: "1" + port_type: "local" + system_name: "switch-standalone-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "f6e5d4-c3b2a1" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "2" + mgmt_address: "192.168.2.1" + mgmt_type: "ipv4" + port_description: "2" + port_id: "2" + port_type: "local" + system_name: "switch-standalone-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "f6e5d4-c3b2a1" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "3" + mgmt_address: "192.168.2.1" + mgmt_type: "ipv4" + port_description: "3" + port_id: "3" + port_type: "local" + system_name: "switch-standalone-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "f6e5d4-c3b2a1" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "4" + mgmt_address: "192.168.2.1" + mgmt_type: "ipv4" + port_description: "4" + port_id: "4" + port_type: "local" + system_name: "switch-standalone-01" + - capabilities: "bridge" + capabilities_supported: "bridge, router" + chassis_id: "f6e5d4-c3b2a1" + chassis_type: "mac-address" + description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." + local_interface: "5" + mgmt_address: "192.168.2.1" + mgmt_type: "ipv4" + port_description: "5" + port_id: "5" + port_type: "local" + system_name: "switch-standalone-01"