You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.
According to the documentation both get_bgp_neighbors() and get_bgp_neighbors_detail() should: "Returns a dictionary of dictionaries. The keys for the first dictionary will be the vrf (global if no vrf)." However different values seem to be returned for the outer keys of each calls. (i.e. one is the vrf the other the routing instance?)
get_bgp_neighbors_detail() appears to return a dictionary of routing instances and not a dictionary containing the VRF as returned in get_bgp_neighbors(); it would seem that the get_bgp_neighbors_detail method should also return 'global' vrf as outer key. (only default/global VRF configured)
Verbatim copy from napalm-automation/napalm-base#227
According to the documentation both get_bgp_neighbors() and get_bgp_neighbors_detail() should: "Returns a dictionary of dictionaries. The keys for the first dictionary will be the vrf (global if no vrf)." However different values seem to be returned for the outer keys of each calls. (i.e. one is the vrf the other the routing instance?)
get_bgp_neighbors_detail() appears to return a dictionary of routing instances and not a dictionary containing the VRF as returned in get_bgp_neighbors(); it would seem that the get_bgp_neighbors_detail method should also return 'global' vrf as outer key. (only default/global VRF configured)
neighbor_facts = device.get_bgp_neighbors()
print("get_bgp_neighbors():")
for vrf in neighbor_facts:
print("Outer key values: " + vrf)
detail_facts = device.get_bgp_neighbors_detail()
print("get_bgp_neighbors_detail():")
for vrf in detail_facts:
print("Outer key values: " + vrf)
Results -
Cisco (ASR9010 - 5.3.3):
get_bgp_neighbors():
Outer key values: global
get_bgp_neighbors_detail():
Outer key values: default
JunOS (15.1F5-S4.6)
get_bgp_neighbors():
Outer key values: global
get_bgp_neighbors_detail():
Outer key values: inet6.0
Outer key values: inet.0
Outer key values: inetflow.0
JunOS (12.3R9.4)
get_bgp_neighbors():
Outer key values: global
get_bgp_neighbors_detail():
Outer key values: inet6.0
Outer key values: inet.0
Outer key values: inetflow.0
In examples above outer dict isn't returning the same value for both calls.
The text was updated successfully, but these errors were encountered: