Skip to content

refactor(acl): consolidate acl module#292

Merged
IamLunchbox merged 13 commits intoansible-collections:mainfrom
PendaGTP:feat/consolidate-acl-module
Feb 25, 2026
Merged

refactor(acl): consolidate acl module#292
IamLunchbox merged 13 commits intoansible-collections:mainfrom
PendaGTP:feat/consolidate-acl-module

Conversation

@PendaGTP
Copy link
Copy Markdown
Contributor

@PendaGTP PendaGTP commented Feb 23, 2026

SUMMARY

This PR consolidate the ACL module.

Bellow main changes:

  • lint/format/consistent module doc
  • set default state to present instead of absent and mark it as optional
  • simplify params validation
  • consolidate create/delete methods

This works is related to other changes/refactor we have done.

Note: order of PR merged is not important to me, I will update and rebase when changes merged

EDIT: I will add check/diff mode and update tests after, I did'nt introduce it here, to keep the PR smaller

COMPONENT NAME

proxmox_access_acl

@PendaGTP PendaGTP marked this pull request as draft February 23, 2026 11:01
@PendaGTP PendaGTP marked this pull request as ready for review February 23, 2026 11:51
Copy link
Copy Markdown
Collaborator

@Thulium-Drake Thulium-Drake left a comment

Choose a reason for hiding this comment

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

Apart from the thing about the default value, LGTM!

if roleid is not None and ace["roleid"] != roleid:
return False
ace_type = desired.get("type")
if ace_type is not None and ace["type"] != ace_type:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if ace_type is not None and ace["type"] != ace_type:
if ace_type and ace["type"] != ace_type:

@PendaGTP PendaGTP force-pushed the feat/consolidate-acl-module branch from 681c662 to f26a45d Compare February 25, 2026 08:11
@PendaGTP
Copy link
Copy Markdown
Contributor Author

PendaGTP commented Feb 25, 2026

@IamLunchbox @Thulium-Drake Thanks for review!

I have also rebased.

Done ✔️

@IamLunchbox IamLunchbox merged commit e550685 into ansible-collections:main Feb 25, 2026
15 checks passed
@IamLunchbox
Copy link
Copy Markdown
Collaborator

Thank you for your help :)

@@ -0,0 +1,3 @@
---
breaking_changes:
- proxmox - set ``state`` as not ``optional`` and assign default value ``present`` (https://github.com/ansible-collections/community.proxmox/pull/292).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it should have been "not required", and not "not optional" :) That's also not a breaking change, since any previous use of the parameter is still valid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@felixfontein Sorry, should I do anything to "revert" that? Or it too late?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't worry :)

You can just create a new PR to edit this fragment. It will be parsed on release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@IamLunchbox

This fragment seems to be already added to changelog.md on the 1.6.0 release :/ Is it still possible to edit/revert it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's already part of a release, but you can still edit it here: https://github.com/ansible-collections/community.proxmox/blob/main/changelogs/changelog.yaml#L304-L306 Afterwards run antsibull-changelog generate to update CHANGELOG.md and CHANGELOG.rst.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@felixfontein Thanks for your help, done here #370

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants