Skip to content

Cisco IOS-XE additional transceiver data (CURRENT) #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 21, 2025

Conversation

paineta
Copy link
Contributor

@paineta paineta commented May 13, 2025

Existing template did not properly parse the additional "current" value in the "show interface transceiver" output on Cisco IOS-XE. I added support to collect the Current value or leave it blank, as to not break legacy output, and I also fleshed out the template to include an Error directive.

Copy link
Contributor Author

@paineta paineta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the message output from the networking device would be string literals, I feel like matching (a space) with regex adds unnecessary ambiguity.

@mjbear
Copy link
Collaborator

mjbear commented May 16, 2025

Since the message output from the networking device would be string literals, I feel like matching (a space) with regex adds unnecessary ambiguity.

I can see where you're coming from.

While not an absolute, there's a general consensus going back years to flexibly match white space so the possibility of breakage on vendor white space changes is minimized. This minimizes the possibility for issues and maintenance on the templates (or at least that's the hope! ☺️).

For those couple error messages, tucking \s+ for a literal space doesn't make them terribly long in line length and the convention with whitespace regexes is widespread across the templates I've reviewed over several years. This is an open discussion and I wouldn't want it either way. 🙂

I'd like to leave this up for discussion so some templating veterans can comment here.

Thank you for the contributions and discussion @paineta!

@jmcgill298
Copy link
Contributor

Thanks @paineta, as @mjbear mentioned, we do prefer \s+ over a literal character to avoid a silly change in whitespace to affect the template

@mjbear mjbear removed the question label May 17, 2025
@paineta
Copy link
Contributor Author

paineta commented May 19, 2025

No problem. Thanks.

@jvanderaa jvanderaa merged commit bc97d2a into networktocode:master May 21, 2025
10 checks passed
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.

4 participants