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

New Template: cisco_nxos_show_interface_description #758

Merged
merged 2 commits into from
Jun 19, 2020
Merged

New Template: cisco_nxos_show_interface_description #758

merged 2 commits into from
Jun 19, 2020

Conversation

network-dave
Copy link
Contributor

ISSUE TYPE
  • New Template Pull Request
COMPONENT

Cisco NXOS - show interface description

SUMMARY

N/A

@@ -0,0 +1,16 @@
Value PORT (\S+)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Value PORT (\S+)
Value PORT (\S+)
Value TYPE (\S+)
Value SPEED (\w+)
Value DESCRIPTION (.+)
Start
^-+
^Interface\s+Description -> Type1
^Port\s+Type\s+Speed\s+Description -> Type2
^\s*$$
^. -> Error
Type1
^-+
^Port\s+Type\s+Speed\s+Description -> Type2
^${PORT}\s+${DESCRIPTION}$$ -> Record
^\s*$$
^. -> Error
Type2
^-+
^Interface\s+Description -> Type1
^${PORT}\s+${TYPE}\s+${SPEED}\s+${DESCRIPTION} -> Record
^\s*$$
^. -> Error

Here is a template that should work and uses the state changes to capture the necessary output for each header in the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't work at 100% because it catches "Interface Description" while already in the Type1 state. The new version would be substantially more complicated for the same result. I will commit a very slightly updated version.

Open to discuss this though.

@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label Jun 12, 2020
@FragmentedPacket FragmentedPacket merged commit 96e3109 into networktocode:master Jun 19, 2020
thomasblass pushed a commit to thomasblass/ntc-templates that referenced this pull request Oct 25, 2020
guillaume-mbali pushed a commit to unyc-io/ntc-templates that referenced this pull request Apr 12, 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.

2 participants