From d7646222c0224f9227f5a8bd1e21e36556ccf00f Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 6 Mar 2017 14:37:45 -0800 Subject: [PATCH] Teach os-aggregates about cells Related to blueprint cells-aware-api Change-Id: I6850534b7d2729c7b40d9f0afe10a440025b5123 --- nova/api/openstack/compute/aggregates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/api/openstack/compute/aggregates.py b/nova/api/openstack/compute/aggregates.py index 53fa17c30..344207c2e 100644 --- a/nova/api/openstack/compute/aggregates.py +++ b/nova/api/openstack/compute/aggregates.py @@ -150,6 +150,7 @@ class AggregateController(wsgi.Controller): try: aggregate = self.api.add_host_to_aggregate(context, id, host) except (exception.AggregateNotFound, + exception.HostMappingNotFound, exception.ComputeHostNotFound) as e: raise exc.HTTPNotFound(explanation=e.format_message()) except (exception.AggregateHostExists, @@ -172,7 +173,7 @@ class AggregateController(wsgi.Controller): try: aggregate = self.api.remove_host_from_aggregate(context, id, host) except (exception.AggregateNotFound, exception.AggregateHostNotFound, - exception.ComputeHostNotFound): + exception.HostMappingNotFound, exception.ComputeHostNotFound): msg = _('Cannot remove host %(host)s in aggregate %(id)s') % { 'host': host, 'id': id} raise exc.HTTPNotFound(explanation=msg)