Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* junos: normalize ipv6 address bgp peer in routing-instance

* fix E501 line too long
  • Loading branch information
ckishimo authored and cspeidel committed Aug 9, 2018
1 parent 05b2763 commit 4ca1354
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions napalm/junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,11 @@ def _get_bgp_neighbors_core(neighbor_data, instance=None, uptime_table_items=Non
if not uptime_table_items:
uptime_table_items = _get_uptime_table(instance)
for neighbor, uptime in uptime_table_items:
if neighbor not in bgp_neighbor_data[instance_name]['peers']:
bgp_neighbor_data[instance_name]['peers'][neighbor] = {}
bgp_neighbor_data[instance_name]['peers'][neighbor]['uptime'] = uptime[0][1]
normalized_neighbor = napalm.base.helpers.ip(neighbor)
if normalized_neighbor not in bgp_neighbor_data[instance_name]['peers']:
bgp_neighbor_data[instance_name]['peers'][normalized_neighbor] = {}
bgp_neighbor_data[instance_name]['peers'][normalized_neighbor]['uptime'] = \
uptime[0][1]

# Commenting out the following sections, till Junos
# will provide a way to identify the routing instance name
Expand Down

0 comments on commit 4ca1354

Please sign in to comment.