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

Add 'type' arg for antctl get bgproutes to filter bgproutes #6835

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Atish-iaf
Copy link
Contributor

No description provided.

@Atish-iaf Atish-iaf added area/component/antctl Issues or PRs releated to the command line interface component area/transit/bgp Issues or PRs related to BGP support. labels Nov 27, 2024
@Atish-iaf Atish-iaf marked this pull request as ready for review November 27, 2024 09:32
pkg/agent/apiserver/handlers/bgproute/handler_test.go Outdated Show resolved Hide resolved
pkg/agent/apiserver/handlers/bgproute/handler.go Outdated Show resolved Hide resolved
@@ -72,11 +73,13 @@ func HandleFunc(bq querier.AgentBGPPolicyInfoQuerier) http.HandlerFunc {

var bgpRoutesResp []apis.BGPRouteResponse
for bgpRoute := range bgpRoutes {
Copy link
Contributor

Choose a reason for hiding this comment

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

now I feel like having the ipv4Routes, ipv6Routes bool parameters in the GetBGPRoutes querier method is not necessary or desirable, and that we should do all the filtering here, like you do for the route type. What do you think? It would be more consistent and simplify the logic in GetBGPRoutes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I felt the same while making these changes. I think we can also do the same for GetBGPPeerStatus as well. I will update the changes for both in this PR.

@Atish-iaf Atish-iaf force-pushed the add-type-arg-for-antctl-get-bgproutes branch 2 times, most recently from c5a3ed6 to de3d86c Compare November 28, 2024 09:59
Also, move all filtering logic from controller to handler for consistency.

Signed-off-by: Kumar Atish <[email protected]>
@Atish-iaf Atish-iaf force-pushed the add-type-arg-for-antctl-get-bgproutes branch from de3d86c to 2f96853 Compare November 29, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/component/antctl Issues or PRs releated to the command line interface component area/transit/bgp Issues or PRs related to BGP support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants