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

Bgp neighbors not working #3

Open
helpdeskdan opened this issue Jan 21, 2020 · 2 comments
Open

Bgp neighbors not working #3

helpdeskdan opened this issue Jan 21, 2020 · 2 comments

Comments

@helpdeskdan
Copy link

>>> device.open()
>>> device.get_bgp_neighbors()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.7/dist-packages/napalm_netiron/netiron.py", line 1478, in get_bgp_neighbors
    IPV4_ADDR_REGEX, IPV6_ADDR_REGEX, ASN_REGEX), line)
  File "/usr/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
  File "/usr/lib/python3.7/re.py", line 286, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.7/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.7/sre_parse.py", line 924, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/lib/python3.7/sre_parse.py", line 420, in _parse_sub
    not nested and not items))
  File "/usr/lib/python3.7/sre_parse.py", line 813, in _parse
    source.tell() - start)
re.error: missing ), unterminated subpattern at position 4
>>>
@helpdeskdan
Copy link
Author

Sorry, I should have at least looked at it. It's an easy fix:

1476                 r'^\s+(?P({}|{}))\s+(?P({}))\s+(?P\S+)\s+'

To bold that missing parenthesis:
r'^\s+(?P<remote_addr>({}|{}))\s+(?P<remote_as>({}))\s+(?P\S+)\s+'

Some python3 fixes might be good - unicode for instance. Thkx for the project work.

@helpdeskdan
Copy link
Author

#*@&, rob has already fixed both - check the pull

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

No branches or pull requests

1 participant