Debian Codegraph @

ntc_templates/templates/cisco_nxos_show_forwarding_adjacency.textfsm

raw
1 # Nexus 7k have multiple slots
2 Value Filldown SLOT (\d+)
3 Value Required NEXTHOP ((?:\d{1,3}\.){3}\d{1,3})
4 Value Required REWRITE (\S+)
5 Value Required INTERFACE (\S+)
6 Value ORIGIN_AS (\S+)
7 Value PEER_AS (\S+)
8 Value NEIGHBOR (\S+)
9
10 Start
11 # Extract slot #, if available (Nexus 7k)
12 ^slot\s+${SLOT}
13 ^====
14 # Match headers
15 ^IPv4\s+adjacency\s+information
16 ^next-hop\s+rewrite\s+info\s+interface\s*$$ -> Entries
17 ^next-hop\s+rewrite\s+info\s+interface\s+Origin\s+AS\s+Peer\s+AS\s+Neighbor -> EntriesDetail
18 # Empty and unknowns lines
19 ^\s*$$
20 ^. -> Error
21
22 Entries
23 # Ignore delimiter
24 ^--------
25 # Match single adjacency entry (brief view)
26 ^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE} -> Record
27 # New slot?
28 ^slot\s+${SLOT} -> Start
29 # Empty and unknowns lines
30 ^\s*$$
31 ^. -> Error
32
33 EntriesDetail
34 # Ignore delimiter
35 ^--------
36 # Match single adjacency entry (detailed view)
37 ^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE}\s*(?:${ORIGIN_AS}\s+${PEER_AS}\s+${NEIGHBOR})? -> Record
38 # New slot?
39 ^slot\s+${SLOT} -> Start
40 # Empty and unknowns lines
41 ^\s*$$
42 ^. -> Error