-
Notifications
You must be signed in to change notification settings - Fork 615
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
Adds implementation for (IP) Rules Lists #507
Conversation
Acceptance Tests have been added
|
Cursor string `json:"cursor"` | ||
Cursors ResultInfoCursors `json:"cursors"` |
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.
Nice! This would be great to see on other API endpoints 😄
I see what you mean about the method names and blanketing the functionality as "IP Lists". For the future planned improvements, will they still be IPs when managing? Or will it be managed as say, the country code or ASN? I don't like varying from the Cloudflare terminology for features as it creates confusion however I'm also wary of the potential issue we could be introducing by calling this an "IP List" if in fact, it is not a list of IPs. Does something like Firewall Lists or Firewall Rule Lists make more sense as to what this does?
In these scenarios, I've lent on putting as much in |
Why actually decide between one or the other if we can have both. Create, Replace and Delete IP List Items now have
Up to a total of 510 seconds.
Regarding the naming, I think continuing with IP Lists is a good approach. We will stick to the announcement from the Blog post. If there will be support for Countries or ASNs in the future, this is data that will be derived from IP Addresses in the end. @prdonahue might have other proposals but I think it's a good compromise and much clearer than something like Firewall Rules Lists. |
Having both is a great middle ground option; leave it up to the implementation to work out which suits the use case. I'm 👍 to leaving the feature naming as is for now and we can manage the upcoming changes when they land. |
Sounds good. I'm opening this for reviews. |
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.
This is looking pretty great @cehrig! Despite the number of comments (most of them are duplicate suggestions to save you some work if you choose to make the change) I'm really liking this and none of my comments are blockers; just nitpicks to tighten up a few things with existing conventions or readability.
Co-authored-by: Jacob Bednarz <jacob.bednarz@gmail.com>
I've applied your suggestions. Thanks a bunch @jacobbednarz for taking the time reviewing! |
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.
Nice work! This is awesome. Looking forward to getting this into Terraform and using it
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.
Looks awesome, thanks!
* Adds implementation for Rules Lists * Apply suggestions from code review Co-authored-by: Jacob Bednarz <jacob.bednarz@gmail.com> * Returns an error if BulkOperation returns an unexpected status Co-authored-by: Christian Ehrig <cehrig@cloudflare.com> Co-authored-by: Jacob Bednarz <jacob.bednarz@gmail.com>
* Adds implementation for Rules Lists * Apply suggestions from code review Co-authored-by: Jacob Bednarz <jacob.bednarz@gmail.com> * Returns an error if BulkOperation returns an unexpected status Co-authored-by: Christian Ehrig <cehrig@cloudflare.com> Co-authored-by: Jacob Bednarz <jacob.bednarz@gmail.com>
This PR adds some new methods for working with IP Lists (https://api.cloudflare.com/#rules-lists-properties).
This feature has been introduced as IP Lists (https://blog.cloudflare.com/introducing-ip-lists/) although there will be Country lists or ASN lists in the future. The API calls it Rules Lists. I kept it more specific and re-used the term IP Lists here.
Todo:
Write TestsList IP List Items:
This endpoint works based on cursors, where each cursor returns 25 Items and there's no option to increase 'page size'. This will potentially cause some wait times when working with big IP Lists.
#505