Skip to content

Commit

Permalink
Fix IOS interface link template uptime issue (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbauer1 authored Sep 26, 2024
1 parent d8f568e commit f591cb0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions ntc_templates/templates/cisco_ios_show_interface_link.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Value PORT (\S+)
Value NAME (.*?)
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})))
Value SINCE (.+?)
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}))
Value UPTIME ((([0-9]{1,2}m)?([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}))

Start
^\s*\^\s* -> EOF
Expand All @@ -25,7 +25,7 @@ DownSince
^. -> Error

UpTime
^\s*${PORT}\s+${NAME}\s+00:00:00\s+${UPTIME}?\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s+${DOWNTIME}\s+${UPTIME}?\s*$$ -> Record
^\s*${PORT}\s+${DOWNTIME}\s+${UPTIME}?\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s+${DOWNTIME}\s*$$ -> Record
^\s*$$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ parsed_sample:
port: "Gi1/0/1"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "0308-ab15mgm0007-d"
port: "Gi1/0/3"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "23PD-PDU-a"
port: "Gi1/0/5"
since: ""
Expand All @@ -20,37 +20,37 @@ parsed_sample:
port: "Gi1/0/11"
since: ""
uptime: ""
- downtime: "5d01h"
name: "3201-ab15erp0006-d 00:00:00"
- downtime: "00:00:00"
name: "3201-ab15erp0006-d"
port: "Gi1/0/15"
since: ""
uptime: ""
uptime: "5d01h"
- downtime: "30w5d"
name: "6502-ab15adc0001-d"
port: "Gi1/0/20"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "4512-ab15fil0001-s"
port: "Gi1/0/21"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "5803-gh01erp8003-d"
port: "Te1/0/26"
since: ""
uptime: "2w1d"
- downtime: "4d08h"
name: "53609-ab15sql0001-d 00:00:00"
- downtime: "00:00:00"
name: "53609-ab15sql0001-d"
port: "Te1/0/29"
since: ""
uptime: ""
- downtime: ""
uptime: "4d08h"
- downtime: "00:00:00"
name: "54024-ab15san009-s"
port: "Te1/0/30"
since: ""
uptime: "3w0d"
- downtime: ""
- downtime: "00:00:00"
name: "53PD-PDU-b"
port: "Te1/0/31"
since: ""
Expand All @@ -65,12 +65,12 @@ parsed_sample:
port: "Te1/0/33"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "5654-ab15msx0005-d"
port: "Te1/0/34"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "5665-ghsrv181-d"
port: "Te1/0/35"
since: ""
Expand All @@ -80,7 +80,7 @@ parsed_sample:
port: "Te1/0/37"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "5902-ab15srv0009-d"
port: "Te1/0/38"
since: ""
Expand All @@ -90,22 +90,22 @@ parsed_sample:
port: "Te1/0/39"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "5835-maintenance-d"
port: "Te1/0/41"
since: ""
uptime: "4w0d"
- downtime: ""
- downtime: "00:00:00"
name: "58029-maintenance-d"
port: "Te1/0/43"
since: ""
uptime: "4w0d"
- downtime: ""
- downtime: "00:00:00"
name: "Access Port"
port: "Te1/0/44"
since: ""
uptime: "01:59:13"
- downtime: ""
- downtime: "00:00:00"
name: "Access Port"
port: "Te1/0/45"
since: ""
Expand All @@ -130,7 +130,7 @@ parsed_sample:
port: "Te2/0/27"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "CRXNLLE1051AP51"
port: "Te2/0/29"
since: ""
Expand All @@ -140,17 +140,17 @@ parsed_sample:
port: "Gi1/0/13"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "DPYghZW1234WI001 L"
port: "Gi1/0/19"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "GFS-MGMT1"
port: "Gi1/0/24"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "ICE Port"
port: "Te1/0/31"
since: ""
Expand All @@ -160,27 +160,27 @@ parsed_sample:
port: "Te1/0/32"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "ITSghZW1561FW015-F"
port: "Te1/0/33"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "ITSghZWNB10"
port: "Te1/0/34"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "ITSghZWTL01.tld.co"
port: "Te1/0/36"
since: ""
uptime: "4w0d"
- downtime: ""
- downtime: "00:00:00"
name: "NO POLL 4507-ab15f"
port: "Te1/0/37"
since: ""
uptime: "14w0d"
- downtime: ""
- downtime: "00:00:00"
name: "Space Port"
port: "Te1/0/40"
since: ""
Expand All @@ -190,27 +190,27 @@ parsed_sample:
port: "Te1/0/42"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "dpyghzwnasc01n1r-i"
port: "Te1/0/43"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "itsghzwdd03m"
port: "Te1/0/44"
since: ""
uptime: "13w1d"
- downtime: ""
- downtime: "00:00:00"
name: "jnjghllnas02n1.hos"
port: "Te1/0/45"
since: ""
uptime: "14w0d"
- downtime: ""
- downtime: "00:00:00"
name: "to DGYghGF1234BV00"
port: "Gi2/0/2"
since: ""
uptime: "30w5d"
- downtime: ""
- downtime: "00:00:00"
name: "wlc-service-port-t"
port: "Gi2/0/3"
since: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ parsed_sample:
port: "Fo5/0/10"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link"
port: "Twe5/0/1"
since: ""
uptime: "9w4d"
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link VR"
port: "Twe5/0/1.602"
since: ""
uptime: "9w4d"
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link VRF"
port: "Twe5/0/1.603"
since: ""
Expand Down Expand Up @@ -55,17 +55,17 @@ parsed_sample:
port: "Fo6/0/10"
since: ""
uptime: ""
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link"
port: "Twe6/0/1"
since: ""
uptime: "9w4d"
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link VR"
port: "Twe6/0/1.602"
since: ""
uptime: "9w4d"
- downtime: ""
- downtime: "00:00:00"
name: "L3 Link VRF"
port: "Twe6/0/1.603"
since: ""
Expand Down

0 comments on commit f591cb0

Please sign in to comment.