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

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? 😜

@evilmonkey19
Copy link
Contributor Author

Implementing the \s* has the issue that the tests don't work. How can i make them work in this case?

@mjbear
Copy link
Contributor

mjbear commented Nov 28, 2024

@evilmonkey19
Another thing - could you try to get Wait To Restore output?

🔥 Here's my notes from earlier.
#1908 (comment)

@evilmonkey19
Copy link
Contributor Author

@evilmonkey19 Another thing - could you try to get Wait To Restore output?

🔥 Here's my notes from earlier. #1908 (comment)

This is a raw output using the commands you suggest :)

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 ""
  1/2    enable      down      none           300         10          0 ""
  1/3    enable      down      none           300         10          0 ""
  1/4    enable      down      none           300         10          0 ""
  1/5    enable      down      none           300         10          0 ""
  1/6    enable      down      none           300         10          0 ""
  1/7    enable      down      none           300         10          0 ""
  1/8    enable      down      none           300         10          0 ""
  1/9    enable      down      none           300         10          0 ""
  1/10   enable      down      none           300         10          0 ""
  1/11   enable      down      none           300         10       # 10 ""
  1/12   enable      down      none           300         10          0 ""
  1/13   enable      down      none           300         10          0 ""
  1/14   enable      down      none           300         10          0 ""
  1/15   enable      down      none           300         10          0 ""
  1/16   enable      down      none           300         10          0 ""
  1/17   enable      down      none           300         10          0 ""
  1/18   enable      down      none           300         10          0 ""
  1/19   enable      down      none           300         10          0 ""
  1/20   enable      down      none           300         10          0 ""
  1/21   enable      down      none           300         10          0 ""
  1/22   enable      down      none           300         10          0 ""
  1/23   enable      down      none           300         10          0 ""
  1/24   enable      down      none           300         10          0 ""
  1/25   enable      down      none           300         10          0 ""
  1/26   enable      down      none           300         10          0 ""
  1/27   enable      down      none             0          0          0 ""
  1/28   enable      down      none             0          0          0 ""

@mjbear
Copy link
Contributor

mjbear commented Dec 10, 2024

@evilmonkey19
I thought we changed PORT to be simpler \S+ similar to other templates. I'm going to put that suggestion forth.

There are fairly minor merge conflicts (I ran through fixing them just to see).

  • reordering lines in the index since more AOS templates were added
  • a couple of merge conflict resolutions in the textfsm template itself

Not horrible, but an extra obstacle before the automatic tests for this project run.
Since I rebased on a feature branch to test the conflict resolution this means commit hashes change. Whether I put forth a PR to you or you fix the conflicts in your branch by rebasing ... it will likely mean at least one force push from you.

@evilmonkey19
Copy link
Contributor Author

@evilmonkey19 I thought we changed PORT to be simpler \S+ similar to other templates. I'm going to put that suggestion forth.

There are fairly minor merge conflicts (I ran through fixing them just to see).

* reordering lines in the `index` since more AOS templates were added

* a couple of merge conflict resolutions in the textfsm template itself

Not horrible, but an extra obstacle before the automatic tests for this project run. Since I rebased on a feature branch to test the conflict resolution this means commit hashes change. Whether I put forth a PR to you or you fix the conflicts in your branch by rebasing ... it will likely mean at least one force push from you.

No problem :) I can do the force push for sure

@jmcgill298 jmcgill298 merged commit 7fcccf0 into networktocode:master Dec 11, 2024
14 checks passed
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.

3 participants