diff options
author | Mark Washenberger <mark.washenberger@rackspace.com> | 2012-09-19 18:41:03 +0000 |
---|---|---|
committer | Mark Washenberger <mark.washenberger@rackspace.com> | 2012-09-19 19:14:33 +0000 |
commit | 09b903ed5e3306cf200328f41ce6df371923d03d (patch) | |
tree | 67f7b29fa9f0a7f5e20f65ccd04a0f4f122c8304 /nova/api | |
parent | 8473bb4cf93eb713ef42fdc87767aa938f36b43e (diff) | |
download | nova-09b903ed5e3306cf200328f41ce6df371923d03d.tar.gz nova-09b903ed5e3306cf200328f41ce6df371923d03d.tar.xz nova-09b903ed5e3306cf200328f41ce6df371923d03d.zip |
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
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/openstack/compute/servers.py | 11 |
1 files changed, 8 insertions, 3 deletions
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) |