detail quota usage only return real usage

Bug #1610613 reported by Chaoyi Huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kingbird
Fix Released
Undecided
Ashish Singh

Bug Description

get a tenant quota usage by himself

curl -H "Content-Type: application/json" -H "X-Auth-Token: $kb_token" -X GET http://$kb_ip_addr:8118/v1.0/$tenant_id/os-quota-sets/$tenant_id/detail

"GET /v1.0/7fe8e60a9c0845b3887db881a862e604/os-quota-sets/7fe8e60a9c0845b3887db881a862e604/detail (7fe8e60a9c0845b3887db881a862e604 is demo project-id)

Then the result only shows usage without limit: {"quota_set": {"security_group_rule": 4, "security_group": 1}}

To ease of use, the global limit should also be returned at the same time, and return 0 usage if quota is used.

Changed in kingbird:
assignee: nobody → Ashish Singh (ashish-singh7)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kingbird (master)

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

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

Reviewed: https://review.openstack.org/359944
Committed: https://git.openstack.org/cgit/openstack/kingbird/commit/?id=8fbf914c4422db5daa45ae2ff58857e89372dcb3
Submitter: Jenkins
Branch: master

commit 8fbf914c4422db5daa45ae2ff58857e89372dcb3
Author: Ashish Singh <email address hidden>
Date: Wed Aug 24 20:35:36 2016 +0530

    Fix for the detail quota usage bug

    Currently, tenant quota usage API only returns
    the quotas which are used.

    Have modified such that it returns
    - Limits for that tenant
    - Usage of the quota resources
    - '0' in place of Unused quota resouces

    Eg:
    {'quota_set'
        {
            'usage' : <project_usage>,
            'limits': <project_limit>
        }
    }

    Change-Id: Ib5cab1f420154ed37db0e70a537f552da8243ddf
    Closes-Bug: #1610613

Changed in kingbird:
status: In Progress → 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.