4. dtemplate – Disk Template

Disk template functionality.

4.1. Resources

4.1.1. DtemplateUUID

class dtemplate.DtemplateUUID

This resource represens a specific disk template.

Resource URI:

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

Retrieve the specified disk template by submitting an HTTP GET request. The UUID in the resource uri should be the uuid of the target disk template.

Note

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

Return type:dtemplate.RepDtemplateUUID

4.1.2. DtemplateList

class dtemplate.DtemplateList

This resource represents a list of disk templates.

Resource URI:

/rest/hosting/dtemplate/list/
GET()

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

Note

This resource requires read permission on the elastic_hosting extension module.

Return type:dtemplate.RepDtemplateList

4.2. Representations

4.2.1. RepDtemplateUUID

_images/RepDtemplateUUID.png
class dtemplate.RepDtemplateUUID

This is a representation of a disk template resource.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
uuid
This attribute represents the ID of the disk template resource.
size
This attribute represents the size of the disk template resource. This attribute is measured in MB.

Representation:

{"errno": response.errno,
 "message": response.message,
 "dtemplate": {"uuid": dtemplate.uuid,
               "size": dtemplate.size}}

4.2.2. RepDtemplateList

_images/RepDtemplateList.png
class dtemplate.RepDtemplateList

This is a representation of a list of disk templates. This is a list of dtemplate.RepDtemplateUUID representations.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general error message generated by the resource.
templates
This attribute represents the list of template representations.

Representation:

{"errno": response.errno,
 "message": response.message,
 "templates": [dtemplate1, dtemplate2]}