Skip to content

hp_procurve_show_interfaces_brief: support stacked port names#2311

Open
julmanglano wants to merge 2 commits into
networktocode:masterfrom
julmanglano:pr/hp-procurve-show-interfaces-brief
Open

hp_procurve_show_interfaces_brief: support stacked port names#2311
julmanglano wants to merge 2 commits into
networktocode:masterfrom
julmanglano:pr/hp-procurve-show-interfaces-brief

Conversation

@julmanglano
Copy link
Copy Markdown
Contributor

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

hp_procurve, show interfaces brief

SUMMARY

The PORT capture group was anchored to [a-zA-Z0-9\-]+, which excludes
the / character used in stacked-switch port naming.

On a stacked HP/Aruba ProCurve switch, ports are named 1/1, 1/2,
…, 2/1, etc. None of those names match the existing regex, so the
showintbrief2 state hits its catch-all ^. -> Error rule and parsing
aborts on the very first interface.

This PR broadens the regex to [a-zA-Z0-9\-/]+, allowing the slash.
No other capture groups change, no schema change, and the five existing
fixtures (standalone-switch outputs) continue to pass.

The new show_interfaces_brief2.{raw,yml} fixture covers an 84-row
stacked output with a mix of 1/N, 2/N, and trunk-named ports.

* Remove several duplicate lines to "reduce" the test data
* Rename the test data files with a more meaningful name
@mjbear
Copy link
Copy Markdown
Collaborator

mjbear commented May 12, 2026

@julmanglano
Thank you for the PR!

I made a couple of minor changes.

  • Reduced some of the duplication from the test data file
  • Renamed the raw test data name be more descriptive (not a requirement, but several other files had names we purposefully set in past PRs so I adjusted this one)

@mjbear mjbear self-assigned this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants