-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feature filter replace_keys #8446
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
Feature filter replace_keys #8446
Conversation
@vbotka this PR contains the following merge commits: Please rebase your branch to remove these commits. |
696bd5d
to
81d52c6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
dde2649
to
3088f38
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
3088f38
to
37cf3a7
Compare
community.general 9 requires ansible-core 2.13+, which requires Python 3.8+ on the controller. So there's no need to worry about Python 3.5 and earlier for filters :) |
* 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.
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Felix Fontein <[email protected]>
Done. Thank you! |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8507 🤖 @patchback |
* 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 <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Test attributes before and after are strings in the iteration of target. * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 1d61541)
@vbotka thanks for your contribution! |
…8507) Feature filter replace_keys (#8446) * 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 <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Test attributes before and after are strings in the iteration of target. * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 1d61541) Co-authored-by: Vladimir Botka <[email protected]>
@felixfontein I appreciate your cooperation! |
* Add filter replace_keys. * Update examples and integration tests. * Fix examples and copyright. * Update documentation, examples and integration tests. * Implement ansible-collections#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 <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Test attributes before and after are strings in the iteration of target. * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
* Add filter replace_keys. * Update examples and integration tests. * Fix examples and copyright. * Update documentation, examples and integration tests. * Implement ansible-collections#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 <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> * Test attributes before and after are strings in the iteration of target. * Update plugins/filter/replace_keys.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
Implement #8445
ISSUE TYPE
COMPONENT NAME
community.general.replace_keys
ADDITIONAL INFORMATION
See related feature requests #8438, #8442, and PR #8456, #8443