Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Incorrect outer key returned for get_bgp_neighbors_detail() #115

Closed
mirceaulinic opened this issue Mar 23, 2017 · 1 comment
Closed

Incorrect outer key returned for get_bgp_neighbors_detail() #115

mirceaulinic opened this issue Mar 23, 2017 · 1 comment
Labels
Milestone

Comments

@mirceaulinic
Copy link
Member

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.

@mirceaulinic
Copy link
Member Author

Closed via 953f912

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant