def get_pagination_params(request):
    params = {}
    for param in ['marker', 'limit']:
        if not param in request.GET:
            continue
        try:
            params[param] = int(request.GET[param])
        except ValueError:
            msg = _('%s param must be an integer') % param
            raise webob.exc.HTTPBadRequest(explanation=msg)
        if params[param] < 0:
            msg = _('%s param must be positive') % param
            raise webob.exc.HTTPBadRequest(explanation=msg)

    return params
Return marker, limit tuple from request.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/common.py/get_pagination_params