-
Notifications
You must be signed in to change notification settings - Fork 32
Allow custom region from config #83
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: main
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 pull request adds support for a configurable region parameter in the CloudStack cloud provider configuration, allowing users to specify a region independently of the zone. This addresses the limitation where the region was previously always set to the same value as the zone.
Key Changes:
- Added
regionfield to bothCSConfigandCSCloudstructs for configuration and storage - Updated
GetZonemethod to use the configured region when available, falling back to zone name when not set - Maintained backward compatibility by defaulting to zone name when region is not configured
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ff4527c to
2433dd9
Compare
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2433dd9 to
1f2ed33
Compare
DaanHoogland
left a comment
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.
clgtm
Fixes #39
Details
This pull request introduces support for a configurable
regionparameter in the CloudStack cloud provider code. The main change is the addition of theregionfield to the configuration and internal structures, allowing the region to be set independently of the zone. The logic in theGetZonemethod is updated to use the configured region if provided.Configuration and struct updates:
regionfield to theCSConfigstruct and its configuration parsing, allowing users to specify a region in their configuration file.regionfield to theCSCloudstruct to store the configured region for use throughout the codebase.newCSCloudconstructor to initialize theregionfield from the configuration.Behavioral change:
GetZonemethod to set thezone.Regionfield to the configured region if it is set; otherwise, it defaults to using the zone as the region.