Placement API should support DELETE /resource-providers/{uuid}/inventories

Bug #1653122 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Rafael Folco

Bug Description

This is a small feature request.

Currently (version 1.3 or before of the placement API), in order to delete all inventory for a resource provider, one must call PUT /resource_providers/{uuid}/inventories and pass in the following request payload:

{
  'generation': <int>,
  'resources': {}
}

it would be easier and more intuitive to support DELETE /resource_providers/{uuid}/inventories with no request payload and returning a 204 No Content on success.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Note that this will require a short blueprint because it touches the API and will require the following:

1) Changes to /nova/api/openstack/placement/handlers/inventory.py
2) A reno note advertising the additional placement REST API microversion and functionality

Revision history for this message
Chris Dent (cdent) wrote :

Just for clarity, it is also possible to delete a single inventory at a time, so the other process would be to GET /resource_providers/{uuid}/inventories, and then DELETE /resource_providers/{uuid}/inventories/{resource_class} for each class of resource that is present.

Changed in nova:
assignee: nobody → Rafael Folco (rafaelfolco)
Revision history for this message
Pushkar Umaranikar (pushkar-umaranikar) wrote :

Rafael, are you still working on this ?

Revision history for this message
Rafael Folco (rafaelfolco) wrote :

https://review.openstack.org/#/c/416669/

Yes, just put this on hold for a while due to Ocata freeze... this has been pushed to Pike. Also to stop the frenetic increase of microversions so don't need to update the patch all the time with daily rebases. I'll update the patch this week.

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in nova:
status: In Progress → Triaged
assignee: Rafael Folco (rafaelfolco) → nobody
Revision history for this message
Jay Pipes (jaypipes) wrote :

https://review.openstack.org/#/c/460147/ is the active review on this.

Changed in nova:
assignee: nobody → Rafael Folco (rafaelfolco)
Sean Dague (sdague)
Changed in nova:
status: Triaged → In Progress
Changed in nova:
status: In Progress → Fix Committed
Chris Dent (cdent)
Changed in nova:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.