Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added template for Alcatel AOS: show interfaces port #1908

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Value PORT ((\d+\/?)+)
evilmonkey19 marked this conversation as resolved.
Show resolved Hide resolved
Value WTR_RUNNING (\#?)
Value PERMANENT_SHUTDOWN (\*?)
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
Value ADMIN_STATUS (\S+)
Value LINK_STATUS (\S+)
Value VIOLATIONS (\S+)
Value RECOVERY_TIME (\d+)
Value RECOVERY_MAX (\d+)
Value WTR_TIME (\d+)
Value ALIAS (\S.+\S)

Start
^\s*-+\+
^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+(""|"${ALIAS}")\s*$$ -> Record
evilmonkey19 marked this conversation as resolved.
Show resolved Hide resolved
^\s*
evilmonkey19 marked this conversation as resolved.
Show resolved Hide resolved
^.*$$ -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#
Template, Hostname, Platform, Command

alcatel_aos_show_interfaces_port.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] p[[ort]]
alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
alcatel_aos_show_vlan.textfsm, .*, alcatel_aos, show vlan

Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evilmonkey19
Might you have or be able to get raw data where the # Wait To Restore is in effect?

This would improve the test data! Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't :(. Either I know how to make it work. It is an option that i know it exists but I don't use it at all. If it happens that you know hot to make it work I have equipment to get the output :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't :(. Either I know how to make it work. It is an option that i know it exists but I don't use it at all. If it happens that you know hot to make it work I have equipment to get the output :)

Page 1-33 (or search for interfaces wait-to-restore)

interfaces {slot chassis/slot| port chassis/slot/port[-port2]} wait-to-restore num

https://www.al-enterprise.com/-/media/assets/internet/documents/omniswitch-aos-release-810r1-cli-reference-user-guide-rev-a-en.pdf

@evilmonkey19
From the sounds of it, once you set a "wait to restore" timer on a (spare?) port, cause the port to shutdown (I would think the easiest is to administratively shut the port down from the CLI then grab output.

Let me know how that goes! 😀

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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/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,72 @@
---
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: "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"
Loading