os-quota-sets update documentation is incorrect

Bug #1218235 reported by Steve Gregory
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Miranda Zhang

Bug Description

The documentation for os-quota-sets suggests that to update a quota one should make a POST request to v2/{tenant_id}/os-quota-sets/{tenant_id} with a request body of :
{
    "quota_set": {
        "security_groups": 45
    }
}

However, the correct implementation, and the implementation used when calling 'nova quota-update' requires that 'tenant_id' (the ID for the tenant or account to act on.) should also be included inside the quota_set, i.e.:
{
    "quota_set": {
        "security_groups": 45,
        "tenant_id": <tenant_id>
    }
}

Failure to add the tenant_id to the request parameter results in a 404 Resource Not Found error.

The Link to the reference documentation can be found here: http://api.openstack.org/api-ref.html#ext-os-quota-sets

Revision history for this message
Steve Gregory (steve-gregory) wrote :

One other thing I forgot to mention is that the request must be a PUT not a POST, as described in the documentation.

Tom Fifield (fifieldt)
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
no longer affects: openstack-manuals
Changed in openstack-api-site:
assignee: nobody → Kersten Richter (kersten-r)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

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

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/50642
Committed: http://github.com/openstack/api-site/commit/6ef127e564470e3fb75e652e87807ac3aa77d756
Submitter: Jenkins
Branch: master

commit 6ef127e564470e3fb75e652e87807ac3aa77d756
Author: Kersten Richter <email address hidden>
Date: Wed Oct 9 08:51:50 2013 -0500

    Use PUT instead of POST for updating a quota

    Partial-bug: 1218235
    Change-Id: Ic297637d40b2a5a01d2b60d6881d01a53ab051de

Revision history for this message
Diane Fleming (diane-fleming) wrote :

Miranda, Can you finish this one? Kersten did one part of it, but the request example needs to include the tenant ID as mentioned in the comments here.

Changed in openstack-api-site:
assignee: Kersten Richter (kersten-r) → Miranda Zhang (miranda-zhang-q)
milestone: none → icehouse
Revision history for this message
Miranda Zhang (miranda-zhang-q) wrote :

if the original description is correct
"POST request to v2/{tenant_id}/os-quota-sets/{tenant_id}"

the most closely matched API call to me is
http://api.openstack.org/api-ref-compute.html#os-quota-sets
POST v2/​{tenant_id}​/os-quota-sets/​{user_id}​ Updates quotas for a specified tenant and user.

instead of

PUT v2/​{tenant_id}​/os-quota-sets Updates quotas for a tenant.
(which is kersten-r's change)

I'd like some confirmation on this, so I won't update in the wrong place.

Changed in openstack-api-site:
status: In Progress → Fix Committed
Changed in openstack-api-site:
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.