-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
Description
all "list()" operations, like for AccountsGroupV2API have parameters "count" and "start_index" which can be set and should provide the possibility to paginate when loading the objects.
However, the "startIndex" element in the query dictionary is always being overwritten with 1, so pagination cannot work:
query = {}
if attributes is not None:
query["attributes"] = attributes
if count is not None:
query["count"] = count
if excluded_attributes is not None:
query["excludedAttributes"] = excluded_attributes
if filter is not None:
query["filter"] = filter
if sort_by is not None:
query["sortBy"] = sort_by
if sort_order is not None:
query["sortOrder"] = sort_order.value
if start_index is not None:
query["startIndex"] = start_index
headers = {
"Accept": "application/json",
}
query["startIndex"] = 1
if "count" not in query:
query["count"] = 10000
but it should be
if "startIndex" not in query:
query["startIndex"] = 1
This is the case for all 12 list implementations
Reproduction
Just look at the code or try to use pagination with one of the "list" implementations in iam.py.
Expected behavior
pagination should work. startIndex should not be overwritten if it is set as method parameter.
HansjoergW
Metadata
Metadata
Assignees
Labels
No labels