Pagination in Storage/Central
The storage and central API should accept "page" and "per_page" values.
Additionally, we need to amend the listing methods to return some additional metadata like "total_items" etc
Mock a central method for finding domains:
def find_domains(self, context, criterion=None, page=None, per_page=None):
# ....
domains = [{
'id': '12345',
'name': 'example.com.',
}, {
'id': '54321',
'name': 'example.org.',
}]
metadata = {
}
return domains, metadata
Mock usage:
domains, metadata = central_
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Kiall Mac Innes
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
WIP - Add Pagination support to storage+central