Atom feed of this document
 

 Per-tenant quota configuration

Quantum also supports per-tenant quota limit by quota extension API. To enable per-tenant quota, you need to set 'quota_driver' in 'quantum.conf'.

quota_driver = quantum.extensions._quotav2_driver.DbQuotaDriver

When per-tenant quota is enabled, the output of the following command contains 'quotas'.

$ quantum ext-list -c alias -c name
+----------+------------------------+
| alias    | name                   |
+----------+------------------------+
| router   | Quantum L3 Router      |
| quotas   | Quotas for each tenant |
| provider | Provider Network       |
+----------+------------------------+
[Note]Note

In Folsom release, per-tenant quota is supported by Open vSwitch plugin, Linux Bridge plugin, and Nicira NVP plugin and cannot be used with other plugins.

There are four CLI commands to manage per-tenant quota.

  quota-delete               Delete defined quotas of a given tenant.
  quota-list                 List defined quotas of all tenants.
  quota-show                 Show quotas of a given tenant
  quota-update               Define tenant's quotas not to use defaults.

Only users with 'admin' role can change a quota value. Note that the default set of quotas are enforced for all tenants by default, so there is no 'quota-create' command.

'quota-list' displays a list of tenants for which per-tenant quota is enabled. The tenants who have the default set of quota limits are not listed. This command is permitted to only 'admin' users.

$ quantum quota-list
+------------+---------+------+--------+--------+----------------------------------+
| floatingip | network | port | router | subnet | tenant_id                        |
+------------+---------+------+--------+--------+----------------------------------+
|         20 |       5 |   20 |     10 |      5 | 6f88036c45344d9999a1f971e4882723 |
|         25 |      10 |   30 |     10 |     10 | bff5c9455ee24231b5bc713c1b96d422 |
+------------+---------+------+--------+--------+----------------------------------+

'quota-show' reports the current set of quota limits for the specified tenant. Regular (non-admin) users can call this command (without --tenant_id parameter). If per-tenant quota limits are not defined for the tenant, the default set of quotas are displayed.

$ quantum quota-show --tenant_id 6f88036c45344d9999a1f971e4882723
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 20    |
| network    | 5     |
| port       | 20    |
| router     | 10    |
| subnet     | 5     |
+------------+-------+

The below is an example called by a non-admin user.

$ quantum quota-show
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 20    |
| network    | 5     |
| port       | 20    |
| router     | 10    |
| subnet     | 5     |
+------------+-------+

You can update a quota of the given tenant by 'quota-update' command.

Update the limit of network quota.

$ quantum quota-update --tenant_id 6f88036c45344d9999a1f971e4882723 --network 5
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 50    |
| network    | 5     |
| port       | 50    |
| router     | 10    |
| subnet     | 10    |
+------------+-------+

You can update quotas of multiple resources in one command.

$ quantum quota-update --tenant_id 6f88036c45344d9999a1f971e4882723 --subnet 5 --port 20
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 50    |
| network    | 5     |
| port       | 20    |
| router     | 10    |
| subnet     | 5     |
+------------+-------+

To update the limits of L3 resource (router, floating IP), we need to specify new values of the quotas after '--'. The example below updates the limit of the number of floating IPs for the given tenant.

$ quantum quota-update --tenant_id 6f88036c45344d9999a1f971e4882723 -- --floatingip 20
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 20    |
| network    | 5     |
| port       | 20    |
| router     | 10    |
| subnet     | 5     |
+------------+-------+

You can update the limits of multiple resources including L2 resources and L3 resource in one command.

$ quantum quota-update --tenant_id 6f88036c45344d9999a1f971e4882723 --network 3 --subnet 3 --port 3 -- --floatingip 3 --router 3
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 3     |
| network    | 3     |
| port       | 3     |
| router     | 3     |
| subnet     | 3     |
+------------+-------+

To clear per-tenant quota limits, use 'quota-delete'. After 'quota-delete', quota limits enforced to the tenant are reset to the default set of quotas.

$ quantum quota-delete --tenant_id 6f88036c45344d9999a1f971e4882723
Deleted quota: 6f88036c45344d9999a1f971e4882723
$ quantum quota-show --tenant_id 6f88036c45344d9999a1f971e4882723
+------------+-------+
| Field      | Value |
+------------+-------+
| floatingip | 50    |
| network    | 10    |
| port       | 50    |
| router     | 10    |
| subnet     | 10    |
+------------+-------+


loading table of contents...