2015/07/20 - Apache Deltacloud has been retired.

For more information, please explore the Attic.


Volume Template

This resource captures the configuration values for realizing a Volume. A Volume Template may be used to create multiple Volumes.

A Volume Template Collection resource represents the collection of VolumeTemplate resources within a Provider.

The Volume Template in another example of the template pattern used by CIMI, as explained in the introduction of the Machine Template resource. That is, in general, CIMI a resource is instantiated with the use of a template and a template itself usually consists of an image and a configuration.


Retrieve the Volume Template Collection

Example request:

GET /cimi/volume_templates HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Accept: application/xml

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1045
ETag: 3ca6eecb1450ebe3a9fa6714bff542c1
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:02:47 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Collection xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeTemplateCollection">
  <id>http://localhost:3001/cimi/volume_templates</id>
  <count>2</count>
  <VolumeTemplate>
    <id>http://localhost:3001/cimi/volume_templates/3</id>
    <name>marios_vol_template</name>
    <description>my first volume template</description>
    <volumeConfig href="http://localhost:3001/cimi/volume_configs/1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_templates/3" />
  </VolumeTemplate>
  <VolumeTemplate>
    <id>http://localhost:3001/cimi/volume_templates/4</id>
    <name>YAVT</name>
    <description>yet another volume template</description>
    <volumeConfig href="http://localhost:3001/cimi/volume_configs/6" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_templates/4" />
  </VolumeTemplate>
  <operation rel="add" href="http://localhost:3001/cimi/volume_templates" />
</Collection>

Retrieve a single Volume Template

Example request:

GET /cimi/volume_templates/3 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Accept: application/xml

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 470
ETag: a527b1170f798affc88a0ea0fa4ede7a
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:05:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeTemplate">
  <id>http://localhost:3001/cimi/volume_templates/3</id>
  <name>marios_vol_template</name>
  <description>my first volume template</description>
  <volumeConfig href="http://localhost:3001/cimi/volume_configs/1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_templates/3" />
</VolumeTemplate>

Create a Volume Template

Example request:

POST /cimi/volume_templates HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Content-Type: application/xml
Accept: application/xml
Content-Length: 232

<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> YAVT </name>
  <description> yet another volume template </description>
  <volumeConfig href="http://localhost:3001/cimi/volume_configs/6"> </volumeConfig>
</VolumeTemplate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_templates/5
CIMI-Specification-Version: 1.0.1
Content-Length: 458
ETag: 66d7d08c49a5e81923ac124d71af50ad
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:07:00 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeTemplate">
  <id>http://localhost:3001/cimi/volume_templates/5</id>
  <name>YAVT</name>
  <description>yet another volume template</description>
  <volumeConfig href="http://localhost:3001/cimi/volume_configs/6" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_templates/5" />
</VolumeTemplate>

Delete a Volume Template

Example request:

DELETE /cimi/volume_templates/5 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Accept: application/xml

Server response:

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html;charset=utf-8
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 11 Jan 2013 13:07:34 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife