Skip to content

[v2] Implement Placement allocationcandidates - #3708

Merged
mandre merged 3 commits into
v2from
bp-v2-15c319c-0f34606
Apr 10, 2026
Merged

mandre merged 3 commits into
v2from
bp-v2-15c319c-0f34606

Conversation

@gophercloud-backport-bot

Copy link
Copy Markdown

Backport: #3701

Related #526

API reference:
https://docs.openstack.org/api-ref/placement/#list-allocation-candidates

Code reference:
https://opendev.org/openstack/placement/src/branch/stable/2026.1/placement/handlers/allocation_candidate.py#L256-L304

I didn't create separate microversions for every change when an argument could be repeated starting from … (change from string to []string), since one can create a single-element slice, so the request can still be expressed using this structure for any microversion 1.12+ unlike the array to map transition at 1.11 to 1.12. Having separate microversions for every such change would balloon the number of structures and related tests to 5+.

I also made the newer request structure the default and put the one from the first 2 microversions (1.10-1.11) in microversions.go, as the old version was made in 2018 and there's a low chance one would default to the original shape, which is very limited in expressiveness of request and response.

Please let me know if any of these decisions would prevent this patch from being merged.

Etua and others added 2 commits April 10, 2026 07:29
@github-actions github-actions Bot added v2 This PR targets v2 edit:placement This PR updates placement code semver:minor Backwards-compatible change labels Apr 10, 2026
The allocationcandidates test fixtures import internal/ptr but the
package was missing from this branch, causing a linter typecheck failure.

Partial backport from #3190.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.809% (+0.03%) from 63.778% — bp-v2-15c319c-0f34606 into v2

@mandre
mandre merged commit 0278c64 into v2 Apr 10, 2026
19 checks passed
@mandre
mandre deleted the bp-v2-15c319c-0f34606 branch April 10, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:placement This PR updates placement code semver:minor Backwards-compatible change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants