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

Return mtu -1 and speed -1.0 if regex does not find the data in nxos_ssh #1511

Merged

Conversation

ubaumann
Copy link
Contributor

I have a Nexus with a display bug. This PR should make the NXOS driver a little more stable but I tottaly understand if you don't want to merge it.

If the regex search for MTU and speed fails, MTU -1 and speed -1.0 will be returned instead.

The cisco bug I am facing:

On some interfaces it does not show the MTU in the show interface

Ethernet1/2/3 is down (Link not connected)
  Hardware: 10/100/1000 Ethernet, address: 0cd9.9608.0d6f (bia 0cd9.9608.0d6f)
, BW 23 Kbit, DLY 10 usec

Correct would be:

Ethernet1/2/3 is down (Link not connected)
  Hardware: 10/100/1000 Ethernet, address: 0cd9.9608.0d6f (bia 0cd9.9608.0d6f)
  MTU 9612 bytes, BW 23 Kbit, DLY 10 usec

napalm/nxos_ssh/nxos_ssh.py Outdated Show resolved Hide resolved
@ubaumann ubaumann requested a review from mirceaulinic October 19, 2021 01:14
Copy link
Member

@mirceaulinic mirceaulinic left a comment

Choose a reason for hiding this comment

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

Code looks good. Would you be able to add a test case for this?

@ubaumann
Copy link
Contributor Author

Of course. I copied the data from the normal test case and modiefierd it

@ubaumann ubaumann requested a review from mirceaulinic October 22, 2021 09:26
Copy link
Member

@mirceaulinic mirceaulinic left a comment

Choose a reason for hiding this comment

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

Thanks @ubaumann !

@mirceaulinic mirceaulinic merged commit 485ca4f into napalm-automation:develop Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants