diff options
| author | Yuriy Taraday <yorik.sar@gmail.com> | 2013-02-20 02:11:38 +0400 |
|---|---|---|
| committer | Yuriy Taraday <yorik.sar@gmail.com> | 2013-02-23 02:41:21 +0400 |
| commit | eaab3c2ae2c591b700d9b3d78bb3854243c5ce85 (patch) | |
| tree | d1bd3ba083b7e0bd32fa8fd5e1b6e37cfb77cf1b /keystone/common | |
| parent | 95815708ebc2cacc7d3b1da0602aebc791ac2258 (diff) | |
Remove obsolete *page[_marker] methods from LDAP backend.
Change-Id: I87a75c9f1cd3f6cb3f233df6e54125f35ae4631c
Diffstat (limited to 'keystone/common')
| -rw-r--r-- | keystone/common/ldap/core.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/keystone/common/ldap/core.py b/keystone/common/ldap/core.py index f0a5cac6..0462c52f 100644 --- a/keystone/common/ldap/core.py +++ b/keystone/common/ldap/core.py @@ -270,51 +270,6 @@ class BaseLdap(object): return [self._ldap_res_to_model(x) for x in self._ldap_get_all(filter)] - def get_page(self, marker, limit): - return self._get_page(marker, limit, self.get_all()) - - def get_page_markers(self, marker, limit): - return self._get_page_markers(marker, limit, self.get_all()) - - @staticmethod - def _get_page(marker, limit, lst, key=lambda x: x.id): - lst.sort(key=key) - if not marker: - return lst[:limit] - else: - return [x for x in lst if key(x) > marker][:limit] - - @staticmethod - def _get_page_markers(marker, limit, lst, key=lambda x: x.id): - if len(lst) < limit: - return (None, None) - - lst.sort(key=key) - if marker is None: - if len(lst) <= limit + 1: - nxt = None - else: - nxt = key(lst[limit]) - return (None, nxt) - - i = 0 - for i, item in enumerate(lst): - k = key(item) - if k >= marker: - break - - if i <= limit: - prv = None - else: - prv = key(lst[i - limit]) - - if i + limit >= len(lst) - 1: - nxt = None - else: - nxt = key(lst[i + limit]) - - return (prv, nxt) - def update(self, id, values, old_obj=None): if not self.allow_update: action = _('LDAP %s update') % self.options_name |
