Parts of os-quota-sets APIs are wrong

Bug #1274153 reported by Liyingjun on 2014-01-29
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

The following APIs is wrong:
GET v2/​{tenant_id}​/os-quota-sets Shows quotas for a tenant.
PUT v2/​{tenant_id}​/os-quota-sets Updates quotas for a tenant.
GET v2/​{tenant_id}​/os-quota-sets/​{tenant_id}​/​{user_id} Enables an admin user to show quotas for a specified tenant and user.
PUT v2/​{tenant_id}​/os-quota-sets/​{tenant_id}​/​{user_id} Updates quotas for a specified tenant/project and user.
It should be:

Liyingjun (liyingjun) wrote :
Download full text (12.4 KiB)

Following are the outputs of CLI DEBUG:

$ nova --debug quota-show --tenant ba1b812de60441a78f2e26197b0effce

REQ: curl -i '' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "123123"}}}'

RESP: [200] CaseInsensitiveDict({'date': 'Tue, 14 Jan 2014 01:25:08 GMT', 'vary': 'X-Auth-Token', 'content-length': '4291', 'content-type': 'application/json'})
RESP BODY: {"access": {"token": {"issued_at": "2014-01-14T01:25:08.580631", "expires": "2014-01-15T01:25:08Z", "id": "4e08f3cbb320465185bce3e7fd050f16", "tenant": {"description": null, "enabled": true, "id": "edd8a3405acd41f589c821acb68a57e0", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "643a2912f517488e892735be0fc8b621", "publicURL": ""}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "5b7731fff9b34b468e33874f1d5cfe56", "publicURL": ""}], "endpoints_links": [], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "77a18364b7ee4a63bbfa79a27a719392", "publicURL": ""}], "endpoints_links": [], "type": "volumev2", "name": "cinder"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "3424daa47e774410a6c67c5e23f5db59", "publicURL": ""}], "endpoints_links": [], "type": "computev3", "name": "nova"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "73094bf82b8e44d4876bf631abbdafb9", "publicURL": ""}], "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "4af8412f41d441bdad3452009b770fee", "publicURL": ""}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "116461b5b6dd4fc5875fab23f9402e7d", "publicURL": ""}], "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "id": "47995fe8a15b4c4fb477532fa69e77c3", "publicURL": ""}], "endpoints_lin...

Liyingjun (liyingjun) on 2014-01-29
affects: openstack-manuals → openstack-api-site
Anne Gentle (annegentle) on 2014-01-29
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → High
Liyingjun (liyingjun) on 2014-01-29
Changed in openstack-api-site:
assignee: nobody → Liyingjun (liyingjun)

Fix proposed to branch: master

Changed in openstack-api-site:
status: Confirmed → In Progress
Liyingjun (liyingjun) wrote :

Seems like v2/​{tenant_id}​/os-quota-sets/​{tenant_id}​/​{user_id} is explained under `Request parameters`: user_id, The user ID. Specify in the URI as a query string: user_id={user_id}, so no problem about this.

Submitter: Jenkins
Branch: master

commit 1c2d7de2a712601ead43105d47e20e07fb31f1f5
Author: liyingjun <email address hidden>
Date: Tue Jan 14 10:30:35 2014 +0800

    Add missing tenant_id param behinds os-quota-sets

    These two APIs missing tenant_id param.
    GET v2/{tenant_id}/os-quota-sets Shows quotas for a tenant.
    PUT v2/{tenant_id}/os-quota-sets Updates quotas for a tenant.
    Should be like:
    GET v2/{tenant_id}/os-quota-sets/{tenant_id} Shows quotas for a tenant.
    PUT v2/{tenant_id}/os-quota-sets/{tenant_id} Updates quotas for a tenant.

    Change-Id: I07581b69835cde3063b109cae564a591386762c8
    Closes-bug: 1274153

Changed in openstack-api-site:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers