From 09b903ed5e3306cf200328f41ce6df371923d03d Mon Sep 17 00:00:00 2001 From: Mark Washenberger Date: Wed, 19 Sep 2012 18:41:03 +0000 Subject: Fix marker pagination for /servers Fixes bug 1053028. Recent changes to pagination required passing in full sqlalchemy objects into paginate_query. However, calls to paginate_query were passing in strings. Change-Id: Ib1396a78a12aef1a9cdc31f3624af30f19da44b5 --- nova/api/openstack/compute/servers.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 18161b830..53fb6517d 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -496,9 +496,14 @@ class Controller(wsgi.Controller): search_opts['user_id'] = context.user_id limit, marker = common.get_limit_and_marker(req) - instance_list = self.compute_api.get_all(context, - search_opts=search_opts, - limit=limit, marker=marker) + try: + instance_list = self.compute_api.get_all(context, + search_opts=search_opts, + limit=limit, + marker=marker) + except exception.MarkerNotFound as e: + msg = _('marker [%s] not found') % marker + raise webob.exc.HTTPBadRequest(explanation=msg) if is_detail: self._add_instance_faults(context, instance_list) -- cgit