Update quotas shouldn't allow bad keys in the request

Bug #1248815 reported by Abhijeet Malawade on 2013-11-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Abhijeet Malawade

Bug Description

When user passes bad keys to update quota api, it returns 200 OK response. It should return 400 Bad Request error for bad keys.


Request Body
"quota_set": {
"gigabytes": 5,
"xyz": 2

Actual Response: 200 OK
{"quota_set": {"gigabytes": 5, "snapshots": 1000, "volumes": 10}}

Expected Response: 400
{"badRequest": {"message": "Bad key(s) xyz in quota_set", "code": 400}}

Note: Nova doesn't allow bad keys in the os-quota-sets put method.

Tags: ntt Edit Tag help
Changed in cinder:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)

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

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/55980
Committed: http://github.com/openstack/cinder/commit/0d91b1a86a211610f78ac5c0df5a0b02b5a2f3a1
Submitter: Jenkins
Branch: master

commit 0d91b1a86a211610f78ac5c0df5a0b02b5a2f3a1
Author: Abhijeet Malawade <email address hidden>
Date: Wed Nov 6 03:20:54 2013 -0800

    Do not allow bad keys while updating quota

    Raise 400 (bad request) error instead of 200 (ok) if bad keys
    are passed to the update quota request

    Closes-Bug: #1248815

    Change-Id: Iaefaa4961dd3783dfab15f843cbb2dcb12195a7d

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers