diff --git a/nova/api/openstack/placement/handlers/allocation.py b/nova/api/openstack/placement/handlers/allocation.py index 8d5cadd184..1e028efde0 100644 --- a/nova/api/openstack/placement/handlers/allocation.py +++ b/nova/api/openstack/placement/handlers/allocation.py @@ -257,9 +257,9 @@ def _set_allocations(req, schema): # capacity limits have been exceeded. except exception.NotFound as exc: raise webob.exc.HTTPBadRequest( - _("Unable to allocate inventory for resource provider " - "%(rp_uuid)s: %(error)s") % - {'rp_uuid': resource_provider_uuid, 'error': exc}) + _("Unable to allocate inventory for consumer " + "%(consumer_uuid)s: %(error)s") % + {'consumer_uuid': consumer_uuid, 'error': exc}) except exception.InvalidInventory as exc: raise webob.exc.HTTPConflict( _('Unable to allocate inventory: %(error)s') % {'error': exc}) diff --git a/nova/tests/functional/api/openstack/placement/gabbits/allocations.yaml b/nova/tests/functional/api/openstack/placement/gabbits/allocations.yaml index b07ee9342b..bf9b648332 100644 --- a/nova/tests/functional/api/openstack/placement/gabbits/allocations.yaml +++ b/nova/tests/functional/api/openstack/placement/gabbits/allocations.yaml @@ -192,6 +192,7 @@ tests: COWS: 12 status: 400 response_strings: + - Unable to allocate inventory for consumer - No such resource class COWS response_json_paths: $.errors[0].title: Bad Request