Skip to content
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 GCE list paging and filtering #491

Closed
wants to merge 1 commit into from

Conversation

verb
Copy link

@verb verb commented Mar 31, 2015

GCE will return a maximum of 500 resources in a single list. This change
adds an iterator that allows filtering and/or paging of list results.

GCE will return a maximum of 500 resources in a single list. This change
adds an iterator that allows filtering and/or paging of list results.
@erjohnso
Copy link
Member

/cc @Kami - mind giving us your thoughts on this?

@Kami
Copy link
Member

Kami commented Mar 31, 2015

Will dig in ASAP.

On a related note - we already have an establish pattern for handling paginated collections which should probably also work here. See https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/zerigo.py#L149 for an example.

@erjohnso
Copy link
Member

Ah, good point. Reminded me that the Google DNS driver also uses generators: https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/google.py

@verb
Copy link
Author

verb commented Mar 31, 2015

Ah, didn't see that. It looks like this would be the first time iterate_* is used in the compute driver.

It would be pretty easy to overlay the iterate_* functions on top of GCEList if my underlying approach is still sound. This would keep the filter functionality available in ex_list().

Alternatively we could establish a pattern for filter, too.

@verb
Copy link
Author

verb commented Apr 29, 2015

friendly ping and just checking in to make sure nothing is blocked on me.

@Kami
Copy link
Member

Kami commented Apr 29, 2015

@erjohnso can you please review this one and take it across the finish line?

@Kami
Copy link
Member

Kami commented Apr 29, 2015

@verb Sorry for the delay. I have quickly glanced over it and it looks good to me, but I haven't done any testing.

@asfgit asfgit closed this in 1ed5020 May 13, 2015
@erjohnso
Copy link
Member

Sorry for the delay, @verb! Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants