Skip to content

Commit

Permalink
Strip parans from path when doing remote_as in get_route_to
Browse files Browse the repository at this point in the history
  • Loading branch information
bewing committed May 22, 2018
1 parent 3f0ed0d commit f07bbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion napalm/eos/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ def get_route_to(self, destination='', protocol=''):
for bgp_route_details in bgp_routes:
bgp_route = route.copy()
as_path = bgp_route_details.get('asPathEntry', {}).get('asPath', u'')
remote_as = int(as_path.split()[-1])
remote_as = int(as_path.strip("()").split()[-1])
remote_address = napalm.base.helpers.ip(bgp_route_details.get(
'routeDetail', {}).get('peerEntry', {}).get('peerAddr', ''))
local_preference = bgp_route_details.get('localPreference')
Expand Down

0 comments on commit f07bbcd

Please sign in to comment.