Add support to get usage information in limits API
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:/
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": {
}
}
}
or
B)
{
"limits": {
"rate": [],
"absolute": {
},
"usages" : {
}
}
}
option A) ensures consistency across openstack services while option B) seems ideal to separate out absolute and usage
figures.
Blueprint information
- Status:
- Complete
- Approver:
- John Griffith
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Tushar Patil
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Started
- Milestone target:
- None
- Started by
- Rohit Karajgi
- Completed by
- Sean McGinnis
Related branches
Related bugs
Sprints
Whiteboard
(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.
(b) doesn't differentiate between rate and quota limit usages, which it probably should -- DuncanT
-------
Option A (modified as below) looks appropriate:
A)
{
"limits": {
"rate": [],
"absolute": {
}
}
}
-- Rohit Karajgi
-------
Or Option B can be modified to something like:
B)
{
"limits": {
"rate": {},
"absolute": {
},
"absolute usages" : {
}
"rate usages" {},
}
}
I've no strong preference -- DuncanT
By testing the newest version of cinder, this bp has been implemented by solution A.
Please mark it as implemented or obsoleted so as to not confuse cinder folkers.
---- ling-yun 2014-09-15