community.general
community.general copied to clipboard
add special word '+value' to add_children/set_children in xml module
SUMMARY
This change adds support for creating value to node when using add_children/set_children with subnodes in xml module.
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
plugins/modules/xml.py
cc @cmprescott @dagwieers @sm4rk0 @tbielawa click here for bot help
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/xml.py:308:25: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/xml.py:308:25: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/xml.py:308:25: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/xml.py:308:25: W291: trailing whitespace
Hi @russoz Thanks for you suggestion, I've committed your update. As for integration tests, I'll think about it, that's a good idea.
I made commit with +value and renamed PR
Sorry, what's wrong with this PR?
Sorry, I wanted to do some more tests/experiments, but never found time to actually do them yet...
Hi @z1kk0 sorry for the radio silence, this one fell through the cracks.
Code-wise it looks good to me, but I still think it would be good to add a testcase to the integration tests.
Any updates on this? I have the same use case @z1kk0 @russoz @felixfontein @ansibullbot
Hi @z1kk0 sorry for the long delay, this one got lost in the cracks , and I have had some busy weeks lately.
This PR requires a rebase, and we had mentioned before more tests. If you could add a test case under: https://github.com/ansible-collections/community.general/blob/main/tests/integration/targets/xml/tasks
That would be very helpful.
Instructions for rebasing: https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html
Hi @russoz I did rebase and added one test case.
@z1kk0 thanks for your contribution! @russoz thanks for reviewing!