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

bgp: enhance defaulting of bgp routes command #2256

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

rastislavs
Copy link
Contributor

@rastislavs rastislavs commented Jan 22, 2024

After simplification of cilium-dbg bgp routes advertised command in cilium/cilium#30033 is merged, we can rely on it to make the same simplifications in cilium CLI:

  • allow retrieving advertised routes for each peer (without the need to specify a peer)
  • introduce defaulting for AFI & SAFI

Examples:

$ cilium bgp routes                                                                                                                                                                      ✔ 
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

Node                                  VRouter   Prefix          NextHop   Age   Attrs
clab-bgp-cplane-devel-control-plane   65001     10.244.0.0/24   0.0.0.0   3s    [{Origin: i} {Nexthop: 0.0.0.0}]   
$ cilium bgp routes advertised                                                                                                                                                           ✔ 
(Defaulting to `ipv4 unicast` AFI & SAFI, please see help for more options)

Node                                  VRouter   Peer        Prefix          NextHop     Age   Attrs
clab-bgp-cplane-devel-control-plane   65001     172.0.0.1   10.244.0.0/24   172.0.0.2   8s    [{Origin: i} {AsPath: 65001} {Nexthop: 172.0.0.2}]   
$ cilium bgp routes advertised ipv4                                                                                                                                                      ✔ 
(Defaulting to `unicast` SAFI, please see help for more options)

Node                                  VRouter   Peer        Prefix          NextHop     Age   Attrs
clab-bgp-cplane-devel-control-plane   65001     172.0.0.1   10.244.0.0/24   172.0.0.2   18s   [{Origin: i} {AsPath: 65001} {Nexthop: 172.0.0.2}]   

After simplification of `cilium-dbg bgp routes advertised` command
in cilium/cilium#30033, make the same
simplifications in cilium CLI as well:
- introduce defaulting for afi & safi,
- allow retrieving advertised routes for each peer
(without the need to specify a peer).

Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
@rastislavs rastislavs marked this pull request as ready for review January 23, 2024 09:00
@rastislavs rastislavs requested a review from a team as a code owner January 23, 2024 09:00
Copy link
Contributor

@harsimran-pabla harsimran-pabla left a comment

Choose a reason for hiding this comment

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

lgtm, thank you 🙏

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 24, 2024
@tklauser tklauser merged commit 6ef62ca into cilium:main Jan 25, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants