Repository navigation
[v2] Implement resource provider aggregates v2 - #3709
Merged
stephenfin merged 3 commits intoApr 10, 2026
Merged
stephenfin merged 3 commits into
stephenfin merged 3 commits into
Conversation
Related: gophercloud#526 API reference: https://docs.openstack.org/api-ref/placement/#list-resource-provider-aggregates Code reference: https://opendev.org/openstack/placement/src/branch/stable/2026.1/placement/handlers/aggregate.py#L81-L99 Signed-off-by: Dominik Danelski <[email protected]>
Related: gophercloud#526 API reference: https://docs.openstack.org/api-ref/placement/#update-resource-provider-aggregates Code reference: https://opendev.org/openstack/placement/src/branch/stable/2026.1/placement/handlers/aggregate.py#L102-L132 Signed-off-by: Dominik Danelski <[email protected]>
We don't provide resource provider's generation in request nor do we get it back in response. The original tests got it slightly wrong; fix it. Automatically correct the request if user wrongly provides generation in opts for pre-1.19. Signed-off-by: Dominik Danelski <[email protected]>
Merged
stephenfin
requested changes
Apr 10, 2026
stephenfin
left a comment
Contributor
There was a problem hiding this comment.
Couple of small things, mainly around tests, but this is otherwise good from my perspective.
| } | ||
|
|
||
| func TestResourceProviderAggregatesGetSuccess(t *testing.T) { | ||
| // Resource_provider_generation in the aggregates response was introduced in microversion 1.19. |
Contributor
There was a problem hiding this comment.
This comment isn't that helpful. It has the impression of being bound to the clients.SkipReleasesBelow call on the next line but I believe the more important aspect is the setting of client.Microversion below. Can we just drop it? Ditto for the other comments below. IMO it would be more helpful to add comments explaining the "story" of the test as we're doing in the test above this one.
Contributor
|
...and I just realised this is a backport 🤦 I'll address these myself on |
stephenfin
approved these changes
Apr 10, 2026
stephenfin
added a commit
to shiftstack/gophercloud
that referenced
this pull request
Apr 10, 2026
Per comments [1], remove an unnecessary helper and tweak some tests. [1] gophercloud#3709 Signed-off-by: Stephen Finucane <[email protected]>
stephenfin
added a commit
to shiftstack/gophercloud
that referenced
this pull request
Apr 10, 2026
Per comments [1], remove an unnecessary helper and tweak some tests. [1] gophercloud#3709 Signed-off-by: Stephen Finucane <[email protected]>
stephenfin
added a commit
to shiftstack/gophercloud
that referenced
this pull request
Apr 10, 2026
Per comments [1], remove an unnecessary helper and tweak some tests. [1] gophercloud#3709 Signed-off-by: Stephen Finucane <[email protected]>
gophercloud-backport-bot Bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
Per comments [1], remove an unnecessary helper and tweak some tests. [1] #3709 Signed-off-by: Stephen Finucane <[email protected]>
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.
Related: #526
API reference:
https://docs.openstack.org/api-ref/placement/#update-resource-provider-aggregates
https://docs.openstack.org/api-ref/placement/#list-resource-provider-aggregates
Code reference:
https://opendev.org/openstack/placement/src/branch/stable/2026.1/placement/handlers/aggregate.py#L102-L132
https://opendev.org/openstack/placement/src/branch/stable/2026.1/placement/handlers/aggregate.py#L81-L99
Manual backport of #3685.