Rebased to latest master and adapted the changes in 
https://github.com/jclouds/jclouds-labs/pull/22 to make user pagination 
transparent too. The user list uses a custom parser to bypass 
[ABICLOUDPREMIUM-5927](http://jira.abiquo.com/browse/ABICLOUDPREMIUM-5927).

@carlosgarciaibanez could you checkout [my 
branch](https://github.com/nacx/jclouds-labs/tree/198-pagination) and check if 
it still fits your needs? Now pagination should be transparent and you should 
not have to deal with it. You just fetch the list and iterate as usual and 
jclouds will take care of fetching the pages.

```java
Enterprise enterprise = 
context.getAdministrationService().getCurrentEnterprise();
Iterable<User> users = enterprise.listUsers();
Iterable<User> users = 
enterprise.listUsers(UserOptions.builder().limit(2).build());
```

You can try this code and [enable the jclouds header 
logs](http://jclouds.incubator.apache.org/documentation/reference/jclouds-logging/)
 to see that the pages are being fetched as soon as they are needed when 
iterating the returned iterables.


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/24#issuecomment-22876065

Reply via email to