Quotas for shares.
Bases: manila.quota.BaseResource
Describe a non-reservable resource.
Bases: object
Describe a single resource for quota checking.
Return the default value of the quota.
Obtain quota for a resource.
Given a driver and context, obtain the quota for this resource.
Parameters: |
|
---|
Bases: manila.quota.AbsoluteResource
Describe a countable resource.
Describe a resource where the counts aren’t based solely on the project ID.
Bases: object
Database Quota driver.
Driver to perform necessary checks to enforce quotas and obtain quota information. The default driver utilizes the local database.
Commit reservations.
Parameters: |
|
---|
Destroy metadata associated with a project.
Destroy all quotas, usages, and reservations associated with a project.
Parameters: |
|
---|
Destroy metadata associated with a project and user.
Destroy all quotas, usages, and reservations associated with a project and user.
Parameters: |
|
---|
Expire reservations.
Explores all currently existing reservations and rolls back any that have expired.
Parameters: | context – The request context, for access checks. |
---|
Get a specific quota by quota class.
Get a specific quota by project.
Get a specific quota by project and user.
Retrieve quotas for a quota class.
Given a list of resources, retrieve the quotas for the given quota class.
Parameters: |
|
---|
Given a list of resources, retrieve the default quotas.
Parameters: |
|
---|
Retrieve quotas for project.
Given a list of resources, retrieve the quotas for the given project.
Parameters: |
|
---|
Retrieve range of settable quotas.
Given a list of resources, retrieve the range of settable quotas for the given user or project.
Parameters: |
|
---|
Retrieve quotas for user and project.
Given a list of resources, retrieve the quotas for the given user and project.
Parameters: |
|
---|
Check simple quota limits.
For limits–those quotas for which there is no usage synchronization function–this method checks that a set of proposed values are permitted by the limit restriction.
This method will raise a QuotaResourceUnknown exception if a given resource is unknown or if it is not a simple limit resource.
If any of the proposed values is over the defined quota, an OverQuota exception will be raised with the sorted list of the resources which are too high. Otherwise, the method returns nothing.
Parameters: |
|
---|
Check quotas and reserve resources.
For counting quotas–those quotas for which there is a usage synchronization function–this method checks quotas against current usage and the desired deltas.
This method will raise a QuotaResourceUnknown exception if a given resource is unknown or if it does not have a usage synchronization function.
If any of the proposed values is over the defined quota, an OverQuota exception will be raised with the sorted list of the resources which are too high. Otherwise, the method returns a list of reservation UUIDs which were created.
Parameters: |
|
---|
Roll back reservations.
Parameters: |
|
---|
Reset usage records.
Reset the usage records for a particular user on a list of resources. This will force that user’s usage records to be refreshed the next time a reservation is made.
Note: this does not affect the currently outstanding reservations the user has; those reservations must be committed or rolled back (or expired).
Parameters: |
|
---|
Bases: object
Represent the set of recognized quotas.
Commit reservations.
Parameters: |
|
---|
Count a resource.
For countable resources, invokes the count() function and returns its result. Arguments following the context and resource are passed directly to the count function declared by the resource.
Parameters: |
|
---|
Destroy metadata associated with a project.
Destroy all quotas, usages, and reservations associated with a project.
Parameters: |
|
---|
Destroy metadata associated with a project and user.
Destroy all quotas, usages, and reservations associated with a project and user.
Parameters: |
|
---|
Expire reservations.
Explores all currently existing reservations and rolls back any that have expired.
Parameters: | context – The request context, for access checks. |
---|
Get a specific quota by quota class.
Get a specific quota by project.
Get a specific quota by project and user.
Retrieve the quotas for the given quota class.
Parameters: |
|
---|
Retrieve the default quotas.
Parameters: | context – The request context, for access checks. |
---|
Retrieve the quotas for the given project.
Parameters: |
|
---|
Get settable quotas.
Given a list of resources, retrieve the range of settable quotas for the given user or project.
Parameters: |
|
---|
Retrieve the quotas for the given user and project.
Parameters: |
|
---|
Check simple quota limits.
For limits–those quotas for which there is no usage synchronization function–this method checks that a set of proposed values are permitted by the limit restriction. The values to check are given as keyword arguments, where the key identifies the specific quota limit to check, and the value is the proposed value.
This method will raise a QuotaResourceUnknown exception if a given resource is unknown or if it is not a simple limit resource.
If any of the proposed values is over the defined quota, an OverQuota exception will be raised with the sorted list of the resources which are too high. Otherwise, the method returns nothing.
Parameters: |
|
---|
Register a resource.
Register a list of resources.
Check quotas and reserve resources.
For counting quotas–those quotas for which there is a usage synchronization function–this method checks quotas against current usage and the desired deltas. The deltas are given as keyword arguments, and current usage and other reservations are factored into the quota check.
This method will raise a QuotaResourceUnknown exception if a given resource is unknown or if it does not have a usage synchronization function.
If any of the proposed values is over the defined quota, an OverQuota exception will be raised with the sorted list of the resources which are too high. Otherwise, the method returns a list of reservation UUIDs which were created.
Parameters: |
|
---|
Roll back reservations.
Parameters: |
|
---|
Reset usage records.
Reset the usage records for a particular user on a list of resources. This will force that user’s usage records to be refreshed the next time a reservation is made.
Note: this does not affect the currently outstanding reservations the user has; those reservations must be committed or rolled back (or expired).
Parameters: |
|
---|
Bases: manila.quota.BaseResource
Describe a reservable resource.
Policy Engine For Manila
Whether or not roles contains ‘admin’ role according to policy setting.
Verifies that the action is valid on the target in this context.
Parameters: |
|
---|---|
Returns: | When do_raise is False, returns a value that evaluates as True or False depending on whether the policy allows action on the target. |
Raises: | manila.exception.PolicyNotAuthorized if verification fails and do_raise is True. |
Check policy corresponding to the wrapped methods prior to execution.
Bases: manila.test.TestCase
Bases: manila.test.TestCase
Bases: object
Bases: object
Bases: object
Bases: manila.db.sqlalchemy.models.QuotaUsage
Bases: manila.test.TestCase
Bases: manila.test.TestCase
Bases: manila.test.TestCase
Test of Policy Engine For Manila.
Bases: manila.test.TestCase
Bases: manila.test.TestCase
Bases: manila.test.TestCase
Bases: manila.test.TestCase
The following limits need to be defined and enforced:
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.