ntc-templates
ntc-templates copied to clipboard
cisco_ios_show_alert_counters fails to parse empty space in front of Global Errors'
ISSUE TYPE
- Template Issue with error and raw data
TEMPLATE USING
Value Filldown interface (.+)
Value errorcode (.+)
Value timestamp (.+)
Value description (.+)
Value recommendation (.+)
Start
^Interface:\s+${interface} -> Clear
^Error Code:\s+${errorcode}
^Timestamp:\s+${timestamp}
^Description:\s+${description}
^Recommendation:\s+${recommendation} -> Record
^Global\s+Errors
^\s*$$
^. -> Error
EOF
SAMPLE COMMAND OUTPUT
Global Errors :
SUMMARY
The template fails to parse the space before Global Errors
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
textfsm.parser.TextFSMError: State Error raised. Rule Line: 15. Input Line: Global Errors:
The solution is to change line 13 of the template to below. I am going to submit a Pull Request later.
^\s*Global\s+Errors