enhance cloudstack_disk_offering resource with QoS, provisioning, and scope support - #313
Open
poddm wants to merge 8 commits into
Open
enhance cloudstack_disk_offering resource with QoS, provisioning, and scope support#313poddm wants to merge 8 commits into
cloudstack_disk_offering resource with QoS, provisioning, and scope support#313poddm wants to merge 8 commits into
Conversation
poddm
force-pushed
the
mp/disk_offering
branch
from
September 9, 2026 15:47
727bafa to
bd77801
Compare
cloudstack_disk_offering resource with QoS, provisioning, and scope support
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.
Expand
cloudstack_disk_offeringwith QoS, IOPS, and placement controlsSummary
Extends the
cloudstack_disk_offeringresource to cover the fullcreateDiskOffering/updateDiskOfferingAPI surface — storage/hypervisor QoS, IOPS throttling, domain/zone restriction, and size strictness — plus a rework of the CRUD logic and expanded test coverage.New schema fields
iops_read_rate,iops_read_rate_max,iops_read_rate_max_length,iops_write_rate,iops_write_rate_max,iops_write_rate_max_lengthhypervisor { bytes_read_rate, bytes_read_rate_max, bytes_read_rate_max_length, bytes_write_rate, bytes_write_rate_max, bytes_write_rate_max_length }storage { min_iops, max_iops, customized_iops, hypervisor_snapshot_reserve }domain_id(list),zone_id(list),cache_mode,disk_offering_strictnessBehavior changes
customized— it's now inferred fromdisk_size(size set ⇒ fixed offering; size omitted ⇒ customizable). The two are inversely coupled in CloudStack, so exposing both only allowed contradictory config.provisioning_type/storage_typechanged fromDefaulttoComputed(keptForceNew+ validation) so the API-selected value doesn't cause drift.cache_modemarkedComputedfor the same reason.zone_idsemantics: empty = available in all zones; setting IDs restricts the offering. The internal"all"sentinel used on update to clear a restriction is abstracted away from users.Readnow handles 404s (removed offerings clear state), anddomain_id/zone_idare correctly split from the comma-separated API strings.Bug fixes (from the original branch)
Updatenow actually callsUpdateDiskOffering(previously built params and discarded them) and no longer panics ondomain_id/zone_id.Tests
Acceptance tests:
_basic,_customized,_update(expanded to covercache_mode/display_offering), and new_qos,_options,_domain,_zone.