attempting to delete a non existant flavor extra spec returns 204
Bug #1219445 reported by
Christopher Yeoh
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Jake Liu |
Bug Description
Attempting to delete a non existant flavor extra spec returns 204 instead of 404
Changed in nova: | |
assignee: | nobody → Jake Liu (jake-liu) |
Changed in nova: | |
status: | New → Confirmed |
milestone: | none → havana-rc1 |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-rc1 → 2013.2 |
To post a comment you must log in.
Hi Chris, there are two ways to fix this:
1) Directly change 204 to 404 in
@wsgi.response(404)
def delete(self, req, flavor_id, id):
2) Use
@wsgi.response(204) expected_ errors( 404)
@extensions.
def delete(self, req, flavor_id, id):
Solution 2) also needs to update DB api to make sure instance_ type_extra_ specs_delete throw excetion so as to let delete() catch the exception and throw HTTPNotFound.
Which one do you think is better? Thanks.