10. quota – Resource Quota

Virtual machine resource quota functionality.

10.1. Resources

10.1.1. Quota

class quota.Quota

This resource represents a method in which to create a new quota.

Resource URI:

/rest/hosting/quota/
PUT(name, max_vms, max_cpus, max_memory, max_storage)

Create a new quota by submitting an HTTP PUT request.

Note

This resource requires create permission on the elastic_hosting extension module.

Parameters:
  • name – The name of the new quota.
  • max_vms – The maximum number of virtual machines allowed by the quota.
  • max_cpus – The maximum number of virtual cpus allowed by the quota.
  • max_memory – The maximum amount of memory allowed by the quota.
  • max_storage – The maximum amount storage allowed by the quota.
Return type:

quota.RepQuota

10.1.2. QuotaUUID

class quota.QuotaUUID

This resource represens a specific virtual machine resource quota.

Resource URI:

/rest/hosting/quota/<UUID>/
GET()

Retrieve the specified virtual machine resource quota by submitting an HTTP GET request. The UUID in the resource URI should be the UUID of the target quota.

Note

This resource requires read permission on both the quota and the elastic_hosting extension module when using the HTTP GET method.

Return type:quota.RepQuotaUUID
POST(name, max_vms, max_cpus, max_memory, max_storage)

Update the specified virtual machine resource quota by submitting an HTTP POST request. The UUID in the resource uri should be the uuid of the target quota.

Note

This resource requires update permission on both the quota and the elastic_hosting extension module when using the HTTP POST method.

Parameters:
  • name – The name of the new quota.
  • max_vms – The maximum number of virtual machines allowed by the quota.
  • max_cpus – The maximum number of virtual cpus allowed by the quota.
  • max_memory – The maximum amount of memory allowed by the quota.
  • max_storage – The maximum amount storage allowed by the quota.
Return type:

quota.RepQuotaUUID

DELETE()

Delete the specified virtual machine resource quota by submitting an HTTP DELETE request. The UUID in the resource URI should be the UUID of the target quota.

Note

This resource requires delete permission on both the quota and the elastic_hosting extension module when using the HTTP DELETE method.

10.1.3. QuotaGroupUUID

class quota.QuotaGroupUUID

This resource represents a specific group quota.

Resource URI:

/rest/hosting/quota/group/<UUID>/
GET()

Retrieve the specified virtual machine resource quota by submitting an HTTP GET request. The UUID in the resource URI should be the UUID of the target group.

Note

This resource requires read permission on both the quota and the elastic_hosting extension module when using the HTTP GET method.

Return type:quota.RepQuotaUUID
POST(quota)

Update the specified group by submitting an HTTP POST request. The UUID in the resource URI should be the UUID of the target group.

Note

This resource requires update permission on both the quota and the elastic_hosting extension module when using the HTTP POST method.

Parameter:quota – The new quota for the target group.
Return type:quota.RepQuotaUUID

10.1.4. QuotaList

class quota.QuotaList

This resource represents a list of virtual machine resource quotas.

Resource URI:

/rest/hosting/quota/list/
GET()

Retrieve a list of virtual machine resource quotas by submitting an HTTP GET request.

Note

This resource requires read permission on the elastic_hosting extension module and on each virtual machine resource quota that is found.

Return type:quota.RepQuotaList

10.2. Representations

10.2.1. RepQuota

class quota.RepQuota

This is a representation of a new quota that is been created.

Representation:

{"errno" response.errno,
 "message": response.message,
 "quota": quota}

10.2.2. RepQuotaUUID

class quota.RepQuotaUUID

This is a representation of a quota resource.

Representation:

{"errno": response.errno,
 "message": response.message,
 "quota": {"uuid": quota.uuid,
           "name": quota.name,
           "max_vms": quota.vms,
           "max_cpus": quota.cpus,
           "max_memory": quota.max_memory,
           "max_storage": quota.max_storage}}

10.2.3. RepQuotaList

class quota.RepQuotaList

This is a representation of a list of virtual machine resource quotas. This is a list of quota.RepQuotaUUID representations.

Representation

{"errno": response.errno,
 "message": response.message,
 "quotas": [quota1, quota2]}