Jump to: navigation, search

Difference between revisions of "APIs for Domain Quota Driver"

(APIs for Domain Quota Driver)
(APIs for Domain Quota Driver)
Line 39: Line 39:
 
= Implementation =
 
= Implementation =
  
Currently, the following APIs are implemented for Read/GET operation on Quotas for Domain, Project and User respectively.
+
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.  
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 51: Line 51:
 
| GET || v2/{tenant_id}/domain-quota-tests/{domain_id}?project_id={project_id} || Shows quotas for a User in a Project
 
| GET || v2/{tenant_id}/domain-quota-tests/{domain_id}?project_id={project_id} || Shows quotas for a User in a Project
 
|}
 
|}
 +
 +
Note: The work on implementing other operations like PUT/DELETE is in progress.

Revision as of 12:07, 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. 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} Shows quotas for a User in a Project

Note: The work on implementing other operations like PUT/DELETE is in progress.