Skip to content

Commit 7fcccf0

Browse files
evilmonkey19mjbear
andauthored
Added template for Alcatel AOS: show interfaces port (#1908)
Co-authored-by: Michael Bear <[email protected]>
1 parent 50949b6 commit 7fcccf0

File tree

4 files changed

+123
-0
lines changed

4 files changed

+123
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Value PORT (\S+)
2+
Value PERMANENT_SHUTDOWN (\*?)
3+
Value ADMIN_STATUS (\S+)
4+
Value LINK_STATUS (\S+)
5+
Value VIOLATIONS (\S+)
6+
Value RECOVERY_TIME (\d+)
7+
Value RECOVERY_MAX (\d+)
8+
Value WTR_RUNNING (\#?)
9+
Value WTR_TIME (\d+)
10+
Value ALIAS (.*)
11+
12+
Start
13+
^\s*-+\+ -> Table
14+
^Legends: WTR - Wait To Restore
15+
^\s+#
16+
^\s+\*
17+
^\s*Slot/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$
18+
^\s*Port\s+Status\s+Status\s+Time\s+Max\s+\(sec\)\s*$$
19+
^\s*$$
20+
^.*$$ -> Error
21+
22+
Table
23+
^\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
24+
^\s*$$
25+
^.*$$ -> Error

ntc_templates/templates/index

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Template, Hostname, Platform, Command
1414
alcatel_aos_show_lldp_remote-system.textfsm, .*, alcatel_aos, sh[[ow]] lldp r[[emote-system]]
1515
alcatel_aos_show_interfaces_status.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] st[[atus]]
1616
alcatel_aos_show_mac-address-table.textfsm, .*, alcatel_aos, sh[[ow]] mac-(a[[ddress-table]]|l[[earning]])
17+
alcatel_aos_show_interfaces_port.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] p[[ort]]
1718
alcatel_aos_show_port-security.textfsm, .*, alcatel_aos, sh[[ow]] port-[[security]]
1819
alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
1920
alcatel_aos_show_chassis.textfsm, .*, alcatel_aos, sh[[ow]] ch[[assis]]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Legends: WTR - Wait To Restore
2+
# - WTR Timer is Running & Port is in wait-to-restore state
3+
* - Permanent Shutdown
4+
5+
Slot/ Admin Link Violations Recovery Recovery WTR Alias
6+
Port Status Status Time Max (sec)
7+
------+----------+---------+----------+----------+----------+----------+-----------------------------------------
8+
*1/1 enable up none 300 10 0 "Hello"
9+
1/2 enable down none 300 10 0 ""
10+
1/11 enable down none 300 10 # 10 ""
11+
1/17 disable down none 300 10 0 ""
12+
1/23 disable down none 300 10 0 ""
13+
1/25 enable up none 300 10 0 ""
14+
1/26 enable down none 300 10 0 ""
15+
1/28 enable down none 0 0 0 ""
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
parsed_sample:
3+
- admin_status: "enable"
4+
alias: "Hello"
5+
link_status: "up"
6+
permanent_shutdown: "*"
7+
port: "1/1"
8+
recovery_max: "10"
9+
recovery_time: "300"
10+
violations: "none"
11+
wtr_running: ""
12+
wtr_time: "0"
13+
- admin_status: "enable"
14+
alias: ""
15+
link_status: "down"
16+
permanent_shutdown: ""
17+
port: "1/2"
18+
recovery_max: "10"
19+
recovery_time: "300"
20+
violations: "none"
21+
wtr_running: ""
22+
wtr_time: "0"
23+
- admin_status: "enable"
24+
alias: ""
25+
link_status: "down"
26+
permanent_shutdown: ""
27+
port: "1/11"
28+
recovery_max: "10"
29+
recovery_time: "300"
30+
violations: "none"
31+
wtr_running: "#"
32+
wtr_time: "10"
33+
- admin_status: "disable"
34+
alias: ""
35+
link_status: "down"
36+
permanent_shutdown: ""
37+
port: "1/17"
38+
recovery_max: "10"
39+
recovery_time: "300"
40+
violations: "none"
41+
wtr_running: ""
42+
wtr_time: "0"
43+
- admin_status: "disable"
44+
alias: ""
45+
link_status: "down"
46+
permanent_shutdown: ""
47+
port: "1/23"
48+
recovery_max: "10"
49+
recovery_time: "300"
50+
violations: "none"
51+
wtr_running: ""
52+
wtr_time: "0"
53+
- admin_status: "enable"
54+
alias: ""
55+
link_status: "up"
56+
permanent_shutdown: ""
57+
port: "1/25"
58+
recovery_max: "10"
59+
recovery_time: "300"
60+
violations: "none"
61+
wtr_running: ""
62+
wtr_time: "0"
63+
- admin_status: "enable"
64+
alias: ""
65+
link_status: "down"
66+
permanent_shutdown: ""
67+
port: "1/26"
68+
recovery_max: "10"
69+
recovery_time: "300"
70+
violations: "none"
71+
wtr_running: ""
72+
wtr_time: "0"
73+
- admin_status: "enable"
74+
alias: ""
75+
link_status: "down"
76+
permanent_shutdown: ""
77+
port: "1/28"
78+
recovery_max: "0"
79+
recovery_time: "0"
80+
violations: "none"
81+
wtr_running: ""
82+
wtr_time: "0"

0 commit comments

Comments
 (0)