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

Remove space on regex for command "show isis adjacency vrf" #696

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fmabille09
Copy link

@fmabille09 fmabille09 commented Aug 25, 2022

BEFORE : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P\S+)$')
AFTER : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF:+(?P\S+)$')

Remove the space after "VRF:" in the regex.

Description

Support issue link - #693

Motivation and Context

On some n9k, when launching command: "show isis adjacency vrf all", the output put a whitespace or not after VRF. So the output can be
"IS-IS process: process_id VRF: default" or "IS-IS process: process_id VRF:default"

But actually the parser only support a white space.

p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P\S+)$')"

Impact (If any)

Change regex on parser to support whitespace or not

Screenshots:

Checklist:

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

BEFORE : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P<vrf>\S+)$')
AFTER   : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF:+(?P<vrf>\S+)$')

Remove the space after "VRF:" in the regex.
@fmabille09 fmabille09 requested a review from a team as a code owner August 25, 2022 09:30
@sjpatel21
Copy link

Thanks for your contribution @fmabille09

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