From 656052036374086f785f02bf288d23af14ab2ab5 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 21 Jan 2013 19:36:20 -0500 Subject: List servers having non-existent flavor should return empty list When we catch the exception just return an empty list. Fixes LP# 1102462 Change-Id: I730bd505c40fa76cb0ba687575e3c3882fee6254 --- nova/api/openstack/compute/servers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 308530b8e..f7f186870 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -540,8 +540,9 @@ class Controller(wsgi.Controller): msg = _('marker [%s] not found') % marker raise exc.HTTPBadRequest(explanation=msg) except exception.FlavorNotFound as e: - msg = _("Flavor could not be found") - raise exc.HTTPUnprocessableEntity(explanation=msg) + log_msg = _("Flavor '%s' could not be found ") + LOG.debug(log_msg, search_opts['flavor']) + instance_list = [] if is_detail: self._add_instance_faults(context, instance_list) -- cgit