Skip to content

Commit

Permalink
Added template for Alcatel AOS: show interfaces port (#1908)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Bear <[email protected]>
  • Loading branch information
evilmonkey19 and mjbear authored Dec 11, 2024
1 parent 50949b6 commit 7fcccf0
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Value PORT (\S+)
Value PERMANENT_SHUTDOWN (\*?)
Value ADMIN_STATUS (\S+)
Value LINK_STATUS (\S+)
Value VIOLATIONS (\S+)
Value RECOVERY_TIME (\d+)
Value RECOVERY_MAX (\d+)
Value WTR_RUNNING (\#?)
Value WTR_TIME (\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*$$
^.*$$ -> 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
^\s*$$
^.*$$ -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Template, Hostname, Platform, Command
alcatel_aos_show_lldp_remote-system.textfsm, .*, alcatel_aos, sh[[ow]] lldp r[[emote-system]]
alcatel_aos_show_interfaces_status.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] st[[atus]]
alcatel_aos_show_mac-address-table.textfsm, .*, alcatel_aos, sh[[ow]] mac-(a[[ddress-table]]|l[[earning]])
alcatel_aos_show_interfaces_port.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] p[[ort]]
alcatel_aos_show_port-security.textfsm, .*, alcatel_aos, sh[[ow]] port-[[security]]
alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
alcatel_aos_show_chassis.textfsm, .*, alcatel_aos, sh[[ow]] ch[[assis]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Legends: WTR - Wait To Restore
# - WTR Timer is Running & Port is in wait-to-restore state
* - Permanent Shutdown

Slot/ Admin Link Violations Recovery Recovery WTR Alias
Port Status Status Time Max (sec)
------+----------+---------+----------+----------+----------+----------+-----------------------------------------
*1/1 enable up none 300 10 0 "Hello"
1/2 enable down none 300 10 0 ""
1/11 enable down none 300 10 # 10 ""
1/17 disable down none 300 10 0 ""
1/23 disable down none 300 10 0 ""
1/25 enable up none 300 10 0 ""
1/26 enable down none 300 10 0 ""
1/28 enable down none 0 0 0 ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
parsed_sample:
- admin_status: "enable"
alias: "Hello"
link_status: "up"
permanent_shutdown: "*"
port: "1/1"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/2"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/11"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: "#"
wtr_time: "10"
- admin_status: "disable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/17"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "disable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/23"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "up"
permanent_shutdown: ""
port: "1/25"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/26"
recovery_max: "10"
recovery_time: "300"
violations: "none"
wtr_running: ""
wtr_time: "0"
- admin_status: "enable"
alias: ""
link_status: "down"
permanent_shutdown: ""
port: "1/28"
recovery_max: "0"
recovery_time: "0"
violations: "none"
wtr_running: ""
wtr_time: "0"

0 comments on commit 7fcccf0

Please sign in to comment.