genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

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

Open fmabille09 opened this issue 3 years ago • 1 comments

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 - https://github.com/CiscoTestAutomation/genieparser/issues/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:

  • [X] 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.

fmabille09 avatar Aug 25 '22 09:08 fmabille09

Thanks for your contribution @fmabille09

sjpatel21 avatar Aug 30 '22 21:08 sjpatel21