* 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> |
||
---|---|---|
.. | ||
integration | ||
sanity | ||
unit |