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
bgpv1: Add GetRoutes method to Router interface and generic Path type #26803
Conversation
87f7bf3
to
8736d6d
Compare
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.
Thanks for taking over this! Overall looks good except some minor things. Could you consider consolidating last two commits into first two? So that we will have a clean commit history.
Add a new generic Path type that which is an analogue of the GoBGP's Path object, but only contains a minimal fields required for Cilium's usecases. It consists of NLRI, Path Attributes and some status fields. We are relying on the GoBGP's pkg/packet/bgp package which is a generic BGP library (say net.IP package, but for BGP). We decided to reuse this library as a part of our router-independent intermediate representation because it's too painful for us to reinvent the BGP library by ourselves. This type will be used for implementing various BGP CPlane functionalities like retrieving the route. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com> Co-authored-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
8736d6d
to
98f63b3
Compare
Add a new GetRoutes method to the Router interface. This method retrieves routes from unerlying router's RIB. It supports retrieving Loc-RIB as well as Adj-RIB-In/Out. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com> Co-authored-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
98f63b3
to
7fb8fb5
Compare
@YutaroHayakawa I consolidated the commits |
/test |
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.
Now LGTM 👍 Thanks!
Adds
GetRoutes
method to the Router interface and genericPath
andRoute
types, that can be used to retrieve existing routes from the RIB of underlying router.This is the first step towards exposing the BGP routes via cilium API + CLI.