6. htemplate – Hardware Template

Hardware template functionality.

6.1. Resources

6.1.1. Htemplate

class htemplate.Htemplate

This resource represents a method in which to create a new hardware template.

Resource URI:

/rest/hosting/htemplate/
PUT()

Create a new hardware template by submitting an HTTP PUT request.

Note

This resource requires create permission on the elastic_hosting extension module.

Parameters:
  • name – New hardware template name.
  • arch – New hardware template architecture.
  • hypervisor – New hardware template hypervisor.
  • memory – New hardware template memory.
  • cpus – New hardware template cpus.
Return type:

htemplate.RepHtemplate

6.1.2. HtemplateUUID

class htemplate.HtemplateUUID

This resource represents a specific hardware template.

Resource URI:

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

Retrieve the specified hardware template by submitting an HTTP GET request. The UUID in the resource URI should be the UUID of the target hardware template.

Note

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

Return type:quota.RepHtemplateUUID
POST()

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

Note

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

Parameters:
  • name – The name of the hardware template.
  • arch – The cpu architecture of the hardware template.
  • hypervisor – The hypervisor of the hardware template.
  • memory – The memory of the hardware template..
  • cpus – The number of cpus for the hardware template.
Return type:

htemplate.RepHtemplateUUID

DELETE()
Delete the specified hardware template by submitting an HTTP DELETE request. The UUID in the resource URI should be the UUID of the target hardware template.

6.1.3. HtemplateList

class htemplate.HtemplateList

This resource represents a list of hardware templates.

Resource URI:

/rest/hosting/htemplate/list/
GET()

Retrieve a list of hardware templates by submitting an HTTP GET request.

Note

This resource requires read permission on the elastic_hosting extension module.

Return type:htemplate.RepHtemplateList

6.2. Representations

6.2.1. RepHtemplate

class htemplate.RepHtemplate

This is a representation of a new hardware template that has been created.

Representation:

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

6.2.2. RepHtemplateUUID

_images/RepHtemplateUUID.png
class htemplate.RepHtemplateUUID

This is a representation of a specific hardware template.

Representation:

{"errno": response.errno,
 "message": response.message,
 "hardware": {"uuid": hardware.uuid,
              "name": hardware.name,
              "arch": hardware.arch,
              "hypervisor_name": hardware.hvm,
              "memory": hardware.memory,
              "cpus": hardware.cpus}}

6.2.3. RepHtemplateList

_images/RepHtemplateList.png
class htemplate.RepHtemplateList

This is a representation of a list of hardware templates.

Representation:

{"errno": response.errno,
 "message": response.message,
 "templates": [htemplate1, htemplate2]}