Merge "Add INVENTORY_INUSE to DELETE /rp/{u}/inventories"
This commit is contained in:
commit
7f9d8b279c
nova
api/openstack/placement/handlers
tests/functional/api/openstack/placement/gabbits
@ -362,7 +362,8 @@ def delete_inventories(req):
|
||||
except exception.InventoryInUse as ex:
|
||||
# NOTE(mriedem): This message cannot change without impacting the
|
||||
# nova.scheduler.client.report._RE_INV_IN_USE regex.
|
||||
raise webob.exc.HTTPConflict(ex.format_message())
|
||||
raise webob.exc.HTTPConflict(ex.format_message(),
|
||||
comment=errors.INVENTORY_INUSE)
|
||||
|
||||
response = req.response
|
||||
response.status = 204
|
||||
|
@ -55,6 +55,19 @@ tests:
|
||||
response_strings:
|
||||
- "Inventory for 'VCPU, DISK_GB' on resource provider '$ENVIRON['RP_UUID']' in use"
|
||||
|
||||
- name: fail to delete all inventory 1.23
|
||||
DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
request_headers:
|
||||
accept: application/json
|
||||
openstack-api-version: placement 1.23
|
||||
status: 409
|
||||
response_headers:
|
||||
content-type: /application/json/
|
||||
response_strings:
|
||||
- "Inventory for 'VCPU, DISK_GB' on resource provider '$ENVIRON['RP_UUID']' in use"
|
||||
response_json_paths:
|
||||
$.errors[0].code: placement.inventory.inuse
|
||||
|
||||
- name: get total usages by project
|
||||
GET: /usages?project_id=$ENVIRON['PROJECT_ID']
|
||||
request_headers:
|
||||
|
Loading…
x
Reference in New Issue
Block a user