Skip to content

[v2] Allow clearing Placement resource provider parent_provider_uuid - #3762

Merged
mandre merged 1 commit into
v2from
bp-v2-e09b30f
May 21, 2026
Merged

mandre merged 1 commit into
v2from
bp-v2-e09b30f

Conversation

@gophercloud-backport-bot

Copy link
Copy Markdown

Backport: #3749

Current implementation describes the possibility to set parent_provider_uuid for a child resource provider to detach it from its parent, but actually doesn't allow it due to the use of omitempty which would clear such nil input.
To allow for this operation, I introduce the empty value of "" replaced by nil before being sent. This pattern allows for parent_provider_uuid to remain an optional argument just as in the API. Such pattern was previously introduced in DNS recordsets.

Fixes #3746
Related #526

Current implementation describes the possibility to set
parent_provider_uuid for a child resource provider to detach it from its
parent, but actually doesn't allow it due to the use of omitempty which
would clear such nil input.
To allow for this operation, I introduce the empty value of "" replaced
by nil before being sent. This pattern allows for parent_provider_uuid
to remain an optional argument just as in the API. Such pattern was
previously introduced in DNS recordsets.

Fixes #3746

Signed-off-by: Dominik Danelski <[email protected]>
@github-actions github-actions Bot added v2 This PR targets v2 edit:placement This PR updates placement code semver:patch No API change labels May 21, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.819% (+0.001%) from 63.818% — bp-v2-e09b30f into v2

@mandre
mandre merged commit 8cc5dbf into v2 May 21, 2026
19 checks passed
@mandre
mandre deleted the bp-v2-e09b30f branch May 21, 2026 15:01
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:patch No API change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants