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

Fix 3 line output for nxos ShowBgpVrfAllAllSummary #803

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattchilders
Copy link

On NXOS if the IPv6 address is too long it will cause the other values to wrap to a new line. If the AS on the second line is too long (in the case of a 4-byte ASN) it will wrap to a third line. Like below:

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down...
2001:db8:c006:ff:251::1
4 406942
0 0 0 0 0 05:49:52 Idle

Currently the parser will error out on 3-line cases, and this change adds a fix to parse them correctly. The fix adds a p8_2_1 regex that matches the 2nd line. In 3-line case, p8_1 will match the neighbor, the newly added p8_2_1 will match the version and AS, and the existing p8_4 will match the remaining values.

Description

Motivation and Context

This changes fixes a bug with BGP 3-line outputs on NXOS

Impact (If any)

None that I'm aware of

Screenshots:

image

Checklist:

  • [ x ] I have updated the changelog.
  • I have updated the documentation (If applicable).
  • [ x ] I have added tests to cover my changes (If applicable).
  • [ x ] All new and existing tests passed.
  • All new code passed compilation.

On NXOS if the IPv6 address is too long it will cause the other values
to wrap to a new line. If the AS on the second line is too long (in the
case of a 4-byte ASN) it will wrap to a third line. Like below:

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down...
2001:db8:c006:ff:251::1
                4 406942
                              0       0        0    0    0 05:49:52 Idle

Currently the parser will error out on 3-line cases, and this change
adds a fix to parse them correctly. The fix adds a p8_2_1 regex that
matches the 2nd line. In 3-line case, p8_1 will match the neighbor,
the newly added p8_2_1 will match the version and AS, and the existing
p8_4 will match the remaining values.
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.

1 participant