Skip to content

Support multiple openstack-based CSPs#2368

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Mar 16, 2026
Merged

Support multiple openstack-based CSPs#2368
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

@seokho-son seokho-son commented Mar 13, 2026

This PR introduces a new concept to extend the original Cloud-Barista objectives and capabilities, which previously supported only public CSPs.

  • From now on, CB-TB adopts the CloudPlatform concept and implicitly handles both CSPs and CloudPlatform (Cloud OS type).
  • With this change, CB-TB can support multiple OpenStack-based CSPs.
image

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

Copilot AI review requested due to automatic review settings March 13, 2026 09:26
@seokho-son seokho-son requested a review from yunkon-kim as a code owner March 13, 2026 09:26
@github-actions github-actions bot added the asset label Mar 13, 2026
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 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 / ResolveCloudPlatform functions in the csp package to map CSP instance names to their underlying platform type, and updates all CSP-specific behavior dispatch to use ResolveCloudPlatform instead of direct provider name comparison.
  • Modifies Spider API registration (driver, credential, region, connection config) to send the platform type as ProviderName while 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") {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that, "cloudit" was deprecated already and will be removed by another PR. :)

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 Mar 16, 2026
@cb-github-robot cb-github-robot merged commit fc4ef0f into cloud-barista:main Mar 16, 2026
5 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. asset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants