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
base: trunk
from

Conversation

Projects
None yet
3 participants
@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.

Add support for GCE list paging and filtering
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

This comment has been minimized.

Show comment
Hide comment
@erjohnso

erjohnso Mar 31, 2015

Member

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

Member

erjohnso commented Mar 31, 2015

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

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 31, 2015

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@erjohnso

erjohnso Mar 31, 2015

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

Member

erjohnso commented Mar 31, 2015

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

This comment has been minimized.

Show comment
Hide comment
@verb

verb 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 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

This comment has been minimized.

Show comment
Hide comment
@verb

verb Apr 29, 2015

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

verb commented Apr 29, 2015

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

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Apr 29, 2015

Member

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

Member

Kami commented Apr 29, 2015

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

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Apr 29, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@erjohnso

erjohnso May 13, 2015

Member

Sorry for the delay, @verb! Thanks!!

Member

erjohnso commented May 13, 2015

Sorry for the delay, @verb! Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment