Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and register page types for the new RBAC endpoints #15275

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

jbradberry
Copy link
Contributor

SUMMARY

Some new endpoints are being exposed, and old endpoints are now marked as deprecated. Update awxkit in order to properly support the new way in the cli, but also so that QE testing can start making use of the new stuff.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@jbradberry
Copy link
Contributor Author

cc @AlanCoding @fosterseth

@jbradberry
Copy link
Contributor Author

jbradberry commented Jun 14, 2024

I hope and think that this should be as easy as:

  • Create new Page types corresponding to the new endpoints (I did this in the first commit) and register them
  • Confirm that an OPTIONS call against the new endpoints gives sane info about postable fields
  • Include @AlanCoding 's new RBAC endpoints in the list of things that get exported
  • Make sure exports of top-level things don't break if the top-level list endpoint doesn't exist (allowing this code to be used with both old-style and new-style)
  • Make sure the export detects existence of new style endpoints and ignores the old style endpoints in that case
  • Detect on import side if old-style or new-style export structure is being passed in, and hit the appropriate endpoints corresponding to that
  • Make sure that the new endpoints are in the right place in the awxkit dependency hierarchy



page.register_page(
[resources.role_team_assignment, (resources.role_definition_team_assignments, 'post'), (resources.role_team_assignments, 'post')], RoleTeamAssignment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resources.role_definition_team_assignments would be read-only, so it looks like the most correct thing would be to delete it here.



page.register_page(
[resources.role_user_assignment, (resources.role_definition_user_assignments, 'post'), (resources.role_user_assignments, 'post')], RoleUserAssignment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other thing worth noting is that assignments are immutable, meaning the detail endpoint, resources.role_user_assignment, would not allow PATCH/PUT... but it seems that no references to the detail endpoint exist here in the first place, so I guess we're good.

Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! this is a good step forward.

  • left one minor request that the sublist shouldn't map POST to anything
  • delete comments with imports of HasCopy and the like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants