-
Notifications
You must be signed in to change notification settings - Fork 549
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
Conversation
1 similar comment
There was a problem hiding this 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.
+1 |
I can't remember why this didn't get merged -- pretty stale at this point. Want me to refresh and review? |
@bewing Sounds good to me. |
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
e3a424c
to
7c0d416
Compare
Rebased and resolved. |
Yay, just merged in our oldest PR. Thanks @bewing 🙏 |
* 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
* 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
Update
base
andeos
drivers to support returning more specific prefixes inget_route_to()
Raise NotImplementedError on drivers that implement
get_route_to()
when kwarglonger
isTrue