Support multiple openstack-based CSPs#2368
Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom Mar 16, 2026
Merged
Support multiple openstack-based CSPs#2368cb-github-robot merged 1 commit intocloud-barista:mainfrom
cb-github-robot merged 1 commit intocloud-barista:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a CloudPlatform abstraction layer to support multiple OpenStack-based CSPs (and potentially other platform-derived CSPs) in CB-Tumblebug. Previously, each CSP had a 1:1 mapping between its name and driver/behavior. Now, derived CSPs like openstack-new01 can map to the base openstack platform, sharing driver selection, spec/image handling, and rate limiting logic.
Changes:
- Adds
RegisterCloudPlatform/ResolveCloudPlatformfunctions in thecsppackage to map CSP instance names to their underlying platform type, and updates all CSP-specific behavior dispatch to useResolveCloudPlatforminstead of direct provider name comparison. - Modifies Spider API registration (driver, credential, region, connection config) to send the platform type as
ProviderNamewhile preserving the CSP instance name internally for CloudInfo lookups and connection config storage. - Adds terminate idempotency in
control.go(treating already-terminated VMs as success) and reduces VM termination wait from 5s to 2s.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/core/model/csp/csp.go |
Adds cloudPlatformMap, RegisterCloudPlatform, ResolveCloudPlatform; updates GetRateLimitConfig to resolve platform |
src/core/model/config.go |
Adds CloudPlatform field to CSPDetail struct |
src/core/common/utility.go |
Populates platform mapping at startup; updates Spider registration to use platform type; rewrites credential registration to iterate CloudInfo regions directly |
src/core/common/label/label.go |
Uses ResolveCloudPlatform for CSP tag sync skip checks |
src/core/resource/spec.go |
Uses ResolveCloudPlatform for Azure filter, architecture extraction, and spec ignore patterns |
src/core/resource/image.go |
Uses ResolveCloudPlatform for region-agnostic checks, K8s image detection, and CSP-specific filtering |
src/core/resource/objectStorage.go |
Uses ResolveCloudPlatform for object storage support checks |
src/core/resource/common.go |
Uses ResolveCloudPlatform for NCP zone assignment and CloudIt firewall rules |
src/core/infra/provisioning.go |
Uses ResolveCloudPlatform for KT Cloud checks, provider recommendations, and GCP SSH key handling |
src/core/infra/utility.go |
Uses ResolveCloudPlatform for Azure inspect resources |
src/core/infra/control.go |
Adds terminate idempotency for VMs/MCIs |
src/core/infra/manageInfo.go |
Reduces VM termination wait from 5s to 2s |
assets/cloudinfo.yaml |
Adds openstack-ex01 example entry with cloudPlatform: openstack |
init/template.credentials.yaml |
Adds documentation comments for adding new OpenStack-based CSPs |
docs/feature_guide/openstack-type-csp-support.md |
New feature guide documentation |
docs/feature_guide/README.md |
Links to new feature guide |
| Swagger docs | Adds cloudPlatform field to CSPDetail schema |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ruleList = append(ruleList, rule) | ||
| // CloudIt only offers tcp, udp Protocols | ||
| if !strings.EqualFold(provider, "cloudit") { | ||
| if !strings.EqualFold(csp.ResolveCloudPlatform(provider), "cloudit") { |
Member
Author
There was a problem hiding this comment.
Note that, "cloudit" was deprecated already and will be removed by another PR. :)
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.
This PR introduces a new concept to extend the original Cloud-Barista objectives and capabilities, which previously supported only public CSPs.
How can it be used?
See the documentation for details: https://github.com/seokho-son/cb-tumblebug/blob/fd38dd46bd0546fd3f7b9e1c36ceafafd5e6ea01/docs/feature_guide/openstack-type-csp-support.md