Difference between revisions of "APIs for Domain Quota Driver"
(APIs for Domain Quota Driver) |
(APIs for Domain Quota Driver) |
||
Line 6: | Line 6: | ||
Currently, OpenStack services make usage of quotas to limit the resources for a project or for a user. | 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. The table below summarizes the existing project/user quotas. | For example, the “Instances” quota represents the number of instances that can be created in a project or by a user. The table below summarizes the existing project/user quotas. | ||
− | Through Domain Quota Driver, the same options for Quotas are available in the context of domain. | + | Through Domain Quota Driver, the same options for Quotas are available in the context of domain. To read more about Domain Quota Driver, check https://wiki.openstack.org/wiki/DomainQuotaDriver |
{| class="wikitable" | {| class="wikitable" | ||
Line 35: | Line 35: | ||
|- | |- | ||
| nova.key_pairs|| countable || 100 || number of key pairs per user | | nova.key_pairs|| countable || 100 || number of key pairs per user | ||
+ | |} | ||
+ | |||
+ | = Implementation = | ||
+ | |||
+ | Currently, the following APIs are implemented for Read/GET operation on Quotas for Domain, Project and User respectively. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! 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} || Shows quotas for a User in a Project | ||
|} | |} |
Revision as of 11:57, 5 February 2014
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. The table below summarizes the existing project/user quotas. Through Domain Quota Driver, the same options for Quotas are available in the context of domain. To read more about Domain Quota Driver, check https://wiki.openstack.org/wiki/DomainQuotaDriver
quotas | type | default values | description |
---|---|---|---|
instances | reservable | 10 | number of instances allowed per project |
cores | reservable | 20 | number of instance cores allowed per project |
ram | reservable | 50*1024 | megabytes of instance ram allowed per project |
floating_ips | reservable | 10 | number of floating ips allowed per project |
fixed_ips | reservable | -1 | number of fixed ips allowed per project |
metadata_items | absolute | 128 | number of metadata items allowed per instance |
injected_files | absolute | 5 | number of injected files allowed |
injected_files_content_bytes | absolute | 10*1024 | number of bytes allowed per injected file |
nova.injected_file_path_bytes | absolute | 255 | number of bytes allowed per injected file path |
nova.security_groups | reservable | 10 | number of security groups per project |
nova.security_groups_rules | countable | 20 | number of security rules per security group |
nova.key_pairs | countable | 100 | number of key pairs per user |
Implementation
Currently, the following APIs are implemented for Read/GET operation on Quotas for Domain, Project and User 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} | Shows quotas for a User in a Project |