Delete limited_by_marker from api/common.py
The function limited_by_marker seems unused, untested and hasn't been
edited in a significant manner since the fork out of Nova. This patch
removes it.
@@ -156,29 +156,6 @@ def limited(items, request, max_limit=None):
return items[offset:range_end]
-def limited_by_marker(items, request, max_limit=None):
- """Return a slice of items according to the requested marker and limit."""
- max_limit = max_limit or CONF.osapi_max_limit
- marker, limit, __ = get_pagination_params(request.GET.copy(), max_limit)
-
- start_index = 0
- if marker:
- start_index = -1
- for i, item in enumerate(items):
- if 'flavorid' in item:
- if item['flavorid'] == marker:
- start_index = i + 1
- break
- elif item['id'] == marker or item.get('uuid') == marker:
- start_index = i + 1
- break
- if start_index < 0:
- msg = _('marker [%s] not found') % marker
- raise webob.exc.HTTPBadRequest(explanation=msg)
- range_end = start_index + limit
- return items[start_index:range_end]
-
-
def get_sort_params(params, default_key='created_at', default_dir='desc'):
"""Retrieves sort keys/directions parameters.
