Merge "Remove duplicate error info"
This commit is contained in:
commit
d82a3a25fa
@ -111,12 +111,10 @@ def delete_resource_class(req):
|
|||||||
rc.destroy()
|
rc.destroy()
|
||||||
except exception.ResourceClassCannotDeleteStandard as exc:
|
except exception.ResourceClassCannotDeleteStandard as exc:
|
||||||
raise webob.exc.HTTPBadRequest(
|
raise webob.exc.HTTPBadRequest(
|
||||||
_('Cannot delete standard resource class %(rp_name)s: %(error)s') %
|
_('Error in delete resource class: %(error)s') % {'error': exc})
|
||||||
{'rp_name': name, 'error': exc})
|
|
||||||
except exception.ResourceClassInUse as exc:
|
except exception.ResourceClassInUse as exc:
|
||||||
raise webob.exc.HTTPConflict(
|
raise webob.exc.HTTPConflict(
|
||||||
_('Unable to delete resource class %(rp_name)s: %(error)s') %
|
_('Error in delete resource class: %(error)s') % {'error': exc})
|
||||||
{'rp_name': name, 'error': exc})
|
|
||||||
req.response.status = 204
|
req.response.status = 204
|
||||||
req.response.content_type = None
|
req.response.content_type = None
|
||||||
return req.response
|
return req.response
|
||||||
|
@ -55,7 +55,7 @@ tests:
|
|||||||
DELETE: /resource_classes/CUSTOM_GOLD
|
DELETE: /resource_classes/CUSTOM_GOLD
|
||||||
status: 409
|
status: 409
|
||||||
response_strings:
|
response_strings:
|
||||||
- Unable to delete resource class
|
- Error in delete resource class
|
||||||
- Class is in use in inventory
|
- Class is in use in inventory
|
||||||
|
|
||||||
- name: delete the allocation
|
- name: delete the allocation
|
||||||
@ -66,7 +66,7 @@ tests:
|
|||||||
DELETE: /resource_classes/CUSTOM_GOLD
|
DELETE: /resource_classes/CUSTOM_GOLD
|
||||||
status: 409
|
status: 409
|
||||||
response_strings:
|
response_strings:
|
||||||
- Unable to delete resource class
|
- Error in delete resource class
|
||||||
- Class is in use in inventory
|
- Class is in use in inventory
|
||||||
|
|
||||||
- name: delete the inventory
|
- name: delete the inventory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user