Add PUT/HEAD/DELETE for identity/v3/OS-INHERIT#2610
Merged
mandre merged 4 commits intogophercloud:masterfrom May 15, 2023
Merged
Add PUT/HEAD/DELETE for identity/v3/OS-INHERIT#2610mandre merged 4 commits intogophercloud:masterfrom
mandre merged 4 commits intogophercloud:masterfrom
Conversation
Add PUT for indentity/v3/OS-INHERIT. Follow the same pattern as normal role assignments for consistensy and minimalization. This adds PUT for all combinations of domain/project and user/group.
Add HEAD to identity/v3/OS-INHERIT. These calls can be used to validate the existance of various inherited roles. Follow similar conventions as identity/v3/roles for consistency
Add DELETE for identity/v3/OS-INHERIT. These calls can be used to unassign various inherited roles. Follow similar conventions as identity/v3/roles for consistency
Contributor
Author
|
@pierreprinetti and/or @mandre could you check this one? I've grouped it into a single PR, but hopefully reviewing commit-by-commit will make it easier. thanks |
mandre
previously approved these changes
May 12, 2023
Contributor
mandre
left a comment
There was a problem hiding this comment.
This looks perfect, apart for a minor typo. Really well done, as usual.
| defer th.TeardownHTTP() | ||
| HandleAssignSuccessfully(t) | ||
|
|
||
| err := osinherit.Assign(client.ServiceClient(), "{role_id}", osinherit.AssignOpts{ |
Contributor
There was a problem hiding this comment.
Shouldn't we also test known failure cases, such as providing both UserID and GroupID, to ensure the validation works?
| err = osinherit.Unassign(client, role.ID, unassignOpts).ExtractErr() | ||
| th.AssertNoErr(t, err) | ||
|
|
||
| t.Logf("Successfully unassgined inherited role %s to a user %s on a project %s", |
| err = osinherit.Unassign(client, role.ID, unassignOpts).ExtractErr() | ||
| th.AssertNoErr(t, err) | ||
|
|
||
| t.Logf("Successfully unassgined inherited role %s to a group %s on a project %s", |
Contributor
Author
|
@mandre Thanks for the review. Added the changes you requested. |
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.
Add PUT/HEAD/DELETE for indentity/v3/OS-INHERIT. Follow the same pattern as normal role assignments for consistency.
This adds PUT/HEAD/DELETE for all combinations of domain/project and user/group.
DOCS
Fixes #2205
Each commit adds one API call, thus it is a bit easier to review by reviewing one commit each time