-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use None rather than Empty list #296
Conversation
… by None rather than empty list.
While it is fine to handle here, it would be nicer if the linode api would handle empty lists in this case and set it to None automatically. |
/acctest tests=firewall_update sha=35f54c118edb767c90e22f8e9b0c95714e2e7eed |
@marcfiu Did you have a chance to notify the Linode API team about this issue? And please let us know when this PR is ready to review as it is still a draft PR. |
/acctest tests=firewall_update sha=08be018c0881ae434ba21a200717006fa1c01d41 |
@zliang-akamai : the changes are ready for review. Btw., I have not contacted the Linode API team on treating |
📝 Description
Another untested case for firewall updates yielded improper handling of rules that had either no ipv4 or ipv6 addresses. The code would default to an empty list, while the API wants None in that case.
What does this PR do and why is this change necessary?
Default to None to represent an empty IPvX list in rules.
✔️ How to Test
What are the steps to reproduce the issue or verify the changes?
How do I run the relevant unit/integration tests?
use included firewall_update/main.yaml test
📷 Preview
If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.