Skip to content

Refator API path for resource deregistration#2293

Merged
cb-github-robot merged 2 commits intocloud-barista:mainfrom
seokho-son:main
Jan 27, 2026
Merged

Refator API path for resource deregistration#2293
cb-github-robot merged 2 commits intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

I think deregisteration is for existing CB-TB object.

So, I think just deregister is a better naming than deregisterCspResource

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings January 26, 2026 16:58
@seokho-son
Copy link
Copy Markdown
Member Author

cc @leehyeoklee

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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}/deregister and /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 becomes deregister/..., which introduces an asymmetry in the API surface. Consider aligning naming (either keep deregisterCspResource or 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>
@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Jan 27, 2026
@cb-github-robot cb-github-robot merged commit d338613 into cloud-barista:main Jan 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants