Debian Codegraph @

ntc_templates/templates/cisco_nxos_show_forwarding_ipv4_route.textfsm

raw
1 Value PREFIX (\d+\.\d+\.\d+\.+\d+\/\d+)
2 Value Required,List NEXTHOP (Drop|Receive|Attached|\d+\.\d+\.\d+\.\d+)
3 Value List INTERFACE (\S+)
4
5 Start
6 ^Prefix.*Next.*Interface.*Labels.*Partial.*Install\s*$$ -> FIB
7 # N5K doesn't have Partial Install field
8 ^Prefix.*Next.*Interface.*Labels\s*$$ -> FIB
9
10 FIB
11 # Start Record on encountering a Prefix, don't substitute any values yet
12 ^\*?(\d+\.\d+\.\d+\.+\d+\/\d+) -> Continue.Record
13 # Match lines with all Values present, some entries can start with * (for multiple entries in RIB, one in FIB prefixes)
14 ^\*?${PREFIX}\s+${NEXTHOP}\s+${INTERFACE}\s*$$
15 # Match lines which do not have an interface, strange but can exists
16 ^\*?${PREFIX}\s+${NEXTHOP}\s*$$
17 # Match lines which have Nexthop and interface, and fill in the list; these are for prefixes which have multiple equal cost paths
18 ^\s+${NEXTHOP}\s+${INTERFACE}\s*$$
19 # Match other lines before erroring out on unknown input lines
20 ^\s*$$
21 ^[-+]*$$
22 ^. -> Error
23