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

Standardize VRF Regex for IOSXE show_vrf.py #804

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

Conversation

mattchilders
Copy link

Currently ShowVrf doesn't match all valid special characters in VRF names, and uses different regexes for different commands throughout show_vrf.py. This change standardizes the regexes to all be the same and matches the special characters.

Description

This is a minor commit that standardizes the vrf regex in "show_vrf.py" so that they all use the [\S]+ rather than the mix of regexes that matched only certain special characters. This makes iosxe's show_vrf.py comparable with nxos's show_vrf.py.

Motivation and Context

IOS-XE parser didn't match VRF's with special characters.

Impact (If any)

None that I'm aware of

Screenshots:

Screenshot's of the relevant tests that had classes changed.
ShowVrf
image
ShowVrfDetail
image
ShowVRFIPv6
image
ShowPlatformSoftwareCefIpVrf
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.

Currently ShowVrf doesn't match all valid special characters in VRF
names, and uses different regexes for different commands throughout
show_vrf.py. This change standardizes the regexes to all be the same
and matches the special characters.
Copy link
Collaborator

@ThomasJRyan ThomasJRyan left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! I like the unit test you added. Never really considered having more generic tests like that

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