Add SROS show port description multiline support#2306
Conversation
matt852
left a comment
There was a problem hiding this comment.
Recommendation: Changes Suggested
@mjbear thoughts on this agentic suggestion and how viable it is?
-
Simplify the modified header rule. The new
(\s*\S*\s*\S*)group extends the match by at most two trailing tokens, so a header likePort Descriptions on Card 1 Module 2 Foo Barwould still fail to match.\s+.+matches any trailing content and reads more clearly; tests pass locally with this change.In
ntc_templates/templates/alcatel_sros_show_port_description.textfsm, the header rule inStart:- ^Port\s+Descriptions\s+on\s\S+\s+\S+(\s*\S*\s*\S*)\s*$$ + ^Port\s+Descriptions\s+on\s+.+$$
Thanks!
This was designed to match the "Port Cross Connect 1" text and still be backwards compatible with two-word port names.
There are more words in the foo bar example than we see in actual output. Nothing wrong with some simplification. ❤️ (So instead of the first two, just the last one in green.) - ^Port\s+Descriptions\s+on\s\S+\s+\S+(\s*\S*\s*\S*)\s*$$
- ^Port\s+Descriptions\s+on\s+.+$$
+ ^Port\s+Descriptions\s+onThank you for the review |
resolves #2305
Add/fix support for alcatel_sros multiline
show port descriptionlines.