-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add quota_usage endpoint for v2 API. #16
Conversation
The quota endpoint uses singular names: {
"quota": {
"load_balancer": 1200,
"listener": 1200,
"member": 73,
"pool": 1200,
"health_monitor": 200
}
} For the sake of consistency, I would prefer the usage endpoint to use the same names. Also of note, later Octavia releases remove the underscores from the names, so it would be |
Endpoint
Good point! Will fix |
Never mind, I understood what you mean, will change to singular names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot comment on the implementation side, but the API side looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
We found a bug with this: Deleted loadbalancers get counted into the usage value. |
Pushed a fix commit, currently deploying. |
This PR adds a new endpoint
quota_usage
to get all quota usage counters in one API request byproject_id
. Endpoint URL:/v2/lbaas/quota_usage/{project_id}
acceptGET
request and returns something like:For now, this endpoint does several requests to the database to count number of resources, but in the future, we have to use data stored in
quota
table.