Skip to content

Commit

Permalink
Update template Alcatel AOS: show interfaces port (#1939)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Dec 19, 2024
1 parent 5222ab9 commit 7cbb9e7
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,29 @@ Value RECOVERY_TIME (\d+)
Value RECOVERY_MAX (\d+)
Value WTR_RUNNING (\#?)
Value WTR_TIME (\d+)
Value WAIT_TO_SHUTDOWN (\d+)
Value ALIAS (.*)

Start
^\s*-+\+ -> Table
^Legends: WTR - Wait To Restore
^\s+#
^\s+\*
^\s*Slot/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$
^\s*Port\s+Status\s+Status\s+Time\s+Max\s+\(sec\)\s*$$
^\s+Chas\/\s*$$
^\s*Slot\/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$
^\s*Port\s+Status\s+Status\s+Time\s+Max\s+\(sec\)\s*$$ -> Table_1
^\s*Slot\/\s+Admin\s+Link\s+WTR\s+WTS\s+Alias\s*$$
^\s*Port\s+Status\s+Status\s+\(sec\)\s+\(msec\)\s*$$ -> Table_2
^\s*$$
^.*$$ -> Error

Table
^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+(?:${WTR_RUNNING}\s+)?${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record
Table_1
^\s*-+\s*
^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_RUNNING}\s+${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record
^\s*$$
^.*$$ -> Error

Table_2
^\s*-+\s*
^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${WTR_TIME}\s+${WAIT_TO_SHUTDOWN}\s+"${ALIAS}"\s*$$ -> Record
^\s*$$
^.*$$ -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
Expand All @@ -18,6 +19,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
Expand All @@ -28,6 +30,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: "#"
wtr_time: "10"
- admin_status: "disable"
Expand All @@ -38,6 +41,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "disable"
Expand All @@ -48,6 +52,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
Expand All @@ -58,6 +63,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
Expand All @@ -68,6 +74,7 @@ parsed_sample:
recovery_max: "10"
recovery_time: "300"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
Expand All @@ -78,5 +85,6 @@ parsed_sample:
recovery_max: "0"
recovery_time: "0"
violations: "none"
wait_to_shutdown: ""
wtr_running: ""
wtr_time: "0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Chas/
Slot/ Admin Link WTR WTS Alias
Port Status Status (sec) (msec)
--------+----------+---------+----------+----------+-----------------------
1/1/1 enable up 0 0 "This is a test"
1/1/2 enable up 0 0 "This_is_a_test"
1/1/3 enable up 0 0 "This"
1/1/4 enable up 0 0 ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
parsed_sample:
- admin_status: "enable"
alias: "This is a test"
link_status: "up"
permanent_shutdown: ""
port: "1/1/1"
recovery_max: ""
recovery_time: ""
violations: ""
wait_to_shutdown: "0"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: "This_is_a_test"
link_status: "up"
permanent_shutdown: ""
port: "1/1/2"
recovery_max: ""
recovery_time: ""
violations: ""
wait_to_shutdown: "0"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: "This"
link_status: "up"
permanent_shutdown: ""
port: "1/1/3"
recovery_max: ""
recovery_time: ""
violations: ""
wait_to_shutdown: "0"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "up"
permanent_shutdown: ""
port: "1/1/4"
recovery_max: ""
recovery_time: ""
violations: ""
wait_to_shutdown: "0"
wtr_running: ""
wtr_time: "0"

0 comments on commit 7cbb9e7

Please sign in to comment.