Skip to content

Commit

Permalink
Adding template for Alcatel AOS (only R8): show interfaces alias
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 committed Dec 13, 2024
1 parent 3aad889 commit 98fecbe
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ntc_templates/templates/alcatel_aos_show_interfaces_alias.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Value PORT (\S+)
Value ADMIN_STATUS (\S+)
Value LINK_STATUS (\S+)
Value WAIT_TO_RESTORE (\d+)
Value WAIT_TO_SHUTDOWN (\d+)
Value ALIAS (.*)

Start
^\s*-+\+ -> Table
^\s*Chas\/\s*$$
^\s*Slot\/\s+Admin\s+Link\s+WTR\s+WTS\s+Alias\s*$$
^\s*Port\s+Status\s+Status\s+\(sec\)\s+\(msec\)\s*$$
^\s*$$
^.*$$ -> Error

Table
^\s*${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${WAIT_TO_RESTORE}\s+${WAIT_TO_SHUTDOWN}\s+"${ALIAS}"\s*$$ -> Record
^\s*$$
^.*$$ -> Error
2 changes: 2 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
#
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_alias.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] al[[ias]]
alcatel_aos_show_interfaces_port.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] p[[ort]]
alcatel_aos_show_linkagg_alias.textfsm, .*, alcatel_aos, sh[[ow]] li[[nkagg]] al[[ias]]
alcatel_aos_show_port-security.textfsm, .*, alcatel_aos, sh[[ow]] port-[[security]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Chas/
Slot/ Admin Link WTR WTS Alias
Port Status Status (sec) (msec)
--------+----------+---------+----------+----------+-----------------------
1/1/1 enable up 0 0 "This is an example"
2/1/10 enable down 0 0 "This_is_an_example"
2/1/11 enable down 0 0 "This"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
parsed_sample:
- admin_status: "enable"
alias: "This is an example"
link_status: "up"
port: "1/1/1"
wait_to_restore: "0"
wait_to_shutdown: "0"
- admin_status: "enable"
alias: "This_is_an_example"
link_status: "down"
port: "2/1/10"
wait_to_restore: "0"
wait_to_shutdown: "0"
- admin_status: "enable"
alias: "This"
link_status: "down"
port: "2/1/11"
wait_to_restore: "0"
wait_to_shutdown: "0"

0 comments on commit 98fecbe

Please sign in to comment.