Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return more specific with get_route_to() #735

Merged
merged 8 commits into from
Feb 16, 2020
Merged

Conversation

bewing
Copy link
Member

@bewing bewing commented May 22, 2018

Update base and eos drivers to support returning more specific prefixes in get_route_to()

Raise NotImplementedError on drivers that implement get_route_to() when kwarg longer is True

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 79.009% when pulling 95e77f5 on get_route_to_longer into d80d5d0 on develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 79.009% when pulling 95e77f5 on get_route_to_longer into d80d5d0 on develop.

@coveralls
Copy link

coveralls commented May 22, 2018

Coverage Status

Coverage remained the same at ?% when pulling 7c0d416 on get_route_to_longer into 511efd6 on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 79.009% when pulling 95e77f5 on get_route_to_longer into d80d5d0 on develop.

Copy link
Member

@mirceaulinic mirceaulinic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to get into 2.4.0, and best efforts anyone would contribute with the actual code for the rest of the platforms.

@dbarrosop
Copy link
Member

+1

@mirceaulinic mirceaulinic removed this from the 2.4.0 milestone Sep 25, 2019
@bewing
Copy link
Member Author

bewing commented Feb 6, 2020

I can't remember why this didn't get merged -- pretty stale at this point. Want me to refresh and review?

@ktbyers
Copy link
Contributor

ktbyers commented Feb 11, 2020

@bewing Sounds good to me.

@mirceaulinic
Copy link
Member

Hey @bewing - suppose it'd be too much to ask you to revisit this and resolve the conflicts? 😅

When retrieving a large number of BGP routes, grab all the routes for
a specific VRF in a single go, instead of collecting each individual
route's BGP details.

Newer versions of EOS (Confirmed on 4.20.7M) do not allow simultaneous
use of the longer-prefixes and detail modifers for "show ip bgp", so
detect this and fall back, resulting in lost peer addresses for the routes.
Since this only occurs when `longer` is True, it should be OK until the
vendor addresses the behavior change from 4.19 to 4.20
@bewing
Copy link
Member Author

bewing commented Feb 14, 2020

Rebased and resolved.

@mirceaulinic mirceaulinic merged commit a7f70fe into develop Feb 16, 2020
@mirceaulinic mirceaulinic deleted the get_route_to_longer branch February 16, 2020 20:13
@mirceaulinic
Copy link
Member

Yay, just merged in our oldest PR. Thanks @bewing 🙏

neelimapp pushed a commit to neelimapp/napalm that referenced this pull request Mar 20, 2020
* Add new kwarg `longer` to `get_route_to`

* Add method to test get_route_to with longer kwarg

* Update mock driver argument tests

* EOS implement get_route_to with longer kwarg

* Raise NotImplemented for other driver longer routes

* Update sphinx config for method alias

* Update mocked data path

* Cache BGP entries in get_route_to(longer=True)

When retrieving a large number of BGP routes, grab all the routes for
a specific VRF in a single go, instead of collecting each individual
route's BGP details.

Newer versions of EOS (Confirmed on 4.20.7M) do not allow simultaneous
use of the longer-prefixes and detail modifers for "show ip bgp", so
detect this and fall back, resulting in lost peer addresses for the routes.
Since this only occurs when `longer` is True, it should be OK until the
vendor addresses the behavior change from 4.19 to 4.20
bharath-ravindranath pushed a commit to bharath-ravindranath/napalm that referenced this pull request Apr 19, 2020
* Add new kwarg `longer` to `get_route_to`

* Add method to test get_route_to with longer kwarg

* Update mock driver argument tests

* EOS implement get_route_to with longer kwarg

* Raise NotImplemented for other driver longer routes

* Update sphinx config for method alias

* Update mocked data path

* Cache BGP entries in get_route_to(longer=True)

When retrieving a large number of BGP routes, grab all the routes for
a specific VRF in a single go, instead of collecting each individual
route's BGP details.

Newer versions of EOS (Confirmed on 4.20.7M) do not allow simultaneous
use of the longer-prefixes and detail modifers for "show ip bgp", so
detect this and fall back, resulting in lost peer addresses for the routes.
Since this only occurs when `longer` is True, it should be OK until the
vendor addresses the behavior change from 4.19 to 4.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants