-
Notifications
You must be signed in to change notification settings - Fork 256
[WIP] New /ibdevices CNS API #4002
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR introduces scaffolding for a new CNS /ibdevices
API endpoint. It adds the initial handler structure without implementing the actual POST and GET operations, which will be completed in future PRs.
- Adds new IB devices handler function with placeholder TODO comments for POST and GET methods
- Registers the new handler for both v1 and v2 API paths
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
cns/restserver/restserver.go | Registers the ibDevicesHandler for both v1 and v2 API paths |
cns/restserver/api.go | Implements the ibDevicesHandler function with method routing and placeholder TODOs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
8924aa9
to
b39f8dd
Compare
1b21ce5
to
c31ce59
Compare
|
||
func (service *HTTPRestService) createMTPNC(ctx context.Context, pod *v1.Pod, ibMACs []net.HardwareAddr) error { | ||
// create the MTPNC for the pod | ||
mtpnc := &v1alpha1.MultitenantPodNetworkConfig{ |
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.
where is IBMACs being populated? and we should assign Unprogrammed status here if ib mac not in-use
Scaffolding for new CNS
/ibdevices
APIThis is a quick exploration of how CNS would create the MTPNC on a /ibdevices POST
I see we already have some MTPNC reconciling logic in CNS if Swiftv2 is enabled, so will chat with stakeholders about that