Remove redundant limit param check in API
limit param has been checked in get_pagination_params method before calling _get_all method Change-Id: I987f88981bcca7219142aeed4a8c730832f00348
This commit is contained in:
parent
7824d9a432
commit
18dcda1ee0
|
@ -169,16 +169,6 @@ class OperationLogsController(wsgi.Controller):
|
|||
|
||||
all_tenants = utils.get_bool_param('all_tenants', filters)
|
||||
|
||||
try:
|
||||
if limit is not None:
|
||||
limit = int(limit)
|
||||
if limit < 0:
|
||||
msg = _('limit param must be positive')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
except ValueError:
|
||||
msg = _('limit param must be an integer')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
|
||||
if filters:
|
||||
LOG.debug("Searching by: %s.", six.text_type(filters))
|
||||
|
||||
|
|
|
@ -212,16 +212,6 @@ class PlansController(wsgi.Controller):
|
|||
|
||||
all_tenants = utils.get_bool_param('all_tenants', filters)
|
||||
|
||||
try:
|
||||
if limit is not None:
|
||||
limit = int(limit)
|
||||
if limit < 0:
|
||||
msg = _('limit param must be positive')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
except ValueError:
|
||||
msg = _('limit param must be an integer')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
|
||||
if filters:
|
||||
LOG.debug("Searching by: %s.", six.text_type(filters))
|
||||
|
||||
|
|
|
@ -228,16 +228,6 @@ class ProvidersController(wsgi.Controller):
|
|||
if filters is None:
|
||||
filters = {}
|
||||
|
||||
try:
|
||||
if limit is not None:
|
||||
limit = int(limit)
|
||||
if limit <= 0:
|
||||
msg = _('limit param must be positive')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
except ValueError:
|
||||
msg = _('limit param must be an integer')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
|
||||
if filters:
|
||||
LOG.debug("Searching by: %s.", six.text_type(filters))
|
||||
|
||||
|
|
|
@ -168,16 +168,6 @@ class RestoresController(wsgi.Controller):
|
|||
|
||||
all_tenants = utils.get_bool_param('all_tenants', filters)
|
||||
|
||||
try:
|
||||
if limit is not None:
|
||||
limit = int(limit)
|
||||
if limit <= 0:
|
||||
msg = _('limit param must be positive')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
except ValueError:
|
||||
msg = _('limit param must be an integer')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
|
||||
if filters:
|
||||
LOG.debug("Searching by: %s.", six.text_type(filters))
|
||||
|
||||
|
|
|
@ -166,16 +166,6 @@ class VerificationsController(wsgi.Controller):
|
|||
|
||||
all_tenants = utils.get_bool_param('all_tenants', filters)
|
||||
|
||||
try:
|
||||
if limit is not None:
|
||||
limit = int(limit)
|
||||
if limit <= 0:
|
||||
msg = _('limit param must be positive')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
except ValueError:
|
||||
msg = _('limit param must be an integer')
|
||||
raise exception.InvalidInput(reason=msg)
|
||||
|
||||
if filters:
|
||||
LOG.debug("Searching by: %s.", six.text_type(filters))
|
||||
|
||||
|
|
Loading…
Reference in New Issue