Refator API path for resource deregistration#2293
Merged
cb-github-robot merged 2 commits intocloud-barista:mainfrom Jan 27, 2026
Merged
Refator API path for resource deregistration#2293cb-github-robot merged 2 commits intocloud-barista:mainfrom
cb-github-robot merged 2 commits intocloud-barista:mainfrom
Conversation
Signed-off-by: Seokho Son <shsongist@gmail.com>
Member
Author
|
cc @leehyeoklee |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames REST API routes for “deregistration” to use a shorter, more generic /deregister/... path (replacing /deregisterCspResource/... and moving the MCI VM deregister route), and updates Swagger annotations/generated docs accordingly.
Changes:
- Updated Echo route paths for deregistering MCI VMs and several infra resources (dataDisk, customImage, sshKey, securityGroup, vNet, subnet).
- Updated Swagger route annotations in handler files to match the new endpoints.
- Updated generated Swagger artifacts (
swagger.yaml,docs.go) to reflect the new paths.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/interface/rest/server/server.go | Changes the actual REST route registrations to the new /deregister/... paths. |
| src/interface/rest/server/resource/vnet.go | Updates Swagger @Router annotation for vNet deregistration endpoint. |
| src/interface/rest/server/resource/subnet.go | Updates Swagger @Router annotation for subnet deregistration endpoint. |
| src/interface/rest/server/resource/sshkey.go | Updates Swagger @Router annotation for sshKey deregistration endpoint. |
| src/interface/rest/server/resource/securitygroup.go | Updates Swagger @Router annotation for securityGroup deregistration endpoint. |
| src/interface/rest/server/resource/dataDisk.go | Updates Swagger @Router annotation for dataDisk deregistration endpoint. |
| src/interface/rest/server/resource/customimage.go | Updates Swagger @Router annotation for customImage deregistration endpoint. |
| src/interface/rest/server/infra/manageInfo.go | Updates Swagger @Router annotation for MCI VM deregistration endpoint. |
| src/interface/rest/docs/swagger.yaml | Updates OpenAPI paths to match the renamed endpoints. |
| src/interface/rest/docs/docs.go | Updates generated Swagger doc template paths to match the renamed endpoints. |
Blocking concerns to address before merge:
- The PR removes/changes existing public API endpoints (e.g.,
/ns/{nsId}/mci/{mciId}/vm/{vmId}/deregisterand/ns/{nsId}/deregisterCspResource/...) without keeping backward-compatible aliases or an explicit deprecation path. If compatibility is expected, add alias routes for the old endpoints (optionally marked deprecated in Swagger) or provide a clear versioning/deprecation strategy. - For network resources,
registerCspResource/...remains while the counterpart becomesderegister/..., which introduces an asymmetry in the API surface. Consider aligning naming (either keepderegisterCspResourceor also rename the register endpoint family) to avoid long-term confusion for API consumers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Seokho Son <shsongist@gmail.com>
Member
Author
|
/approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think deregisteration is for existing CB-TB object.
So, I think just deregister is a better naming than deregisterCspResource