Debian Codegraph @

ntc_templates/templates/cisco_ios_show_interface_link.textfsm

raw
1 Value PORT ([a-zA-Z]{2,3}[0-9]{1,2}\/[0-9]{1,2}(\/[0-9]{1,2})?)
2 Value NAME (.+?)
3 Value DOWNTIME ((00:00:00)|(([0-9]{1,2} year[s]? , )?([0-9]{1,2} week[s]?, )?([0-9]{1,2} day[s]?, )?([0-9]{1,2} hour[s]?, )?([0-9]{1,2} minute[s]? )?([0-9]{1,2} secs))|((([0-9]{1,2}y)?([0-9]{1,2}w)?([0-9]{1,2}d)([0-9]{1,2}h)?|[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2})))
4 Value SINCE (.+?)
5 Value UPTIME ((([0-9]{1,2}m)?([0-9]{1,2}w)?([0-9]{1,2}d)|[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}))
6
7 Start
8 ^\s*\^\s* -> EOF
9 ^.*Invalid input detected.* -> EOF
10 ^Load\s+for\s+
11 # Capture time-stamp if vty line has command time-stamping turned on
12 ^Time\s+source\s+is
13 ^-+\s*$$
14 ^\s*Port\s+Name\s+Down Time\s+Down Since\s*$$ -> DownSince
15 ^\s*Port\s+Name\s+Down Time\s+Up Time\s*$$ -> UpTime
16 ^\s*$$
17 ^. -> Error
18
19 DownSince
20 ^\s*${PORT}\s+${DOWNTIME}\s*$$ -> Record
21 ^\s*${PORT}\s+${DOWNTIME}\s*${SINCE}\s*$$ -> Record
22 ^\s*${PORT}\s+${NAME}\s*${DOWNTIME}\s*$$ -> Record
23 ^\s*${PORT}\s+${NAME}\s*${DOWNTIME}\s+${SINCE}\s*$$ -> Record
24 ^\s*$$
25 ^. -> Error
26
27 UpTime
28 ^\s*${PORT}\s+${NAME}\s+00:00:00\s+${UPTIME}?\s*$$ -> Record
29 ^\s*${PORT}\s+${DOWNTIME}\s+${UPTIME}?\s*$$ -> Record
30 ^\s*${PORT}\s+${NAME}\s+${DOWNTIME}\s*$$ -> Record
31 ^\s*$$
32 ^. -> Error