You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Value Required,Filldown ACL_TYPE (Standard|Extended)
Value Required,Filldown ACL_NAME (\S+)
Value LINE_NUM (\d+)
Value ACTION (permit|deny)
Value PROTOCOL (\S+)
Value SRC_HOST (\d+\.\d+\.\d+\.\d+)
Value SRC_ANY (any)
Value SRC_NETWORK (\d+\.\d+\.\d+\.\d+)
Value SRC_WILDCARD (\d+\.\d+\.\d+\.\d+)
Value SRC_PORT_MATCH (eq|neq|range|lt|gt)
Value SRC_PORT ((?<!range\s).+?)
Value SRC_PORT_RANGE_START ((?<=range\s)\S+)
Value SRC_PORT_RANGE_END (\S+)
Value DST_HOST (\d+\.\d+\.\d+\.\d+)
Value DST_ANY (any)
Value DST_NETWORK (\d+\.\d+\.\d+\.\d+)
Value DST_WILDCARD (\d+\.\d+\.\d+\.\d+)
Value DST_PORT_MATCH (eq|neq|range|lt|gt)
Value DST_PORT ((?<!range\s).+?)
Value DST_PORT_RANGE_START ((?<=range\s)\S+)
Value DST_PORT_RANGE_END (\S+)
Value FLAGS_MATCH (match-all|match-any)
Value TCP_FLAG (((\+|-|)ack(\s*?)|(\+|-|)established(\s*?)|(\+|-|)fin(\s*?)|(\+|-|)fragments(\s*?)|(\+|-|)psh(\s*?)|(\+|-|)rst(\s*?)|(\+|-|)syn(\s*?)|urg(\s*?))+)
Value LOG (log-input|log)
Value ICMP_TYPE (echo|echo-reply|administratively-prohibited|unreachable|port-unreachable|redirect|router-advertisement|router-solicitation|packet-too-big|time-exceeded|ttl-exceeded|parameter-problem)
Value TIME (\S+)
Value STATE (inactive|active)
Value MATCHES (\d+)
Start
^(Standard|Extended) -> Continue.Clearall
^${ACL_TYPE}\s+IP\s+access\s+list\s+${ACL_NAME}\s* -> Record
^\s+${LINE_NUM}\s+${ACTION}\s+${PROTOCOL}\s+(host\s+${SRC_HOST}|${SRC_ANY}|${SRC_NETWORK}\s+${SRC_WILDCARD})(\s+${SRC_PORT_MATCH}\s+|)(${SRC_PORT_RANGE_START}\s+${SRC_PORT_RANGE_END}|${SRC_PORT}|)\s+(host\s+${DST_HOST}|${DST_ANY}|${DST_NETWORK}\s+${DST_WILDCARD})(\s+${DST_PORT_MATCH}\s+(${DST_PORT_RANGE_START}\s+${DST_PORT_RANGE_END}|${DST_PORT}|)|\s+(${FLAGS_MATCH}\s+|)${TCP_FLAG}|)(\s+${ICMP_TYPE}|)(\s+${LOG}|)(\s+time-range\s+${TIME}\s+\(${STATE}\)|)(?:\s+\(${MATCHES}\s+\S+\)|)\s*$$ -> Record
^\s+${LINE_NUM}\s+${ACTION}\s+(${SRC_NETWORK},\s+wildcard\s+bits\s+${SRC_WILDCARD}|${SRC_HOST}|${SRC_ANY})(\s+${LOG}|)(\s+time-range\s+${TIME}\s+\(${STATE}\)|)(?:\s+\(${MATCHES}\s+matches\)|)\s*$$ -> Record
^\s*$$
# Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
^.* -> Error "Could not parse line:"
EOF
SAMPLE COMMAND OUTPUT
Extended IP access list 111
10 deny esp any any precedence internet
20 deny esp any any tos normal
SUMMARY
Value SRC_PORT_MATCH (eq|neq|range|lt|gt)
Value DST_PORT_MATCH (eq|neq|range|lt|gt)
needs to be
Value SRC_PORT_MATCH (eq|neq|precedence|range|tos|lt|gt)
Value DST_PORT_MATCH (eq|neq|precedence|range|tos|lt|gt)
STEPS TO REPRODUCE
Execute above template against raw output.
EXPECTED RESULTS
For the template to return with the lines provided in raw as parsed objects.
ACTUAL RESULTS
The textfsm parser failed.
TextFSMError Error occurred while running "show ip access-list".
Error: "Could not parse line:".
The text was updated successfully, but these errors were encountered:
nsnelson402
pushed a commit
to nsnelson402/ntc-templates
that referenced
this issue
Jul 30, 2021
ISSUE TYPE
TEMPLATE USING
https://github.com/networktocode/ntc-templates/blob/master/ntc_templates/templates/cisco_ios_show_ip_access-lists.textfsm
SAMPLE COMMAND OUTPUT
SUMMARY
Value SRC_PORT_MATCH (eq|neq|range|lt|gt)
Value DST_PORT_MATCH (eq|neq|range|lt|gt)
needs to be
Value SRC_PORT_MATCH (eq|neq|precedence|range|tos|lt|gt)
Value DST_PORT_MATCH (eq|neq|precedence|range|tos|lt|gt)
STEPS TO REPRODUCE
Execute above template against raw output.
EXPECTED RESULTS
For the template to return with the lines provided in raw as parsed objects.
ACTUAL RESULTS
The textfsm parser failed.
The text was updated successfully, but these errors were encountered: