Debian Codegraph @

ntc_templates/templates/cisco_ios_show_ip_eigrp_topology.textfsm

raw
1 Value Filldown PROCESS_ID (\d+)
2 Value Filldown ROUTER_ID (\d+\.\d+\.\d+\.\d+)
3 Value Required CODE (\S+)
4 Value ROUTE (\d+\.\d+\.\d+\.\d+)
5 Value MASK (\d+)
6 Value SUCCESSORS (\d+)
7 Value FD (\d+|Inaccessible)
8 Value TAG (\d+)
9 Value List ADV_ROUTER (\d+\.\d+\.\d+\.\d+|\w+)
10 Value List ADV_FD (\d+)
11 Value List ADV_RD (\d+)
12 Value List OUT_INTERFACE (\S+)
13 Value SOURCE (R\S+)
14
15 Start
16 # Captures Process ID and Router ID
17 ^.+AS\(${PROCESS_ID}\)/ID\(${ROUTER_ID}\)
18 # Skips over the code line that explains what each code means
19 ^Codes:
20 # Skips over the definitions for the codes
21 ^\s*\S\s-\s\S+
22 # Matches a route and captures if ${TAG} is use for the route and then moves to Gateway section
23 ^${CODE}\s+${ROUTE}/${MASK},\s+${SUCCESSORS}\s+successors,\s+FD\s+is\s+${FD},\s+tag\s+is\s+${TAG} -> Gateway
24 # Matches a route and captures it and then moves to Gateway section
25 ^${CODE}\s+${ROUTE}/${MASK},\s+${SUCCESSORS}\s+successors,\s+FD\s+is\s+${FD} -> Gateway
26 # If it doesn't match anything above, this just acknowledges a new line
27 ^\s*$$
28 # This will throw an error if there are no matches
29 ^. -> Error
30
31 Gateway
32 # This captures adv router, FD to router, and Reported Distance(RD)
33 ^\s*via\s+${ADV_ROUTER}\s+\(${ADV_FD}/${ADV_RD}\),\s+${OUT_INTERFACE}
34 # This captures the advertising router and outgoing interface
35 ^\s*via\s+${ADV_ROUTER},\s+${OUT_INTERFACE}
36 # This captures the scenarion where the route is injected via Redistribution.
37 ^\s*via\s+${SOURCE}
38 # This will not capture anything but if it encounters another route, it will continue and record what it already captured
39 ^\S+\s+(?:\d+(?:\.|)){4}/\d+,\s+\d+\s+successors -> Continue.Record
40 # These are the same as above and capture the next set of routes
41 ^${CODE}\s+${ROUTE}/${MASK},\s+${SUCCESSORS}\s+successors,\s+FD\s+is\s+${FD},\s+tag\s+is\s+${TAG}
42 ^${CODE}\s+${ROUTE}/${MASK},\s+${SUCCESSORS}\s+successors,\s+FD\s+is\s+${FD}
43 # If it encounters another AS/Router ID it will continue and record what it just captured
44 ^.+AS\(\d+\)/ID -> Continue.Record
45 # If it encounters it again, it will continue, but clear all captured data other than Filldown Values
46 ^.+AS\(\d+\)/ID -> Continue.Clearall
47 # It will start the process over again if it encounters a new process ID / router id
48 ^.+AS\(${PROCESS_ID}\)/ID\(${ROUTER_ID}\)
49 ^Codes: -> Start
50 # If it doesn't match anything above, this just acknowledges a new line
51 ^\s*$$
52 # This will throw an error if there are no matches
53 # Capture time-stamp if vty line has command time-stamping turned on
54 ^Load\s+for\s+
55 ^Time\s+source\s+is
56 ^. -> Error
57