Conversation
This was referenced Jul 27, 2026
…t/clouds-yaml-default-microversion
Sharpz7
commented
Sep 30, 2026
| @@ -0,0 +1,57 @@ | |||
| """Generate configuration expectations with openstacksdk (optional test tooling). | |||
Author
There was a problem hiding this comment.
I am not sure if this kind of thing is acceptable... do let me know. We probably do not want python code here?
Plus we also need it in https://github.com/gophercloud/gophercloud/pull/3881/changes#diff-85e9964491e24b0252b1ced9264c3c642305591347c88b26b6444fb43250bb03
Maybe just one place is enough?
Sharpz7
marked this pull request as ready for review
September 30, 2026 23:39
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 adds support for service default microversions in
clouds.yaml, so settings likecompute_default_microversion: "2.87"are applied byclientconfig.NewServiceClient().Defaults are preserved in
Cloud.DefaultMicroversions.ClientOpts.Microversionoverrides the configured value, and callers can still changeclient.Microversionafterwards. This works with the existing Gophercloud v2.15.0 dependency, so it can merge independently of the core PR.Canonical service names take precedence over aliases, following openstacksdk's order. Profile, secure-file and selected-region defaults survive merging.
nullfalls through to aliases; an empty string clears an inherited default. A null regional value keeps the cloud default. Versions should be quoted: Python reads unquoted2.10as2.1, while Go preserves2.10. Automatic negotiation is outside this change.Tests check authentication and request headers for eight services, overrides, serialization and merging, plus 26 cases generated with openstacksdk 4.20.0 and os-service-types 1.9.0. The SDK fixtures can be regenerated; Go tests do not need Python.
Related: gophercloud/gophercloud#3882
Companion: gophercloud/gophercloud#3881
Tested with:
go test ./...go test -race ./openstack/clientconfig/...golangci-lint run ./...