Merge "[placement] add name to resource provider create error"

This commit is contained in:
Zuul 2017-12-14 14:26:06 +00:00 committed by Gerrit Code Review
commit b9cdcc3f80
2 changed files with 4 additions and 2 deletions

View File

@ -182,8 +182,9 @@ def create_resource_provider(req):
{'duplicate': duplicate})
except exception.ObjectActionError as exc:
raise webob.exc.HTTPBadRequest(
_('Unable to create resource provider %(rp_uuid)s: %(error)s') %
{'rp_uuid': uuid, 'error': exc})
_('Unable to create resource provider "%(name)s", %(rp_uuid)s: '
'%(error)s') %
{'name': data['name'], 'rp_uuid': uuid, 'error': exc})
req.response.location = util.resource_provider_url(
req.environ, resource_provider)

View File

@ -287,6 +287,7 @@ tests:
status: 400
response_strings:
- 'parent provider UUID cannot be same as UUID'
- 'Unable to create resource provider \"child\", $ENVIRON["ALT_PARENT_PROVIDER_UUID"]:'
- name: update a parent provider UUID to non-existing provider
PUT: /resource_providers/$ENVIRON['RP_UUID']