-
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
show interface summary #539
show interface summary #539
Conversation
Value TYPE (\w+) | ||
Value AP_MGR (\w+) | ||
Value GUEST (N\/A|\w+) | ||
|
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.
Here is the changes to the template that I would make:
Value Filldown INT_COUNT (\d+)
Value Required NAME (\S+)
Value PORT (\S+)
Value VLAN (\S+)
Value IP_ADDR (([\d1-9]+\.?){4})
Value TYPE (\S+)
Value AP_MGR (\S+)
Value GUEST (\S+)
Start
^\s+Number\sof\sInterfaces\.*\s${INT_COUNT}s*$$
^Interface\s+Name\s+Port\s+Vlan\s+Id\s+IP\s+Address\s+Type\s+Ap\s+Mgr\s+Guest -> Type_One
Type_One
^-+\s
^${NAME}\s+${PORT}\s+${VLAN}\s+${IP_ADDR}\s+${TYPE}\s+${AP_MGR}\s+${GUEST}$$ -> Record
^\s*$$
^. -> Error
Changed most of the value's regex to \S+
as it should suffice here and catch any non-whitespace on and not depend on if it's a word or not.
I also changed it to track the whole header and then transition state to Type_One
if the header matches. This allows us to make sure we're capturing the the correct and expected output. If the headers or output changes, we would add another line to match it and transition to a different state to capture the changed output.
I also added Required
to Value NAME
to prevent us from having the non-filled in information within the .parsed
file.
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.
Whoops. Could you add the following to the Start state:
^\s*$$
^. -> Error
Value TYPE (\w+) | ||
Value AP_MGR (\w+) | ||
Value GUEST (N\/A|\w+) | ||
|
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.
Whoops. Could you add the following to the Start state:
^\s*$$
^. -> Error
ISSUE TYPE
COMPONENT
cisco_wlc_ssh_show_interface_summary.template, .*, cisco_wlc_ssh, show interface summary
SUMMARY