* Added requirement on netaddr
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* minor changes
* Added requirement on netaddr to ansible.utils.ipaddr
* changes
* minor change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benoît Geeraerts <10222438+b-enoit-be@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixes issue with keep_keys removing all keys when data is passed in as dict
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed var name
* updated changelog
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix the pylint used-before-assignment error
* fix integration tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixed ipcut to support ipv4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add changelog
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ruchi Pakhle <72685035+Ruchip16@users.noreply.github.com>
Co-authored-by: Ruchi Pakhle <ruchipakhle@gmail.com>
* fix the variable collision issue
* make output format in such a way that it returns a dict
* changes
* changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* revert back changes
* changes
* changes
* fix the error
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add dict construct
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* removed the in between json conversion, now function returns python
dict, changed unit tests to check against the dict.
* remove the json import
* changelog added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed changelog to minor
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ruchi Pakhle <72685035+Ruchip16@users.noreply.github.com>
Co-authored-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
* Fix finding relative template_path when provided
This allows parser.template_path to behave as expected inside roles or
collections when a path relative to the role/collection directory is
provided.
* add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update tests
* add working tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updates
* minor changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Delete tests/integration/inventory
* add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add netcommon dependency
* changes
* delete tests as CI is failing
* changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Mark Vasi <mark.vasi@embedit.com>
Co-authored-by: Ruchi Pakhle <ruchipakhle@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ruchi Pakhle <72685035+Ruchip16@users.noreply.github.com>
* add wildcard mask/hostmask to ipaddr filter doc page
This might seem like an unnecessary addition but wildcard filter not being here has cost me couple of hours and a failed exam. I tried to follow convention as much as I could
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add changelog and add a note in readme
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add a note in readme check
* update readme
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* correct the link
* correct the link
* correct the link
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update changelogs/fragments/324.yaml
Co-authored-by: Sagar Paul <sagpaul@redhat.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sagar Paul <sagpaul@redhat.com>
Co-authored-by: Ruchi Pakhle <72685035+Ruchip16@users.noreply.github.com>
Co-authored-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
Co-authored-by: Ruchi Pakhle <ruchipakhle@gmail.com>
* fix cli_parse: require connection
* add changelog fragment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix: netaddr fallback to is_private when is_global is not available
* fix: adjust fallback logic to edge cases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: address pylint errors
* fix: comment spacing in test task broken by prettier
* changelog update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Marcin Lewandowski <mlewandowski@pl.ibm.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ruchi Pakhle <ruchipakhle@gmail.com>
* Enhance fact_diff to show common lines
* Add integration and unit tests
* Fix sanity
---------
Co-authored-by: Ashwini Mhatre <amhatre@amhatre-thinkpadt14sgen2i.pnq.csb>
* fix validate examples
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix ipv6form doc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add changelog fragment
* rename
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ashwini Mhatre <mashu97@gmail.com>
* Fix bug in ipv4_hex filter.
* Fix issue in ipv4_hex
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/integration/targets/utils_ipaddr_filter/tasks/ip4_hex.yaml
Co-authored-by: Sagar Paul <sagpaul@redhat.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sagar Paul <sagpaul@redhat.com>
* Update jsonschema validator
Update jsonschema validator to support newer drafts. It now supports
drafts 2019-09 and 2020-12.
The logic for choosing the jsonschema validator class has changed so
that the following enhancements are available:
- When no draft is explicitly specified we now use use the validator
draft that is specified in the "$schema" field of the criteria. This
is done by the jsonschema module by default and should support
possible future drafts without any changes to this code.
- Optionally allow to disable format checks in the code. As format
checks are not required by the spec there might be situations where
people want to disable them.
* Update requirements.txt
* Skip all tests which dependas on jsonschema 4.5
* jsonschema: Refactor code to support python 3.6
* Fix jsonschema requirements for python<3.7
* jsonschema: Update code for compatibility
* Better documentation and error handling for missing schema specifications
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ashwini Mhatre <amhatre@redhat.com>
Co-authored-by: ashwini-mhatre <mashu97@gmail.com>
* fix typo. Add example for IPV6
* add unit tests for IPv6
Co-authored-by: serosset <serosset@cisco.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Welcome to support for indentation with spaces in to_xml plugin
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Changelog fragment
* Unit tests for:
* Indent with spaces and explicit indent_width (4)
* Invalid indent
I also slightly modified VALID_DATA to produce output with indentation,
so existing test_valid_data and OUTPUT has been updated accordingly.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix changelog section name to minor_changes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add validated content plugin support
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix filter and test documentation syntax errors.
Most cases were strings that were YAML-parsable as dictionaries due to colons,
sometimes of the form `str: str`, and sometimes of the form `str: list`.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Unit Tests To Capture Failures From 'subnet' Generator
The netaddr library returns a generator for the 'subnet' call. This works great until you use larger networks. While it is uncommon to encounter it in IPv4 usage it is trivial to hit it in IPv6.
* Switch To Calculating Networking Information Directly For Performance
This replaces the inefficient generator for 'subnet' and uses math to determine the result directly. Since a list is not returned directly to the client in the implemented cases this works great and is fast.
A further optimization at least on the logic of this might be to break the different cases implemented by the filter out into unique functions. I did not do this yet because I wanted to get feedback on this direction.
* Changelog Fragment For PR / Bugfix
Adding changelog fragment that references source issue.
* Dropping Python 3.7 Bypass Removes Need For 'sys' Module
A test for ipsubnet was bypassed under 3.7 because of an inconsistent return value w/3.6 and 2.7. I removed the bypass and changed the behavior of the filter to raise an AnsibleFilterError in all versions of Python.
* Add A Pair of Integration Tests
These demonstrate the issue with the current implementation and would normally stall out while building the list of possible subnets from the generator.
* Address Changelog Feedback
I kept the performance item as a bugfix but bumped the typing to a minor change.
* Add 'netaddr' To Integration Test 'requirements.txt'
* The `ansible-test integration --docker` requires this line in requirements.txt to pass the 'netaddr' related tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace str -> to_text
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kate Case <this.is@katherineca.se>
* Enable update docs
* Remove foo
* Changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix validate-module sanity
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bradley A. Thornton <bthornto@redhat.com>