-
Notifications
You must be signed in to change notification settings - Fork 735
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
New Template: cisco_nxos_show_interface_description #758
Conversation
@@ -0,0 +1,16 @@ | |||
Value PORT (\S+) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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.
ISSUE TYPE
COMPONENT
Cisco NXOS - show interface description
SUMMARY
N/A