Skip to content
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

Added new template: show interface link on cisco ios #1290

Merged

Conversation

jversch6
Copy link
Contributor

This has different outputs on several platforms and often doesn't return some fields at all, hence the multitude of configurations.

This has different outputs on several platforms
^\s*${PORT}\s+${DOWNTIME}\s*${SINCE}\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s*${DOWNTIME}\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s*${DOWNTIME}\s+${SINCE}\s*$$ -> Record

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add:

  ^\s*$$
  ^. -> Error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

UpTime
^\s*${PORT}\s+${NAME}\s+00:00:00\s+${UPTIME}?\s*$$ -> Record
^\s*${PORT}\s+${DOWNTIME}\s+${UPTIME}?\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s+${DOWNTIME}\s*$$ -> Record
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add:

  ^\s*$$
  ^. -> Error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

Port Name Down Time Down Since
Gi1/1 37 weeks, 3 days, 5 hours, 52 minutes 18 secs 08:07:10 Mon Feb 14 2022
Gi1/6 15 weeks, 11 minutes 57 secs 13:47:31 Thu Jul 21 2022
Gi1/10 Fitness 10 weeks, 5 days, 20 hours, 26 minutes 38 secs 17:32:50 Fri Aug 19 2022
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for their to be spaces here? e.g. ICE Port

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test case and cleaned up some redundant lines.

@itdependsnetworks itdependsnetworks added the changes_requested Waiting on user to address feedback label Feb 8, 2023
@jmcgill298
Copy link
Contributor

@jversch6 thanks for including the Error line, but I think the templates are not matching all of the output, and the tests are failing.

@jversch6
Copy link
Contributor Author

@jmcgill298 Sorry, apparently I hadn't committed the .raw file . It's showing green now!

@jvanderaa
Copy link
Contributor

@itdependsnetworks @jmcgill298 we good here?

@jmcgill298
Copy link
Contributor

Thanks @jversch6

@jmcgill298 jmcgill298 merged commit eb15ca0 into networktocode:master Mar 6, 2023
cppmonkey pushed a commit to cppmonkey/ntc-templates that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants