-
Notifications
You must be signed in to change notification settings - Fork 739
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
Parser fails when cable-diagnostics tdr is running for show interface status on cisco-ios #1034
Comments
serverwrangler
added a commit
to serverwrangler/ntc-templates
that referenced
this issue
Dec 2, 2021
Template update to fix compatibility issues with show interface status on interfaces that are undergoing cable-diagnostics tdr testing.
Closed
Will Track in #1035 |
itdependsnetworks
added a commit
to itdependsnetworks/ntc-templates
that referenced
this issue
Dec 25, 2022
Fix for issue networktocode#1034 Template update to fix compatibility issues with show interface status on interfaces that are undergoing cable-diagnostics tdr testing. update Co-Authored-By: Carlos Latorre <[email protected]>
itdependsnetworks
added a commit
that referenced
this issue
Dec 25, 2022
Fix for issue #1034 Template update to fix compatibility issues with show interface status on interfaces that are undergoing cable-diagnostics tdr testing. update Co-Authored-By: Carlos Latorre <[email protected]> Co-authored-by: Carlos Latorre <[email protected]>
pszulczewski
pushed a commit
that referenced
this issue
Apr 12, 2023
Fix for issue #1034 Template update to fix compatibility issues with show interface status on interfaces that are undergoing cable-diagnostics tdr testing. update Co-Authored-By: Carlos Latorre <[email protected]> Co-authored-by: Carlos Latorre <[email protected]>
cppmonkey
pushed a commit
to cppmonkey/ntc-templates
that referenced
this issue
Oct 25, 2023
Fix for issue networktocode#1034 Template update to fix compatibility issues with show interface status on interfaces that are undergoing cable-diagnostics tdr testing. update Co-Authored-By: Carlos Latorre <[email protected]> Co-authored-by: Carlos Latorre <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ISSUE TYPE
TEMPLATE USING
cisco_ios_show_interfaces_status.textfsm
SAMPLE COMMAND OUTPUT
SUMMARY
When an interface is currently undergoing a cable-diagnostic tdr test the show interface status output will include (connect:) or (notconnect:). This causes the template (cisco_ios_show_interfaces_status.textfsm) to fail to parse the interface status. This is a rare condition where the timing of running cable-diagnostic tdr test at the same time as running a show interface status or if you have older Cat3k switches with buggy IOS.
STEPS TO REPRODUCE
test cable-diagnostics tdr interface gi3/0/16
int_table = parse_output(platform="cisco_ios", command="show int status | exclude CPU|Trunk|Te", data=intsuck)
Gi3/0/16 No Description notconnect: 1 a-full a-100 10/100/1000BaseTX
EXPECTED RESULTS
Template parser to parse the interface status
ACTUAL RESULTS
Template parser failed to parse the output due to the status field containing an unexpected state.
FIX
Fixed issue by adding two additional status values to template (cisco_ios_show_interfaces_status.textfsm)
Value PORT (\S+)
Value NAME (.+?)
Value STATUS (err-disabled|disabled|connected|connected:|notconnect|notconnect:|inactive|up|down|monitoring)
Value VLAN (\S+)
Value DUPLEX (\S+)
Value SPEED (\S+)
Value TYPE (.*)
Value FC_MODE (\S+)
Start
^Load\s+for\s+
Capture time-stamp if vty line has command time-stamping turned on
^Time\s+source\s+is
^-+\s*$$
^Port\s+Name\s+Status\s+Vlan\s+Duplex\s+Speed\s+Type -> Interfaces
^\s*$$
^. -> Error
Interfaces${TYPE})\s*$ $ -> Record
#Match fc...
^\s*${PORT}\s+is\s+${STATUS}\s+Port\s+mode\s+is\s+${FC_MODE}\s*$$ -> Record
^\s*${PORT}\s+is\s+${STATUS}\s+(
^\s*${PORT}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^-+
^\s*$$
^. -> Error
The text was updated successfully, but these errors were encountered: