hp_procurve_show_lldp_info_local-device: new template#2313
Conversation
matt852
left a comment
There was a problem hiding this comment.
Recommendation: Changes Suggested
Thanks @julmanglano — clean PR with thoughtful test data covering both chassis-ID formats. One cross-vendor alignment suggestion before merge:
Rename CAPABILITIES_ENABLED → CAPABILITIES. The dominant LLDP/CDP convention across Cisco, Arista, Aruba AOS-CX, Brocade, Huawei, and the existing hp_procurve_show_lldp_info_remote-device_detail.textfsm is CAPABILITIES_SUPPORTED paired with plain CAPABILITIES for the enabled set. Matching the sibling HP procurve template specifically keeps the field name consistent within the same vendor.
In ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm, the Value declaration:
-Value CAPABILITIES_ENABLED (\S.*\S)
+Value CAPABILITIES (\S.*\S)And the matching rule in the Start state:
- ^\s*System\s+Capabilities\s+Enabled\s*:\s+${CAPABILITIES_ENABLED}\s*$$
+ ^\s*System\s+Capabilities\s+Enabled\s*:\s+${CAPABILITIES}\s*$$And the fixture key. In tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device.yml:
- capabilities_enabled: "bridge"
+ capabilities: "bridge"Apply the same single-line key rename to tests/hp_procurve/show_lldp_info_local-device/show_lldp_info_local-device2.yml.
Thanks!
…to CAPABILITIES for cross-template consistency
|
Thanks @matt852 — agreed on the alignment with the sibling |
ISSUE TYPE
COMPONENT
hp_procurve,
show lldp info local-deviceSUMMARY
Adds a new template for the HP/Aruba ProCurve
show lldp info local-devicecommand. Captures the device's own LLDP advertisement —chassis info, system name/description, capabilities, and management
address.
Capture groups (cross-vendor aligned with other LLDP templates):
CHASSIS_TYPE, CHASSIS_ID, SYSTEM_NAME, SYSTEM_DESCRIPTION, MODEL,
CAPABILITIES_SUPPORTED, CAPABILITIES_ENABLED, MGMT_ADDRESS_TYPE,
MGMT_ADDRESS.
SYSTEM_DESCRIPTIONhas two fallback rules: when the descriptionstarts with the vendor token (
ProCurve|HP|Aruba), the part-numberis captured separately into
MODEL; otherwise the whole string iscaptured into
SYSTEM_DESCRIPTION.CHASSIS_IDis anchored on\S.*\Srather than\S+becauseProCurve emits the chassis MAC in two different formats depending on
firmware:
548028-aabbcf(stack/newer firmware)54 80 28 aa bb cd(standalone/older firmware)The two fixtures cover both formats.
The
LLDP Port Informationsection is acknowledged but not parsedinto capture groups (it would duplicate
show lldp info remote-deviceoutput — out of scope here).
Index entry inserted at the correct length-sorted position within the
hp_procurveblock (length 47, between length-48 and length-45 rows).