APIs for Domain Quota Driver
Introduction
The existing DbQuotaDriver in Nova allows to set the Quotas at Project/Tenant and User Level. But there is a need to enforce the quotas at Domain Level as well. A new driver called "Domain Quota Driver" is available to enforce domain quotas in Nova. To use this driver, a new set of APIs are required for CRUD operations on quotas at domain, project and user level.
Quotas in Nova
Currently, OpenStack services make usage of quotas to limit the resources for a project or for a user. For example, the “Instances” quota represents the number of instances that can be created in a project or by a user. Through Domain Quota Driver, the same options for Quotas are available in the context of domain. To read more about Domain Quota Driver and see the available options for quotas, check https://wiki.openstack.org/wiki/DomainQuotaDriver
Implementation
Currently, the following APIs are implemented for Read/GET operation on Quotas for Domain, Project and User respectively. These APIs can be used by admin (i.e with role admin) to get the quota limits of any domain/project/user. A non-admin user can only use these APIs to see the quotas of a domain to which he/she belongs or of a project in which he/she is a member. In addition the non-admin user can see his/her own quota limits. To make this possible, Keystone V3 auth tokens needs to be used. The context provided by the token had domain_id, project_id and user_id respectively.
Method | URI | Description |
---|---|---|
GET | v2/{tenant_id}/domain-quota-tests/{domain_id} | Shows quotas for a Domain |
GET | v2/{tenant_id}/domain-quota-tests/{domain_id}?project_id={project_id} | Shows quotas for a Project |
GET | v2/{tenant_id}/domain-quota-tests/{domain_id}?project_id={project_id}&user_id={user_id} | Shows quotas for a User in a Project |
Note: The work on implementing other operations like PUT/DELETE is in progress.