-
Notifications
You must be signed in to change notification settings - Fork 342
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
Add support for ipv6 addresses #430
Add support for ipv6 addresses #430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed formatting changes
This comment has been minimized.
This comment has been minimized.
3ba2ba5
to
9e5c9a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to raise this PR.
The kwargs logic currently looks a little broken. I've added some suggestions as to how to fix this.
If possible please also add some integration tests. There are currently two examples of integration tests for lookups:
- https://github.com/ansible-collections/amazon.aws/tree/main/tests/integration/targets/lookup_aws_account_attribute
- https://github.com/ansible-collections/amazon.aws/tree/main/tests/integration/targets/lookup_aws_secret
It would be really good if these tests could test
- unlimited lookup
- limiting by region
- limiting by service
- limiting by region and service
- setting ipv6_prefix(es) to True
- setting ipv6_prefix(es) to False
I'd recommend just checking that the returned values are valid ipv4/ipv6 CIDRs, since we have no guarantees what IP addresses Amazon would use.
Integration tests are simply an Ansible role in the tests/integration/targets directory named after the module being tested (lookups are prefixed with |
We also need a changelog fragment: https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to |
recheck |
recheck |
@abhattacharyaNS1 this PR contains the following merge commits: Please rebase your branch to remove these commits. |
@abhattacharyaNS1 this PR contains the following merge commits: Please rebase your branch to remove these commits. |
Verify ipv4 and ipv6 addresses with matching cidr
Pass keyword argument to get ipv6_prefixes Co-authored-by: Mark Chappell <[email protected]>
Verify ipv4 and ipv6 addresses with matching cidr
9b18629
to
031874f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor tweaks
tests/integration/targets/lookup_aws_service_ip_ranges/tasks/main.yaml
Outdated
Show resolved
Hide resolved
60df222
to
e810e8e
Compare
@tremble Thanks for the fix! Please let me know if there is anything else i need to add to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly niggles, I'll merge these, if they pass CI we can get it into main.
tests/integration/targets/lookup_aws_service_ip_ranges/tasks/main.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SUMMARY
Allow amazon.aws.aws_service_ip_ranges to return only IPv6 addresses with setting ipv6_prefixes=True
ISSUE TYPE
COMPONENT NAME
amazon.aws.aws_service_ip_ranges
ADDITIONAL INFORMATION
Closes #438