Few API's should return 400 for non-existing parameters

Bug #1640173 reported by Pranali Khatode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Wishlist
Unassigned

Bug Description

If you pass non-existing parameters in body to the volume API's, then it returns 404 HTTPNotFound error.
According to api guidelines [1] it should return 400 HTTPBadRequest.

[1] https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications

API's having incorrect return status code:

1.cinder create :
  If you pass following non-existing parameters to volume create API,it returns 404 instead of 400:
  a.consistency group id
  b.source volume id
  c.source replica id
  d.snapshot id

3.cinder rename:
  If you pass following non-existing parameters to volume rename API,it returns 404 instead of 400:
  a.Volume ID

3.cinder snapshot-create:
  If you pass following non-existing parameters to volume snapshot-create API,it returns 404 instead of 400:
  a.Volume ID

4.cinder snapshot-delete:
  If you pass following non-existing parameters to volume snapshot-delete API,it returns 404 instead of 400:
  a.Volume ID

5.cinder snapshot-manage:
  If you pass following non-existing parameters to volume snapshot-manage API,it returns 404 instead of 400:
  a.Volume ID

6.cinder snapshot-rename:
  If you pass following non-existing parameters to volume snapshot-rename API,it returns 404 instead of 400:
  a.Volume ID

Changed in cinder:
assignee: nobody → Pranali Khatode (pranali.khatode)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/401941

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/401941
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer with a -2. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer with the -2 on this review to ensure you address their concerns.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: Pranali Khatode (pranali.khatode) → nobody
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/828459

Changed in cinder:
status: New → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

This bug is no longer valid. Schema validation has been available in the v3 API since Rocky, and that's the only API we have at this point.

Changed in cinder:
status: In Progress → Invalid
Changed in cinder:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by "Tushar Trambak Gite <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/828459

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.