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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

evilmonkey19
Copy link
Contributor

No description provided.

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! 😀

@evilmonkey19
Copy link
Contributor Author

I commited your sugggestion @mjbear and I also fixed a small bug with the alias (the ""). Do you have any suggestion on how to catch it in a more elegant way?

@mjbear
Copy link
Contributor

mjbear commented Nov 25, 2024

I commited your sugggestion @mjbear and I also fixed a small bug with the alias (the ""). Do you have any suggestion on how to catch it in a more elegant way?

Hello!
By the looks of the raw output, the pair of double quotes are there regardless if there's alias text or not.
I'd guess you could make one of those other lines "Hello World". Two words with spaces. This is possible, right?

I'll figure yes and at that point we can make the ALIAS regex capture spaces, but also make it optional. There are at least two ways, but I'll stick with the simplest by using .* for ALIAS. Look out for my edit where I anchor with the double quotes that seem to always be there. 😁

On WTR, I'll have to look at the manual and we try to get it to happen. Do you have AOS devices that in dev/test environment? 😜

Comment on lines +10 to +14
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Value ALIAS (.*)
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

Simple regex for ALIAS that will match zero or more characters, including spaces.

  • single words
  • multiple words separated by spaces
  • empty strings are fine too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants