hp_procurve_show_lldp_info_remote-device_detail: tolerate empty values#2310
Open
julmanglano wants to merge 3 commits into
Open
Conversation
Instead of \s? we could use \s* to allow for zero or more (repeated) space capturing (in case the vendor output changes).
Collaborator
|
@julmanglano
Please review this - my suggestions can be adjusted as needed. 🙂 |
mjbear
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE TYPE
COMPONENT
hp_procurve,
show lldp info remote-device detailSUMMARY
Six rules in the
LLDPstate require a literal space after the colon:ProCurve emits empty-valued lines without that trailing space — e.g. an
LLDP neighbor that has not advertised a system name appears as
SysName :\n. The mandatory-space rule misses, the line is notmatched, and downstream rules in the same neighbor block can fail or
attach to the wrong record.
This PR changes those six occurrences from
\sto\s?, making thepost-colon space optional. Capture groups are unchanged; in the
empty-value case they capture the empty string.
The new
hp_procurve_show_lldp_info_remote-device_detail2.{raw,yml}fixture covers a Local Port table with both an unpopulated neighbor
(empty
SysName,System Descr, etc.) and a fully populated one.No schema change. The original fixture continues to pass.