Merge "Fix improper prompt when update RC with existed one's name."

This commit is contained in:
Jenkins 2017-02-16 23:33:33 +00:00 committed by Gerrit Code Review
commit 227a4dff25
2 changed files with 2 additions and 1 deletions

View File

@ -183,7 +183,7 @@ def update_resource_class(req):
except exception.ResourceClassExists:
raise webob.exc.HTTPConflict(
_('Resource class already exists: %(name)s') %
{'name': name},
{'name': rc.name},
json_formatter=util.json_error_formatter)
except exception.ResourceClassCannotUpdateStandard:
raise webob.exc.HTTPBadRequest(

View File

@ -151,6 +151,7 @@ tests:
status: 409
response_strings:
- Resource class already exists
- $ENVIRON['CUSTOM_RES_CLASS']
- name: update custom resource class
PUT: /resource_classes/$ENVIRON['CUSTOM_RES_CLASS']