diff options
| author | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2013-01-21 19:36:20 -0500 |
|---|---|---|
| committer | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2013-01-22 09:43:25 -0500 |
| commit | 656052036374086f785f02bf288d23af14ab2ab5 (patch) | |
| tree | fc85a3cded66d1c20174218e901f59b35e8fec0b /nova/api | |
| parent | fab8af583bf6c363d2cebbc360ae2709325d80bd (diff) | |
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
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) |
