Jump to: navigation, search

PerUserQuotasForNeutron

User Cases

  • Currently neutron supports per-project quotas. Users under the same project have exactly the same quota-set. In order to control a normal user's use of cloud resources we need per-project-user quotas.

Implementation Overview

  • Project-quotas & User-quotas:
The sum of user's quotas under the same project should be less than the project quotas.
  • RESTful API:
Gets quotas for a specified user.
GET v2/​{tenant_id}​/quotas/​{tenant_id}​?user_id={user_id}

Updates quotas for a specified user. 
PUT v2/​{tenant_id}​/quotas/​{tenant_id}​?user_id={user_id}

Resets quotas to default values for a specified user.
DELETE v2/​{tenant_id}​/quotas/​{tenant_id}​?user_id={user_id}
  • The CLI would be like:
* Show quotas of a given tenant user.
neutron quota-show --tenant-id <tenant-id> --user-id <user-id>
* Update quota for a given tenant user.
neutron quota-update --tenant-id <tenant-id> --user-id <user-id> --<resource> <limit>
* Delete defined quotas of a given tenant user.
neutron quota-delete --tenant-id <tenant-id> --user-id <user-id>

Data Model Changes

The user quota data would be stored in a new project_user_quotas table.

Field Type Null Key Default
id int(36) NO PRI NULL
tenant_id varchar(255) YES NULL
user_id varchar(255) YES NULL
resource varchar(255) NO NULL
limit int(11) YES NULL

The implementation of the SQL backend will drive the implementations of the other backends. When using cloud resources, the request will be checked if it exceeds the quotas of the specific user.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

We'll eventually need a blueprint/spec for managing user's quotas via Horizon.