Bug 1041682 - [RFE][cinder]: Add support to get usage information in limits API
Summary: [RFE][cinder]: Add support to get usage information in limits API
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/cind...
Whiteboard: upstream_milestone_none upstream_stat...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 18:37 UTC by RHOS Integration
Modified: 2015-11-20 19:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 17:23:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-12 18:37:50 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/cinder/+spec/add-volume-usages-to-limits.

Description:

Cinder maintains current quota usages of each tenant in quota_usages db table. There is logic to calculate "gigabytes" used for both volumes and snapshots,
and the quotas api in cinder gives information of current usages for a particular tenant. 
But, this api is implemented as a cinder extension and there is a possibility that a service provider may not deploy this extension in their environment. In that case horizon will fail to show the usages, which was why horizon replaced quota apis with limit apis across all screens (in bug https://bugs.launchpad.net/horizon/+bug/1178694).

One way to tackle this problem is to enhance the limits API to include usage information in the response, as follows:

A)
 
{
    "limits": {
        "rate": [], 
        "absolute": {
            "maxTotalVolumeGigabytes": 1000,
            "maxTotalVolumes": 10,
            "totalGigabytes" : 50,
            "totalSnapshots": 6,
            "totalVolumes": 3
          }
    }
}

or 

B)
{
    "limits": {
        "rate": [],
        "absolute": {
            "maxTotalVolumeGigabytes": 1000,
            "maxTotalVolumes": 10
        },
        "usages" : {
            "totalGigabytes" : 50,
            "totalSnapshots": 6,
            "totalVolumes": 3
       } 
    }
}

option A) ensures consistency across openstack services while option B) seems ideal to separate out absolute and usage
figures.

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.