The panko.api.controllers.v2.utils Module

The panko.api.controllers.v2.utils Module

@panko.api.controllers.v2.utils.set_pagination_options(sort, limit, marker, api_model)[source]

Sets the options for pagination specifying query options

Arguments: sort – List of sorting criteria. Each sorting option has to format

<sort key>:<sort direction>

Valid sort keys: message_id, generated

(SUPPORT_SORT_KEYS in panko/event/storage/

Valid sort directions: asc (ascending), desc (descending)

(SUPPORT_DIRS in panko/event/storage/ This defaults to asc if unspecified (DEFAULT_DIR in panko/event/storage/ (see _get_pagination_query) If sort list is empty, this defaults to [‘generated:asc’, ‘message_id:asc’]

(DEFAULT_SORT in panko/event/storage/

limit – Integer specifying maximum number of values to return

If unspecified, this defaults to pecan.request.cfg.api.default_api_return_limit

marker – If specified, assumed to be an integer and assumed to be the

message id of the last object on the previous page of the results

api_model – Specifies the class implementing the api model to use for

this pagination. The class is expected to provide the following members:


Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.