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

[PR #8446/1d615419 backport][stable-9] Feature filter replace_keys #8507

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jun 14, 2024

This is a backport of PR #8446 as merged into main (1d61541).

SUMMARY

Implement #8445

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

community.general.replace_keys

ADDITIONAL INFORMATION

See related feature requests #8438, #8442, and PR #8456, #8443

* Add filter replace_keys.

* Update examples and integration tests.

* Fix examples and copyright.

* Update documentation, examples and integration tests.

* Implement #8445. Add filter replace_keys

* Fix documentation formatting.

* Fix documentation.

* Fix type(target). Formatting improved.

* Instead of a dictionary, _keys_filter_target_dict returns a list

* No target testing in _keys_filter_params
* Interface changed _keys_filter_params(data, matching_parameter)
* If there are items with equal C(before) the B(first) one will be used.

* Update remove_keys. Interface changed _keys_filter_params(data, matching_parameter)

* The target can't be empty also in _keys_filter_target_dict

* Update plugins/filter/replace_keys.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/filter/replace_keys.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/filter/replace_keys.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Test attributes before and after are strings in the iteration of target.

* Update plugins/filter/replace_keys.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1d61541)
@patchback patchback bot mentioned this pull request Jun 14, 2024
@ansibullbot
Copy link
Collaborator

cc @vbotka
click here for bot help

@ansibullbot ansibullbot added backport feature This issue/PR relates to a feature request filter filter plugin integration tests/integration new_contributor Help guide this first time contributor plugins plugin (any type) tests tests needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 14, 2024
@felixfontein felixfontein merged commit d6168a1 into stable-9 Jun 15, 2024
133 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-9/1d61541951a3ec3ecc5417bdd97ca2b1e9aca698/pr-8446 branch June 15, 2024 10:00
@vbotka vbotka mentioned this pull request Jun 19, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport feature This issue/PR relates to a feature request filter filter plugin integration tests/integration new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants