Inconsistency between os-quota-sets code and API doc

Bug #1264043 reported by Qiu Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Confirmed
Medium
Unassigned

Bug Description

There's some inconsistencies I found between documentation and os-quota-sets / os-user-quotas api extension code.

#1. for the os-quota-sets extension, tenant_id should be explicitly passed as resource id so that admin could query quota for any tenant id.
#2. for the os-user-quotas extension, user_id should be passed as query string instead of resource id

So instead of following spec as documented, it should be

        GET v2/​{tenant_id}​/os-quota-sets
        Shows quotas for a tenant.

should be: GET v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_query}

        PUTv2/​{tenant_id}​/os-quota-sets
        Updates quotas for a tenant.

should be: PUT v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_update}

        GETv2/​{tenant_id}​/os-quota-sets/defaults
        Gets default quotas for a tenant.

should be: GET v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_query}/defaults

        GETv2/{tenant_id}/os-quota-sets/{user_id}
        Shows quotas for a specified tenant and user.

should be: GET v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_query}?user_id={user_id_to_query}

        POSTv2/{tenant_id}/os-quota-sets/{user_id}
        Updates quotas for a specified tenant and user.

should be: PUT v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_update}?user_id={user_id_to_update}

        GETv2/{tenant_id}/os-quota-sets/detail
        Shows details for quotas for a specified tenant.

NOTE: This one is implemented in v3 api, and *NOT* mentioned by api doc
should be: GET v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_query}/detail

        GETv2/{tenant_id}/os-quota-sets/{user_id}/detail
        Shows details for quotas for a specified tenant and user.

NOTE: This one is implemented in v3 api, and has already been documented. Not sure if it should be there though, since it's v3 only.
should be: GET v2/​{tenant_id}​/os-quota-sets/{tenant_id_to_query}/detail?user_id={user_id_to_query}

Tom Fifield (fifieldt)
affects: openstack-manuals → openstack-api-site
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
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.