Add tags and import support to service offerings; fix zone_ids handling - #314
Open
poddm wants to merge 6 commits into
Open
Add tags and import support to service offerings; fix zone_ids handling#314poddm wants to merge 6 commits into
poddm wants to merge 6 commits into
Conversation
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.
Details
1. Add
tagsTagsfield to the common service offering modeltagsattribute to the service offering schemaapplyTagshelper that setstagson the create params, wired intoCreatefor all three service offering resources2. Fix
zone_idshandlingcommonRead/commonUpdate), a returned zone id of"all"is no longer written intozone_ids; prior state is preserved so thata
nullor emptyzone_ids(both meaning "all zones") doesn't produce aspurious diff
commonUpdateParamsnow correctly serializesdomain_idsandzone_idsbyjoining the set elements with commas instead of using
Set.String(), anddefaults
zoneidto"all"when none are setcommonCreateParamszone id handling cleaned up accordingly3. Add import support
ImportState(viaImportStatePassthroughIDonid) for thefixed, constrained, and unconstrained service offering resources
ImportState/ImportStateVerifysteps to the acceptance tests foreach resource
Files changed
cloudstack/service_offering_constrained_resource.gocloudstack/service_offering_constrained_resource_test.gocloudstack/service_offering_fixed_resource.gocloudstack/service_offering_fixed_resource_test.gocloudstack/service_offering_models.gocloudstack/service_offering_schema.gocloudstack/service_offering_unconstrained_resource.gocloudstack/service_offering_unconstrained_resource_test.gocloudstack/service_offering_util.go