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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skropf
Copy link

@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 <[email protected]>
Co-authored-by: Alexei Znamensky <[email protected]>
@felixfontein
Copy link
Collaborator

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

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 check-before-release PR will be looked at again shortly before release and merged if possible. 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