[
https://issues.apache.org/jira/browse/JCLOUDS-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121233#comment-14121233
]
Andrey Trubitsyn commented on JCLOUDS-687:
------------------------------------------
Hi Guys,
Thank you for your feedback.
As I could understand the problem is the next:
OpenStack APIs (nova, neutron, etc.) have list(PaginationOptions o) methods
which by default return all requested entities. (if pagination is disabled at
the server side)
For example
Ports list(PaginationOptions options) in PortApi returns all entities if it is
called list(new PaginationOptions()). And if there are a lot of ports it could
be a problem to pull all of them. I think it would be useful to set "limit" to
a value by default.
I don't think we should use a global core constant for that ( as you pointed ).
Also I think "core" is not proper module for that. I would like to go through
jclouds-labs-openstack and add a default value for "limit" parameter in
PaginationOptions, ListContainerOptions, ... (all *Option classes that set
"limit" parameter).
But I am not sure about the correct place for the default "page_size" values in
openstack APIs. May be it is ok to have the default "page_size" value in every
API?
> Configurable API/Provider Default Page Size
> -------------------------------------------
>
> Key: JCLOUDS-687
> URL: https://issues.apache.org/jira/browse/JCLOUDS-687
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-core
> Affects Versions: 1.6.0, 1.7.0, 1.8.0
> Reporter: Jeremy Daggett
> Assignee: Jeremy Daggett
> Priority: Minor
> Labels: jclouds, openstack
> Fix For: 2.0.0
>
>
> Each OpenStack API has a default page size that can be returned by the
> service. The page sizes differ between APIs and there should be a way to
> reflect this in API/provider configuration. The page size is typically used
> in the list/get related operations.
> The opportunity arises to expand this to all APIs that have a default page
> size by introducing a new constant "PROPERTY_PAGE_SIZE" or
> "PROPERTY_DEFAULT_PAGE_SIZE" to the {{org.jclouds.Constants}} class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)