libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-453) Provide abstraction for data retrieval for the paginated APIs
Date Thu, 05 Dec 2013 15:16:35 GMT
Tomaz Muraus created LIBCLOUD-453:
-------------------------------------

             Summary: Provide abstraction for data retrieval for the paginated APIs
                 Key: LIBCLOUD-453
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-453
             Project: Libcloud
          Issue Type: Task
          Components: Core
            Reporter: Tomaz Muraus
            Priority: Minor


Currently, we don't have a standard abstraction for data retrieval in the paginated APIs.
This means each driver needs to implement it separately which results in a lot of duplicated
code.

There are multiple ways we can solve this problem. One of them is to add a "PaginationMixin"
class which can be reused across the APIs and provides base functionality similar to the existing
"_get_more" and "_get_data" methods. Person implementing the driver would obviously still
need to provide some information such as transformation function, how to get the last key
and how to check if the result set has been exhausted

Here is an example of how this is currently solved in the Zerigo DNS driver - https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/zerigo.py#L438



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message