IIUC all the items of the list (=N) can *only* be fetched if:
"osapi_max_limit" >= N
and if N > "osapi_max_limit" then N - "osapi_max_limit" items get truncated. The code [1] has this section:
def _get_collection_links(self, request, items, collection_name, id_key="uuid"):
"""Retrieve 'next' link, if applicable. This is included if:
1) 'limit' param is specified and equals the number of items.
2) 'limit' param is specified but it exceeds CONF.osapi_max_limit,
in this case the number of items is CONF.osapi_max_limit.
3) 'limit' param is NOT specified but the number of items is CONF.osapi_max_limit.
"""
links = []
max_items = min( int(request.params.get("limit", CONF.osapi_max_limit)), CONF.osapi_max_limit)
if max_items and max_items == len(items):
IIUC all the items of the list (=N) can *only* be fetched if:
"osapi_ max_limit" >= N
and if N > "osapi_max_limit" then N - "osapi_max_limit" items get truncated. The code [1] has this section:
def _get_collection _links( self,
request,
items,
collection_ name,
id_key= "uuid") : max_limit, max_limit.
CONF.osapi_ max_limit.
int( request. params. get("limit" , CONF.osapi_ max_limit) ),
CONF. osapi_max_ limit)
"""Retrieve 'next' link, if applicable. This is included if:
1) 'limit' param is specified and equals the number of items.
2) 'limit' param is specified but it exceeds CONF.osapi_
in this case the number of items is CONF.osapi_
3) 'limit' param is NOT specified but the number of items is
"""
links = []
max_items = min(
if max_items and max_items == len(items):
The "==" confuses me, I would expect "<" here.
References: /github. com/openstack/ nova/blob/ c857d791a2f127e 63c20ae8380498f f67e76051b/ nova/api/ openstack/ common. py#L471
[1] https:/