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

add filter support for one_template module #9547

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

skropf
Copy link
Contributor

@skropf skropf commented Jan 7, 2025

SUMMARY

Fixes #9278

As discussed in the issue a filter flag was added to the one_template module. The default behavior is preserved by setting the filter option to the default value of -3. Users can change the behavior by using values from -1 to -4.

Edit: filter option was changed to user friendly values (user, user_groups, ...) and internally the module converts those to the integers needed for the OpenNebula API.

The description of the module was also updated with an explanation of those values.

minor_changes:

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

one_template

ADDITIONAL INFORMATION

See #9278 for a reproduction playbook and expected outputs.

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Jan 7, 2025
@ansibullbot ansibullbot added the small_patch Hopefully easy to review label Jan 7, 2025
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jan 7, 2025
Copy link
Contributor

@nilsding nilsding left a comment

Choose a reason for hiding this comment

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

LGTM from my side, thanks for the PR

@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR small_patch Hopefully easy to review labels Jan 7, 2025
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels Jan 7, 2025
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Can you please add the changelog fragment as a file? (For example changelogs/fragments/9547-one_template-filter.yml.) Thanks.

plugins/modules/one_template.py Outdated Show resolved Hide resolved
plugins/modules/one_template.py Outdated Show resolved Hide resolved
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jan 8, 2025
plugins/modules/one_template.py Outdated Show resolved Hide resolved
plugins/modules/one_template.py Outdated Show resolved Hide resolved
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jan 9, 2025
Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

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

Other than the changelog adjustment, LGTM

apply suggestion from code review
add one_template filter changelog fragment
rewrote filter flag to use string instead of int
renamed flag to option in changelog
added PR link to changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
@felixfontein
Copy link
Collaborator

I'll merge this in a few days if nobody objects.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jan 15, 2025
@felixfontein felixfontein merged commit c823e37 into ansible-collections:main Jan 15, 2025
138 checks passed
Copy link

patchback bot commented Jan 15, 2025

Backport to stable-10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-10/c823e37d00015251f152d05fca1f85d117612a20/pr-9547

Backported as #9575

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 15, 2025
apply suggestion from code review
add one_template filter changelog fragment
rewrote filter flag to use string instead of int
renamed flag to option in changelog
added PR link to changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit c823e37)
@felixfontein
Copy link
Collaborator

@skropf thanks for your contribution!
@nilsding @russoz thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Jan 15, 2025
…mplate module (#9575)

add filter support for one_template module (#9547)

apply suggestion from code review
add one_template filter changelog fragment
rewrote filter flag to use string instead of int
renamed flag to option in changelog
added PR link to changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit c823e37)

Co-authored-by: Simon <simon.kropf@protonmail.com>
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
apply suggestion from code review
add one_template filter changelog fragment
rewrote filter flag to use string instead of int
renamed flag to option in changelog
added PR link to changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

one_template only returns templates owned by user but not by group membership
5 participants