Closed mirceaulinic closed 7 years ago
@mirceaulinic - From my perspective #138 is good - single int value returned.
Both items can be closed from my testing.
This does still leave one item that is likely a separate issue, but I will mention it here since one solution would touch this code and relates somewhat to #139:
In JunOS we now have:
get_bgp_neighbors(): Outer key values: global
get_bgp_neighbors_detail(): Outer key values: global
Where both outer keys are now (correctly) listed as global. (I say correct since the documentation for get_bgp_neighbors indicates that the first (outer) dictionary will be 'global' if there is no VRF. )
However, run the same basic query against a Cisco XR box and you get:
get_bgp_neighbors(): Outer key values: global
get_bgp_neighbors_detail(): Outer key values: default
JunOS returns 'global' for both calls when there is no VRF, however IOSXR returns 'global' for the neighbor() call but 'default' for the neighbor_detail().
Either best to rename/default everything to 'default' or everything to 'global' - probably not wise to return different values for different OS types. I did have a collision on the XR side as well when both values came back different. Relative to #139 one option is to convert all things to 'default' from global.
Perhaps this is better addressed on the Cisco side. Otherwise code runs great.
JunOS returns 'global' for both calls when there is no VRF, however IOSXR returns 'global' for the neighbor() call but 'default' for the neighbor_detail().
@jeffgallagher that is a bug on the IOSXR side, everything should be global
for consistency. It's actually reported already: https://github.com/napalm-automation/napalm-iosxr/issues/115
@mirceaulinic looks like CI is broken
Yes @dbarrosop - I will com back to this and find the cause.
@jeffgallagher I have applied some changes, could you please try again? What Junos version do you have? Would you be able to test agains Junos < 13 and Junos > 13?
@dbarrosop the CI is fixed, but I would like to have another testcase for Junos > 13.
I have identified a major bug in this method: https://github.com/napalm-automation/napalm-junos/issues/149 I think we need to refactor it from scratch and decline this PR, but first let me come redesign and code.
I am going to merge this PR for the test cases & other testing features. Refactoring to follow