{: data{I"/download/:ET{: default{ : lastI"ī) Download


Download

Version 1.1.0 of Apache Deltacloud is available. See the release notes.

Use the links below to download a distribution of Apache Deltacloud. Alternatively you can use one of the Apache mirrors. It is good practice to verify the integrity of the distribution files, especially if you are using one of our mirror sites. To do this, you must use the signatures from our main distribution directory.

Current release

server-gem deltacloud-core-1.1.0.gem ( PGP MD5 SHA1 )
server-sources deltacloud-core-1.1.0.tgz ( PGP MD5 SHA1 )
client-gem deltacloud-client-1.1.0.gem ( PGP MD5 SHA1 )
client-sources deltacloud-client-1.1.0.tgz ( PGP MD5 SHA1 )

Old releases

Older releases of Apache Deltacloud can be found here. We highly recommend to not use those releases but upgrade to the latest release.

Rubygems

RubyGems.org is the Ruby community's gem hosting service. For most of the Ruby developers it is the most convenient way how to download Apache Deltacloud. We always push the major releases to Rubygems.org page. To download Apache Deltacloud from there you can use gem fetch deltacloud-core or gem fetch deltacloud-client commands. Please mind to verify the downloaded sources.

Getting the sources

We provide an extensive amount of information about how to use the Apache Deltacloud GIT repository on this page.

Verify the integrity of the files

Note: When downloading from a mirror please check the md5sum and verify the OpenPGP compatible signature from the main Apache site. Links are provided above (next to the release download link).

The PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc signature file for the relevant distribution. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using:

$ pgpk -a KEYS
$ pgpv deltacloud-core-1.1.0.tar.gz.asc

or

$ pgp -ka KEYS
$ pgp deltacloud-core-1.1.0.tar.gz.asc

or

$ gpg --import KEYS
$ gpg --verify deltacloud-core-1.1.0.tar.gz.asc
;T:rawI"–

Download

Version 1.1.0 of Apache Deltacloud is available. See the release notes.

Use the links below to download a distribution of Apache Deltacloud. Alternatively you can use one of the Apache mirrors. It is good practice to verify the integrity of the distribution files, especially if you are using one of our mirror sites. To do this, you must use the signatures from our main distribution directory.

Current release

server-gem deltacloud-core-1.1.0.gem ( PGP MD5 SHA1 )
server-sources deltacloud-core-1.1.0.tgz ( PGP MD5 SHA1 )
client-gem deltacloud-client-1.1.0.gem ( PGP MD5 SHA1 )
client-sources deltacloud-client-1.1.0.tgz ( PGP MD5 SHA1 )

Old releases

Older releases of Apache Deltacloud can be found here. We highly recommend to not use those releases but upgrade to the latest release.

Rubygems

RubyGems.org is the Ruby community's gem hosting service. For most of the Ruby developers it is the most convenient way how to download Apache Deltacloud. We always push the major releases to Rubygems.org page. To download Apache Deltacloud from there you can use gem fetch deltacloud-core or gem fetch deltacloud-client commands. Please mind to verify the downloaded sources.

Getting the sources

We provide an extensive amount of information about how to use the Apache Deltacloud GIT repository on this page.

Verify the integrity of the files

Note: When downloading from a mirror please check the md5sum and verify the OpenPGP compatible signature from the main Apache site. Links are provided above (next to the release download link).

The PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc signature file for the relevant distribution. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using:

$ pgpk -a KEYS
$ pgpv deltacloud-core-1.1.0.tar.gz.asc
or
$ pgp -ka KEYS
$ pgp deltacloud-core-1.1.0.tar.gz.asc
or
$ gpg --import KEYS
$ gpg --verify deltacloud-core-1.1.0.tar.gz.asc
;T:preI"t


Download

Version 1.1.0 of Apache Deltacloud is available. See the release notes.

Use the links below to download a distribution of Apache Deltacloud. Alternatively you can use one of the Apache mirrors. It is good practice to verify the integrity of the distribution files, especially if you are using one of our mirror sites. To do this, you must use the signatures from our main distribution directory.

Current release

server-gem deltacloud-core-1.1.0.gem ( PGP MD5 SHA1 )
server-sources deltacloud-core-1.1.0.tgz ( PGP MD5 SHA1 )
client-gem deltacloud-client-1.1.0.gem ( PGP MD5 SHA1 )
client-sources deltacloud-client-1.1.0.tgz ( PGP MD5 SHA1 )

Old releases

Older releases of Apache Deltacloud can be found here. We highly recommend to not use those releases but upgrade to the latest release.

Rubygems

RubyGems.org is the Ruby community's gem hosting service. For most of the Ruby developers it is the most convenient way how to download Apache Deltacloud. We always push the major releases to Rubygems.org page. To download Apache Deltacloud from there you can use gem fetch deltacloud-core or gem fetch deltacloud-client commands. Please mind to verify the downloaded sources.

Getting the sources

We provide an extensive amount of information about how to use the Apache Deltacloud GIT repository on this page.

Verify the integrity of the files

Note: When downloading from a mirror please check the md5sum and verify the OpenPGP compatible signature from the main Apache site. Links are provided above (next to the release download link).

The PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc signature file for the relevant distribution. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using:

$ pgpk -a KEYS
$ pgpv deltacloud-core-1.1.0.tar.gz.asc

or

$ pgp -ka KEYS
$ pgp deltacloud-core-1.1.0.tar.gz.asc

or

$ gpg --import KEYS
$ gpg --verify deltacloud-core-1.1.0.tar.gz.asc
;T: post@ I"/getting-sources/;T{;{ ;I" Getting the Sources


Setting up a developement environment

Installing dependencies

First, you will need all the installation dependencies for Deltacloud. Follow the steps in Install Deltacloud section to get these dependencies.

Getting the sources

The Deltacloud repository is hosted at the Apache Software Foundation, using the Git version control system. If you donā€™t have Git already, use the yum or apt package managers:

$ sudo yum install git

or

$ sudo apt-get install git

The canonical Deltacloud repository is located at https://git-wip-us.apache.org/repos/asf/deltacloud.git with read-only mirrors at git://git.apache.org/deltacloud.git and git://github.com/apache/deltacloud.

Go to your root directory and run git to get the latest version of Deltacloud source code from git repository. You can also use a different directory, but remember, where you clone the code:

$ git clone git://git.apache.org/deltacloud.git

This will pull the latest version to the directory ~/deltacloud.

Development dependencies

Apart from installation dependecies, you have to install some additional libraries, in order to develop for Deltacloud. The Deltacloud source includes a Gemfile: /path/to/deltacloud/server/Gemfile, which lists these development dependencies.

You can easily get all the development dependecies with Bundler:

Install Bundler (if you don't have it yet):

$ gem install bundler

Then, get the required dependencies:

$ cd /path/to/deltacloud/server
$ bundle

Building from source and installing the Deltacloud gem

Build and install the Deltacloud server gem:

$ cd path/to/DeltacloudProject/deltacloud/server
$ rake package
$ gem install pkg/deltacloud-core-<version>.gem

Then install the Deltacloud client gem:

$ cd path/to/DeltacloudProject/deltacloud/client
$ rake package
$ gem install pkg/deltacloud-client-<version>.gem

Contribute

;T; I"^

Setting up a developement environment

Installing dependencies

First, you will need all the installation dependencies for Deltacloud. Follow the steps in Install Deltacloud section to get these dependencies.

Getting the sources

The Deltacloud repository is hosted at the Apache Software Foundation, using the Git version control system. If you don't have Git already, use the yum or apt package managers:
$ sudo yum install git
or
$ sudo apt-get install git
The canonical Deltacloud repository is located at https://git-wip-us.apache.org/repos/asf/deltacloud.git with read-only mirrors at git://git.apache.org/deltacloud.git and git://github.com/apache/deltacloud. Go to your root directory and run git to get the latest version of Deltacloud source code from git repository. You can also use a different directory, but remember, where you clone the code:
$ git clone git://git.apache.org/deltacloud.git
This will pull the latest version to the directory ~/deltacloud.

Development dependencies

Apart from installation dependecies, you have to install some additional libraries, in order to develop for Deltacloud. The Deltacloud source includes a Gemfile: /path/to/deltacloud/server/Gemfile, which lists these development dependencies.

You can easily get all the development dependecies with Bundler:

Install Bundler (if you don't have it yet):

$ gem install bundler

Then, get the required dependencies:

$ cd /path/to/deltacloud/server
$ bundle

Building from source and installing the Deltacloud gem

Build and install the Deltacloud server gem:

$ cd path/to/DeltacloudProject/deltacloud/server
$ rake package
$ gem install pkg/deltacloud-core-<version>.gem

Then install the Deltacloud client gem:

$ cd path/to/DeltacloudProject/deltacloud/client
$ rake package
$ gem install pkg/deltacloud-client-<version>.gem
Contribute
;T; I"


Setting up a developement environment

Installing dependencies

First, you will need all the installation dependencies for Deltacloud. Follow the steps in Install Deltacloud section to get these dependencies.

Getting the sources

The Deltacloud repository is hosted at the Apache Software Foundation, using the Git version control system. If you donā€™t have Git already, use the yum or apt package managers:

$ sudo yum install git

or

$ sudo apt-get install git

The canonical Deltacloud repository is located at https://git-wip-us.apache.org/repos/asf/deltacloud.git with read-only mirrors at git://git.apache.org/deltacloud.git and git://github.com/apache/deltacloud.

Go to your root directory and run git to get the latest version of Deltacloud source code from git repository. You can also use a different directory, but remember, where you clone the code:

$ git clone git://git.apache.org/deltacloud.git

This will pull the latest version to the directory ~/deltacloud.

Development dependencies

Apart from installation dependecies, you have to install some additional libraries, in order to develop for Deltacloud. The Deltacloud source includes a Gemfile: /path/to/deltacloud/server/Gemfile, which lists these development dependencies.

You can easily get all the development dependecies with Bundler:

Install Bundler (if you don't have it yet):

$ gem install bundler

Then, get the required dependencies:

$ cd /path/to/deltacloud/server
$ bundle

Building from source and installing the Deltacloud gem

Build and install the Deltacloud server gem:

$ cd path/to/DeltacloudProject/deltacloud/server
$ rake package
$ gem install pkg/deltacloud-core-<version>.gem

Then install the Deltacloud client gem:

$ cd path/to/DeltacloudProject/deltacloud/client
$ rake package
$ gem install pkg/deltacloud-client-<version>.gem

Contribute

;T; @I"/install-deltacloud/;T{;{ ;I"÷+ Install Deltacloud


Installation dependencies

First of all, you have to install several dependecies. The Deltacloud server relies on a number of external rubygems and other libraries. The following packages are neccessary for running the Deltacloud server. The installation of dependencies slightly differs from distribution to distribution. You will need:


Fedora and Red Hat Enterprise Linux

Ruby and Ruby-devel

Check if you already have a Ruby installation by typing the following command. You should see something that looks like:

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

Deltacloud requires at least Ruby 1.8.7. You need to install also the development headers (ruby-devel) because Deltacloud relies on some rubygems with C extensions. According to your package manager use commands:

$ sudo yum install ruby
$ sudo yum install ruby-devel

RubyGems

Deltacloud relies on a number of RubyGems. You can check if you already have gem executable (similarly to ruby) by typing $ gem -v. Otherwise use your package manager for the installation:

$ sudo yum install rubygems

GCC-C++, Libxml2, Libxml2-devel, Libxslt, Libxslt-devel, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (the last two are for the CIMI persistence layer). Use commands:

$ sudo yum install gcc-c++
$ sudo yum install libxml libxml2-devel
$ sudo yum install libxslt libxslt-devel
$ sudo yum install sqlite sqlite-devel

Rake

Rake is Ruby's Make and is itself a ruby gem. Once you have RubyGems installed you can get rake with:

$ sudo gem install rake


Debian and Ubuntu

Ruby and RubyGems

The following instructions focus on installing Ruby 1.9 (Deltacloud requires at least ruby 1.8.7.). Install ruby and rubygem by typing:

$ sudo apt-get install ruby1.9.1-full

Use the following command to check, whether the installation was successful. You should see a similar response:

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

You can check the installation of Rubygems the same way:

$ gem -v
1.3.7

g++, libxml2, libxml2-dev, libxslt, libxslt-dev, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (last two are for CIMI persistence layer). Use commands:

$ sudo apt-get install g++
$ sudo apt-get install libxml libxml2-dev
$ sudo apt-get install libxslt libxslt-dev
$ sudo apt-get install sqlite sqlite-dev

Gem dependecies

Debian and Ubuntu distributions also require to install following gem dependencies:

gem install thin sinatra rack-accept rest-client sinatra-content-for nokogiri
Once these gems are installed, go to the directory (normally /var/lib/gems/1.9.1/gems), where gems are located and check that you have following gems listed. You may see more gems than you directly installed, because RubyGems install gem dependecies automaticly.


Aws-2.5.6, builder-3.0.0, bundler-1.1.3, daemons-1.1.8, eventmachine-0.12.10, haml-3.1.4, http_connection-1.4.1, json-1.6.6, mime-types-1.18, net-ssh-2.3.0, nokogiri-1.5.2, rack-1.4.1, rake-0.9.2.2, rack-accept-0.4.4, rack-protection-1.2.0, rest-client-1.6.7, sinatra-1.3.2, sinatra-content-for-0.1, thin-1.3.1, tilt-1.3.3, uuidtools-2.1.2, xml-simple-1.1.1

You may have trouble with the installation, if the Makefile is missing. Then, you need to install make:

$ sudo apt-get install make


OS X

Instructions on setting up Deltacloud on Appleā€™s OS X can be found on the Wiki. Note that they require using homebrew.

Installation of Deltacloud itself

Once you've setup all the dependencies listed above, installing Deltacloud is as easy. Type:

$ sudo gem install deltacloud-core

And thats it! The gem install command will automatically fetch and install all other gems that the Deltacloud server needs. As an alternative you can get the latest releases of Deltacloud from the Apache website.

Note: When installing and running Deltacloud on platforms with Ruby versions 1.8.x, the 'require_relative' gem needs to be installed. This gem should be automatically installed with the deltacloud-core gem however, if this does not occur, the follow error will be thrown when starting Deltacloud:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- require_relative (LoadError)

The fix is to explicitly install the 'require_relative' gem:

$ sudo gem install require_relative

Run Deltacloud


;T; I"/

Installation dependencies

First of all, you have to install several dependecies. The Deltacloud server relies on a number of external rubygems and other libraries. The following packages are neccessary for running the Deltacloud server. The installation of dependencies slightly differs from distribution to distribution. You will need:


Fedora and Red Hat Enterprise Linux

Ruby and Ruby-devel

Check if you already have a Ruby installation by typing the following command. You should see something that looks like:

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

Deltacloud requires at least Ruby 1.8.7. You need to install also the development headers (ruby-devel) because Deltacloud relies on some rubygems with C extensions. According to your package manager use commands:

$ sudo yum install ruby
$ sudo yum install ruby-devel

RubyGems

Deltacloud relies on a number of RubyGems. You can check if you already have gem executable (similarly to ruby) by typing $ gem -v. Otherwise use your package manager for the installation:

$ sudo yum install rubygems

GCC-C++, Libxml2, Libxml2-devel, Libxslt, Libxslt-devel, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (the last two are for the CIMI persistence layer). Use commands:

$ sudo yum install gcc-c++
$ sudo yum install libxml libxml2-devel
$ sudo yum install libxslt libxslt-devel
$ sudo yum install sqlite sqlite-devel

Rake

Rake is Ruby's Make and is itself a ruby gem. Once you have RubyGems installed you can get rake with:

$ sudo gem install rake

Debian and Ubuntu

Ruby and RubyGems

The following instructions focus on installing Ruby 1.9 (Deltacloud requires at least ruby 1.8.7.). Install ruby and rubygem by typing:
$ sudo apt-get install ruby1.9.1-full
Use the following command to check, whether the installation was successful. You should see a similar response:
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
You can check the installation of Rubygems the same way:
$ gem -v
1.3.7

g++, libxml2, libxml2-dev, libxslt, libxslt-dev, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (last two are for CIMI persistence layer). Use commands:

$ sudo apt-get install g++
$ sudo apt-get install libxml libxml2-dev
$ sudo apt-get install libxslt libxslt-dev
$ sudo apt-get install sqlite sqlite-dev

Gem dependecies

Debian and Ubuntu distributions also require to install following gem dependencies:

gem install thin sinatra rack-accept rest-client sinatra-content-for nokogiri
Once these gems are installed, go to the directory (normally /var/lib/gems/1.9.1/gems), where gems are located and check that you have following gems listed. You may see more gems than you directly installed, because RubyGems install gem dependecies automaticly.


Aws-2.5.6, builder-3.0.0, bundler-1.1.3, daemons-1.1.8, eventmachine-0.12.10, haml-3.1.4, http_connection-1.4.1, json-1.6.6, mime-types-1.18, net-ssh-2.3.0, nokogiri-1.5.2, rack-1.4.1, rake-0.9.2.2, rack-accept-0.4.4, rack-protection-1.2.0, rest-client-1.6.7, sinatra-1.3.2, sinatra-content-for-0.1, thin-1.3.1, tilt-1.3.3, uuidtools-2.1.2, xml-simple-1.1.1

You may have trouble with the installation, if the Makefile is missing. Then, you need to install make:

$ sudo apt-get install make

OS X

Instructions on setting up Deltacloud on Apple's OS X can be found on the Wiki. Note that they require using homebrew.

Installation of Deltacloud itself

Once you've setup all the dependencies listed above, installing Deltacloud is as easy. Type:

$ sudo gem install deltacloud-core

And thats it! The gem install command will automatically fetch and install all other gems that the Deltacloud server needs. As an alternative you can get the latest releases of Deltacloud from the Apache website.

Note: When installing and running Deltacloud on platforms with Ruby versions 1.8.x, the 'require_relative' gem needs to be installed. This gem should be automatically installed with the deltacloud-core gem however, if this does not occur, the follow error will be thrown when starting Deltacloud:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- require_relative (LoadError)

The fix is to explicitly install the 'require_relative' gem:

$ sudo gem install require_relative
Run Deltacloud
;T; I"s


Installation dependencies

First of all, you have to install several dependecies. The Deltacloud server relies on a number of external rubygems and other libraries. The following packages are neccessary for running the Deltacloud server. The installation of dependencies slightly differs from distribution to distribution. You will need:


Fedora and Red Hat Enterprise Linux

Ruby and Ruby-devel

Check if you already have a Ruby installation by typing the following command. You should see something that looks like:

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

Deltacloud requires at least Ruby 1.8.7. You need to install also the development headers (ruby-devel) because Deltacloud relies on some rubygems with C extensions. According to your package manager use commands:

$ sudo yum install ruby
$ sudo yum install ruby-devel

RubyGems

Deltacloud relies on a number of RubyGems. You can check if you already have gem executable (similarly to ruby) by typing $ gem -v. Otherwise use your package manager for the installation:

$ sudo yum install rubygems

GCC-C++, Libxml2, Libxml2-devel, Libxslt, Libxslt-devel, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (the last two are for the CIMI persistence layer). Use commands:

$ sudo yum install gcc-c++
$ sudo yum install libxml libxml2-devel
$ sudo yum install libxslt libxslt-devel
$ sudo yum install sqlite sqlite-devel

Rake

Rake is Ruby's Make and is itself a ruby gem. Once you have RubyGems installed you can get rake with:

$ sudo gem install rake


Debian and Ubuntu

Ruby and RubyGems

The following instructions focus on installing Ruby 1.9 (Deltacloud requires at least ruby 1.8.7.). Install ruby and rubygem by typing:

$ sudo apt-get install ruby1.9.1-full

Use the following command to check, whether the installation was successful. You should see a similar response:

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

You can check the installation of Rubygems the same way:

$ gem -v
1.3.7

g++, libxml2, libxml2-dev, libxslt, libxslt-dev, sqlite, sqlite-devel

These libraries are required to build RubyGems that have C extensions (last two are for CIMI persistence layer). Use commands:

$ sudo apt-get install g++
$ sudo apt-get install libxml libxml2-dev
$ sudo apt-get install libxslt libxslt-dev
$ sudo apt-get install sqlite sqlite-dev

Gem dependecies

Debian and Ubuntu distributions also require to install following gem dependencies:

gem install thin sinatra rack-accept rest-client sinatra-content-for nokogiri
Once these gems are installed, go to the directory (normally /var/lib/gems/1.9.1/gems), where gems are located and check that you have following gems listed. You may see more gems than you directly installed, because RubyGems install gem dependecies automaticly.


Aws-2.5.6, builder-3.0.0, bundler-1.1.3, daemons-1.1.8, eventmachine-0.12.10, haml-3.1.4, http_connection-1.4.1, json-1.6.6, mime-types-1.18, net-ssh-2.3.0, nokogiri-1.5.2, rack-1.4.1, rake-0.9.2.2, rack-accept-0.4.4, rack-protection-1.2.0, rest-client-1.6.7, sinatra-1.3.2, sinatra-content-for-0.1, thin-1.3.1, tilt-1.3.3, uuidtools-2.1.2, xml-simple-1.1.1

You may have trouble with the installation, if the Makefile is missing. Then, you need to install make:

$ sudo apt-get install make


OS X

Instructions on setting up Deltacloud on Appleā€™s OS X can be found on the Wiki. Note that they require using homebrew.

Installation of Deltacloud itself

Once you've setup all the dependencies listed above, installing Deltacloud is as easy. Type:

$ sudo gem install deltacloud-core

And thats it! The gem install command will automatically fetch and install all other gems that the Deltacloud server needs. As an alternative you can get the latest releases of Deltacloud from the Apache website.

Note: When installing and running Deltacloud on platforms with Ruby versions 1.8.x, the 'require_relative' gem needs to be installed. This gem should be automatically installed with the deltacloud-core gem however, if this does not occur, the follow error will be thrown when starting Deltacloud:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- require_relative (LoadError)

The fix is to explicitly install the 'require_relative' gem:

$ sudo gem install require_relative

Run Deltacloud


;T; @I"/;T{;{ ;I"] Deltacloud API

What does Deltacloud give you?

  • an opportunity to manage cloud instances the way you want
  • a way to protect your apps from cloud API changes and incompatitibilities
  • three frontends: 'classic' Deltacloud, DMTF CIMI, and EC2
  • support for all major cloud service providers
  • makes it easy for cloud providers to add their cloud
  • lets you use your RHEV-M and vSphere installations as a cloud
Learn more

For developers

Deltacloud:
  • is an open source Apache project
  • is a REST-based API for simple any-platform access
  • is written in Ruby with love
  • comes with client libraries for your favourite programming language
Contribute

Current release:
deltacloud-core-1.1.0
More about installation...


Found a bug?

;T; I"

What does Deltacloud give you?

  • an opportunity to manage cloud instances the way you want
  • a way to protect your apps from cloud API changes and incompatitibilities
  • three frontends: 'classic' Deltacloud, DMTF CIMI, and EC2
  • support for all major cloud service providers
  • makes it easy for cloud providers to add their cloud
  • lets you use your RHEV-M and vSphere installations as a cloud
Learn more

For developers

Deltacloud:
  • is an open source Apache project
  • is a REST-based API for simple any-platform access
  • is written in Ruby with love
  • comes with client libraries for your favourite programming language
Contribute

Current release:
deltacloud-core-1.1.0
More about installation...


Found a bug?

;T; I"ā

What does Deltacloud give you?

  • an opportunity to manage cloud instances the way you want
  • a way to protect your apps from cloud API changes and incompatitibilities
  • three frontends: 'classic' Deltacloud, DMTF CIMI, and EC2
  • support for all major cloud service providers
  • makes it easy for cloud providers to add their cloud
  • lets you use your RHEV-M and vSphere installations as a cloud
Learn more

For developers

Deltacloud:
  • is an open source Apache project
  • is a REST-based API for simple any-platform access
  • is written in Ruby with love
  • comes with client libraries for your favourite programming language
Contribute

Current release:
deltacloud-core-1.1.0
More about installation...


Found a bug?

;T; @I"/instance-states/;T{;{ ;I"' Instance states


Instance states

Each cloud defines a slightly different lifecycle model for instances. In some clouds, instances start running immediately after creation, in others, they enter a pending state and you need to start them explicitly.

Differences between clouds are modelled by expressing the lifecycle of an instance as a finite state machine and capturing it in an instance states entity.The API defines the following states for an instance:

State Meaning
start an instance state before creation of an instance
pending creation of an instance is in progress
running an instance is running
shutting-down an instance is stopped
stopped an instance is stopped
finished all resources for an instance have now been freed

The details of a particular instance describes also the actions (state transitions) which can be performed on the instance. If the state transition is marked as auto, the transition from one state to another is done automatically. The possible instance actions are:

Action Meaning
start starts the instance
stop stops (and for some providers shutdown) the instance
reboot reboots the instance
destroy stops the instance and completely destroys it

Get an instance states entity

To retrieve the instance states entity for a back-end cloud use call GET /api/instance_states. The instance states entity defines possible transitions between various states of an instance, specific for each back-end cloud. As a result, instance states defines the finite state machine for instances from the given cloud.

Example request:

GET /api/instance_states?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 583

<states>
  <state name='start'>
    <transition action='create' to='pending'></transition>
  </state>
  <state name='pending'>
    <transition auto='true' to='running'></transition>
  </state>
  <state name='running'>
    <transition action='reboot' to='running'></transition>
    <transition action='stop' to='shutting_down'></transition>
  </state>
  <state name='shutting_down'>
    <transition auto='true' to='stopped'></transition>
  </state>
  <state name='stopped'>
    <transition auto='true' to='finish'></transition>
  </state>
  <state name='finish'>
  </state>
</states>

Instances


;T; I"

Instance states

Each cloud defines a slightly different lifecycle model for instances. In some clouds, instances start running immediately after creation, in others, they enter a pending state and you need to start them explicitly.

Differences between clouds are modelled by expressing the lifecycle of an instance as a finite state machine and capturing it in an instance states entity.The API defines the following states for an instance:

State Meaning
start an instance state before creation of an instance
pending creation of an instance is in progress
running an instance is running
shutting-down an instance is stopped
stopped an instance is stopped
finished all resources for an instance have now been freed

The details of a particular instance describes also the actions (state transitions) which can be performed on the instance. If the state transition is marked as auto, the transition from one state to another is done automatically. The possible instance actions are:

Action Meaning
start starts the instance
stop stops (and for some providers shutdown) the instance
reboot reboots the instance
destroy stops the instance and completely destroys it

Get an instance states entity

To retrieve the instance states entity for a back-end cloud use call GET /api/instance_states. The instance states entity defines possible transitions between various states of an instance, specific for each back-end cloud. As a result, instance states defines the finite state machine for instances from the given cloud.

Example request:

GET /api/instance_states?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 583

<states>
  <state name='start'>
    <transition action='create' to='pending'></transition>
  </state>
  <state name='pending'>
    <transition auto='true' to='running'></transition>
  </state>
  <state name='running'>
    <transition action='reboot' to='running'></transition>
    <transition action='stop' to='shutting_down'></transition>
  </state>
  <state name='shutting_down'>
    <transition auto='true' to='stopped'></transition>
  </state>
  <state name='stopped'>
    <transition auto='true' to='finish'></transition>
  </state>
  <state name='finish'>
  </state>
</states>
Instances
;T; I"”


Instance states

Each cloud defines a slightly different lifecycle model for instances. In some clouds, instances start running immediately after creation, in others, they enter a pending state and you need to start them explicitly.

Differences between clouds are modelled by expressing the lifecycle of an instance as a finite state machine and capturing it in an instance states entity.The API defines the following states for an instance:

State Meaning
start an instance state before creation of an instance
pending creation of an instance is in progress
running an instance is running
shutting-down an instance is stopped
stopped an instance is stopped
finished all resources for an instance have now been freed

The details of a particular instance describes also the actions (state transitions) which can be performed on the instance. If the state transition is marked as auto, the transition from one state to another is done automatically. The possible instance actions are:

Action Meaning
start starts the instance
stop stops (and for some providers shutdown) the instance
reboot reboots the instance
destroy stops the instance and completely destroys it

Get an instance states entity

To retrieve the instance states entity for a back-end cloud use call GET /api/instance_states. The instance states entity defines possible transitions between various states of an instance, specific for each back-end cloud. As a result, instance states defines the finite state machine for instances from the given cloud.

Example request:

GET /api/instance_states?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 583

<states>
  <state name='start'>
    <transition action='create' to='pending'></transition>
  </state>
  <state name='pending'>
    <transition auto='true' to='running'></transition>
  </state>
  <state name='running'>
    <transition action='reboot' to='running'></transition>
    <transition action='stop' to='shutting_down'></transition>
  </state>
  <state name='shutting_down'>
    <transition auto='true' to='stopped'></transition>
  </state>
  <state name='stopped'>
    <transition auto='true' to='finish'></transition>
  </state>
  <state name='finish'>
  </state>
</states>

Instances


;T; @"I" /images/;T{;{ ;I"«C Images


Images

Images are used to launch instances. Each image represents a virtual machine image in the back-end cloud, containing the root partition and initial storage for an instance operating system. An image has these attributes:

  • a human-readable name
  • a description
  • an owner_id
  • an architecture
  • a state

The owner_id identifies the user account to which the image belongs. The architecture attribute refers to whether the image will create an instance with 32 or 64-bit processor. The values that the Deltacloud server returns for this attribute are thus i386 and x86_64 respectively. The state attribute varies between back-end clouds (it depends on a cloud provider). For example, AWS EC2 image state can be one of AVAILABLE, PENDING or FAILED, whereas Rackspace Cloudservers image state can be one of UNKNOWN, PREPARING, ACTIVE, QUEUED or FAILED. Finally, each image also contains an <actions> attribute which specifies the URI to which a client may issue a HTTP POST for creation of an instance from the given image.



Get the list of all images

To return a list of all images available in the back-end cloud use call GET /api/images. By default this call will return all images that are available to the given user account. Optionally a client may restrict the list of images returned by specifying the owner_id or architecture parameters in the request (architecture is one of x86_64 for 64-bit processors or i386 for 32-bit processors). The example below restricts the image list to 64-bit architecture images belonging to owner_id 023801271342.

Example request:

GET /api/images?owner_id=023801271342&architecture=x86_64&format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1971

<?xml version='1.0' encoding='utf-8' ?>
<images>
  <image href='http://localhost:3001/api/images/ami-eea35787' id='ami-eea35787'>
    <name>sles-10-sp3-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 10 Service Pack 3 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-eea35787' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-6e649707' id='ami-6e649707'>
    <name>sles-11-sp1-hvm-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-6e649707' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a7558d' id='ami-e4a7558d'>
    <name>sles-11-sp1-hvm-v1.01.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.01)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a7558d' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a3578d' id='ami-e4a3578d'>
    <name>sles-11-sp1-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a3578d' method='post' rel='create_instance' />
    </actions>
  </image>
</images>

Get details of an image

To retrieve the description of a specific image use call GET /api/images/:id.

Example request:

GET /api/images/14?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 433

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/14' id='14'>
  <name>Red Hat Enterprise Linux 5.4</name>
  <owner_id>jsmith</owner_id>
  <description>Red Hat Enterprise Linux 5.4</description>
  <architecture>x86_64</architecture>
  <state>ACTIVE</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=14' method='post' rel='create_instance' />
  </actions>
</image>

Create an image

To create a new image from an existing running instance use call POST /api/images. This operation is not available to all cloud providers and for some cloud providers this operation is not possible for all instances. For example, in the Amazon EC2 cloud, you can create a custom image from EBS backed instances but not from root-store instances.

Ɨ Note:

RHVE-M, vSphere and Fujitsu GCP providers allow you to create an image only from a stopped instance, not from a running instance.

The Deltacloud API provides a mechanism with which clients can determine whether a given instance may be saved as a custom image. If an instance snapshot is possible, the instance XML <actions> list contains a create_image action. This action defines the client's URI which is used in creating the new image. For example:

...
<actions>
  <link href='http://localhost:3002/api/instances/20109341/reboot' method='post' rel='reboot' />
  <link href='http://localhost:3002/api/instances/20109341/stop' method='post' rel='stop' />
  <link href='http://localhost:3002/api/instances/20109341/run;id=20109341' method='post' rel='run' />
  <link href='http://localhost:3002/api/images;instance_id=20109341' method='post' rel='create_image' />
</actions>
...

To create a new image the client must specify the instance_id of the running instance. Optionally, the client may also provide a name and a description. The parameters may be defined as multipart/form-data fields in the client POST.

Alternatively, clients may also specify parameters using a content-type of application/x-www-form-urlencoded. The Deltacloud server will respond to a successful operation with HTTP 201 Created and provide details of the newly created image.

Example request:

POST /api/images?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 96
Content-Type: application/x-www-form-urlencoded

instance_id=20109341&name=customisedserver&description=jsmith%20cu
stomised%20web%20server%20July%2021%202011

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 427

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/12346145' id='12346145'>
  <name>customisedserver</name>
  <owner_id>mandreou</owner_id>
  <description>customisedserver</description>
  <architecture>x86_64</architecture>
  <state>QUEUED</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=12346145' method='post' rel='create_instance' />
  </actions>
</image>
Ɨ Note:

When you create an image from a stopped instance in vSphere cloud, this particular instance is marked as template and it is also removed from Instances.

Unlike other providers, vSphere does not support assigning a name and a description to the image when you create an image from a stopped instance. The image created in vSphere ignores these attributes passed to the API during the creation.

Fujitsu GCP does not return an ID that can be used to track the state of the image creation. Poll the list of all images until your image appears. This will contain the proper image id that can be used in other image actions.

Delete an image

To delete the specified image from the back-end cloud use call DELETE /api/images/:id. The Deltacloud server will return a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/images/12346145?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 204 No Content

Instance states


;T; I"'.

Images

Images are used to launch instances. Each image represents a virtual machine image in the back-end cloud, containing the root partition and initial storage for an instance operating system. An image has these attributes:

The owner_id identifies the user account to which the image belongs. The architecture attribute refers to whether the image will create an instance with 32 or 64-bit processor. The values that the Deltacloud server returns for this attribute are thus i386 and x86_64 respectively. The state attribute varies between back-end clouds (it depends on a cloud provider). For example, AWS EC2 image state can be one of AVAILABLE, PENDING or FAILED, whereas Rackspace Cloudservers image state can be one of UNKNOWN, PREPARING, ACTIVE, QUEUED or FAILED. Finally, each image also contains an <actions> attribute which specifies the URI to which a client may issue a HTTP POST for creation of an instance from the given image.



Get the list of all images

To return a list of all images available in the back-end cloud use call GET /api/images. By default this call will return all images that are available to the given user account. Optionally a client may restrict the list of images returned by specifying the owner_id or architecture parameters in the request (architecture is one of x86_64 for 64-bit processors or i386 for 32-bit processors). The example below restricts the image list to 64-bit architecture images belonging to owner_id 023801271342.

Example request:

GET /api/images?owner_id=023801271342&architecture=x86_64&format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1971

<?xml version='1.0' encoding='utf-8' ?>
<images>
  <image href='http://localhost:3001/api/images/ami-eea35787' id='ami-eea35787'>
    <name>sles-10-sp3-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 10 Service Pack 3 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-eea35787' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-6e649707' id='ami-6e649707'>
    <name>sles-11-sp1-hvm-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-6e649707' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a7558d' id='ami-e4a7558d'>
    <name>sles-11-sp1-hvm-v1.01.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.01)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a7558d' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a3578d' id='ami-e4a3578d'>
    <name>sles-11-sp1-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a3578d' method='post' rel='create_instance' />
    </actions>
  </image>
</images>

Get details of an image

To retrieve the description of a specific image use call GET /api/images/:id.

Example request:

GET /api/images/14?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 433

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/14' id='14'>
  <name>Red Hat Enterprise Linux 5.4</name>
  <owner_id>jsmith</owner_id>
  <description>Red Hat Enterprise Linux 5.4</description>
  <architecture>x86_64</architecture>
  <state>ACTIVE</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=14' method='post' rel='create_instance' />
  </actions>
</image>

Create an image

To create a new image from an existing running instance use call POST /api/images. This operation is not available to all cloud providers and for some cloud providers this operation is not possible for all instances. For example, in the Amazon EC2 cloud, you can create a custom image from EBS backed instances but not from root-store instances.

Ɨ Note:

RHVE-M, vSphere and Fujitsu GCP providers allow you to create an image only from a stopped instance, not from a running instance.

The Deltacloud API provides a mechanism with which clients can determine whether a given instance may be saved as a custom image. If an instance snapshot is possible, the instance XML <actions> list contains a create_image action. This action defines the client's URI which is used in creating the new image. For example:

...
<actions>
  <link href='http://localhost:3002/api/instances/20109341/reboot' method='post' rel='reboot' />
  <link href='http://localhost:3002/api/instances/20109341/stop' method='post' rel='stop' />
  <link href='http://localhost:3002/api/instances/20109341/run;id=20109341' method='post' rel='run' />
  <link href='http://localhost:3002/api/images;instance_id=20109341' method='post' rel='create_image' />
</actions>
...

To create a new image the client must specify the instance_id of the running instance. Optionally, the client may also provide a name and a description. The parameters may be defined as multipart/form-data fields in the client POST.

Alternatively, clients may also specify parameters using a content-type of application/x-www-form-urlencoded. The Deltacloud server will respond to a successful operation with HTTP 201 Created and provide details of the newly created image.

Example request:

POST /api/images?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 96
Content-Type: application/x-www-form-urlencoded

instance_id=20109341&name=customisedserver&description=jsmith%20cu
stomised%20web%20server%20July%2021%202011

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 427

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/12346145' id='12346145'>
  <name>customisedserver</name>
  <owner_id>mandreou</owner_id>
  <description>customisedserver</description>
  <architecture>x86_64</architecture>
  <state>QUEUED</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=12346145' method='post' rel='create_instance' />
  </actions>
</image>
Ɨ Note:

When you create an image from a stopped instance in vSphere cloud, this particular instance is marked as template and it is also removed from Instances.

Unlike other providers, vSphere does not support assigning a name and a description to the image when you create an image from a stopped instance. The image created in vSphere ignores these attributes passed to the API during the creation.

Fujitsu GCP does not return an ID that can be used to track the state of the image creation. Poll the list of all images until your image appears. This will contain the proper image id that can be used in other image actions.

Delete an image

To delete the specified image from the back-end cloud use call DELETE /api/images/:id. The Deltacloud server will return a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/images/12346145?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 204 No Content
Instance states
;T; I"3.


Images

Images are used to launch instances. Each image represents a virtual machine image in the back-end cloud, containing the root partition and initial storage for an instance operating system. An image has these attributes:

The owner_id identifies the user account to which the image belongs. The architecture attribute refers to whether the image will create an instance with 32 or 64-bit processor. The values that the Deltacloud server returns for this attribute are thus i386 and x86_64 respectively. The state attribute varies between back-end clouds (it depends on a cloud provider). For example, AWS EC2 image state can be one of AVAILABLE, PENDING or FAILED, whereas Rackspace Cloudservers image state can be one of UNKNOWN, PREPARING, ACTIVE, QUEUED or FAILED. Finally, each image also contains an <actions> attribute which specifies the URI to which a client may issue a HTTP POST for creation of an instance from the given image.



Get the list of all images

To return a list of all images available in the back-end cloud use call GET /api/images. By default this call will return all images that are available to the given user account. Optionally a client may restrict the list of images returned by specifying the owner_id or architecture parameters in the request (architecture is one of x86_64 for 64-bit processors or i386 for 32-bit processors). The example below restricts the image list to 64-bit architecture images belonging to owner_id 023801271342.

Example request:

GET /api/images?owner_id=023801271342&architecture=x86_64&format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1971

<?xml version='1.0' encoding='utf-8' ?>
<images>
  <image href='http://localhost:3001/api/images/ami-eea35787' id='ami-eea35787'>
    <name>sles-10-sp3-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 10 Service Pack 3 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-eea35787' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-6e649707' id='ami-6e649707'>
    <name>sles-11-sp1-hvm-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-6e649707' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a7558d' id='ami-e4a7558d'>
    <name>sles-11-sp1-hvm-v1.01.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for HVM x86_64 (v1.01)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a7558d' method='post' rel='create_instance' />
    </actions>
  </image>
  <image href='http://localhost:3001/api/images/ami-e4a3578d' id='ami-e4a3578d'>
    <name>sles-11-sp1-v1.00.x86_64</name>
    <owner_id>013907871322</owner_id>
    <description>SUSE Linux Enterprise Server 11 Service Pack 1 for x86_64 (v1.00)</description>
    <architecture>x86_64</architecture>
    <state></state>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=ami-e4a3578d' method='post' rel='create_instance' />
    </actions>
  </image>
</images>

Get details of an image

To retrieve the description of a specific image use call GET /api/images/:id.

Example request:

GET /api/images/14?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 433

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/14' id='14'>
  <name>Red Hat Enterprise Linux 5.4</name>
  <owner_id>jsmith</owner_id>
  <description>Red Hat Enterprise Linux 5.4</description>
  <architecture>x86_64</architecture>
  <state>ACTIVE</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=14' method='post' rel='create_instance' />
  </actions>
</image>

Create an image

To create a new image from an existing running instance use call POST /api/images. This operation is not available to all cloud providers and for some cloud providers this operation is not possible for all instances. For example, in the Amazon EC2 cloud, you can create a custom image from EBS backed instances but not from root-store instances.

Ɨ Note:

RHVE-M, vSphere and Fujitsu GCP providers allow you to create an image only from a stopped instance, not from a running instance.

The Deltacloud API provides a mechanism with which clients can determine whether a given instance may be saved as a custom image. If an instance snapshot is possible, the instance XML <actions> list contains a create_image action. This action defines the client's URI which is used in creating the new image. For example:

...
<actions>
  <link href='http://localhost:3002/api/instances/20109341/reboot' method='post' rel='reboot' />
  <link href='http://localhost:3002/api/instances/20109341/stop' method='post' rel='stop' />
  <link href='http://localhost:3002/api/instances/20109341/run;id=20109341' method='post' rel='run' />
  <link href='http://localhost:3002/api/images;instance_id=20109341' method='post' rel='create_image' />
</actions>
...

To create a new image the client must specify the instance_id of the running instance. Optionally, the client may also provide a name and a description. The parameters may be defined as multipart/form-data fields in the client POST.

Alternatively, clients may also specify parameters using a content-type of application/x-www-form-urlencoded. The Deltacloud server will respond to a successful operation with HTTP 201 Created and provide details of the newly created image.

Example request:

POST /api/images?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 96
Content-Type: application/x-www-form-urlencoded

instance_id=20109341&name=customisedserver&description=jsmith%20cu
stomised%20web%20server%20July%2021%202011

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 427

<?xml version='1.0' encoding='utf-8' ?>
<image href='http://localhost:3002/api/images/12346145' id='12346145'>
  <name>customisedserver</name>
  <owner_id>mandreou</owner_id>
  <description>customisedserver</description>
  <architecture>x86_64</architecture>
  <state>QUEUED</state>
  <actions>
    <link href='http://localhost:3002/api/instances;image_id=12346145' method='post' rel='create_instance' />
  </actions>
</image>
Ɨ Note:

When you create an image from a stopped instance in vSphere cloud, this particular instance is marked as template and it is also removed from Instances.

Unlike other providers, vSphere does not support assigning a name and a description to the image when you create an image from a stopped instance. The image created in vSphere ignores these attributes passed to the API during the creation.

Fujitsu GCP does not return an ID that can be used to track the state of the image creation. Poll the list of all images until your image appears. This will contain the proper image id that can be used in other image actions.

Delete an image

To delete the specified image from the back-end cloud use call DELETE /api/images/:id. The Deltacloud server will return a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/images/12346145?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 204 No Content

Instance states


;T; @(I"/join-deltacloud/;T{;{ ;I"r
;T; I" ;T; I";F; @.I"/load-balancers/;T{;{ ;I"ĻG Load balancers


Load balancers

Load balancers allow distribution of ingress network traffic received by a specified IP address to a number of running instances. For example, a number of instances that are fulfilling the role of web servers can be attached to a single load balancer. It allows you to handle a large number of requests without influence on website performance.

This collection is not supported by all back-end cloud providers and at present, it is implemented for the Fujitsu GCP, Gogrid and Amazon EC2 cloud drivers. A load balancer is launched into a specific realm. Only instances within this specific realm may be attached to the balancer. Each load balancer has

  • a list of instances;
  • a public address representing the IP address that the balancer will respond on to client requests;
  • a created_at timestamp; and
  • a list of listeners.

Each listener has a protocol (e.g. TCP), a load balancer port and an instance port. The load balancer represents the port on which the balancer accepts connections. The instance port represents the port on which network traffic is forwarded to instances in the instance list.



Get the details of all load balancers

To retrieve details of all load balancers use call GET /api/load_balancers.

Example request:

GET /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:37:19 GMT
Content-Length: 1844

<?xml version='1.0' encoding='utf-8' ?>
<load_balancers>
  <load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>80</load_balancer_port>
        <instance_port>3001</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
  <load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>443</load_balancer_port>
        <instance_port>443</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
</load_balancers>

Get the details for a load balancer

To retrieve details for a specific load balancer use call GET /api/load_balancers/:id.

Example request:

GET /api/load_balancers/secure-site-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 18:11:49 GMT
Content-Length: 1361

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>443</load_balancer_port>
      <instance_port>443</instance_port>
    </listener>
  </listeners>
  <instances>
    <instance href='http://localhost:3001/api/instances/i-4f06b52e' id='i-4f06b52e'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-4f06b52e' rel='unregister' />
    </instance>
    <instance href='http://localhost:3001/api/instances/i-d706b5b6' id='i-d706b5b6'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-d706b5b6' rel='unregister' />
    </instance>
  </instances>
</load_balancer>

Create a load balancer

To create a new load balancer use call POST /api/load_balancers. Clients must provide the load balancer name, the realm_id to which the balancer is applied, a listener_protocol which the balancer will respond to (one of HTTP or TCP), the listener_balancer_port which specifies the port that the load balancer will be expecting network traffic on and finally the listener_instance_port which specifies the port on which instances will be receiving network traffic forwarded by the load balancer. As with other operations in the Deltacloud API, parameters may be specified by a requesting client using multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

OST /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 121
Content-Type: application/x-www-form-urlencoded

name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:30:05 GMT
Content-Length: 884

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>80</load_balancer_port>
      <instance_port>3001</instance_port>
    </listener>
  </listeners>
  <instances>
  </instances>
</load_balancer>

Delete a load balancer

To delete the specified load balancer from the back-end cloud provider use call DELETE /api/load_balancers/:id. The Deltacloud server will respond with HTTP 204 No Content for a succesful operation

Example request:

DELETE /api/load_balancers/webtraffic-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 13:23:33 GMT

Register an instance with a load balancer

To register a running instance with a specified load balancer use call POST /api/load_balancers/:id/register. Clients must provide the instance_id as a parameter to the request. The Deltacloud server will respond with a HTTP 204 No Content after a succesful operation. The Deltacloud server will accept client request parameters encoded as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/register?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e
Server response:
HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 18:20:03 GMT

Unreagister an instance from a load balancer

To unregister a specified instance from the given load balancer use call POST /api/load_balancers/:id/unregister. The client must supply the instance_id parameter to identify the instance, either as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/unregister?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 19:09:17 GMT

Storage resources


;T; I"G2

Load balancers

Load balancers allow distribution of ingress network traffic received by a specified IP address to a number of running instances. For example, a number of instances that are fulfilling the role of web servers can be attached to a single load balancer. It allows you to handle a large number of requests without influence on website performance.

This collection is not supported by all back-end cloud providers and at present, it is implemented for the Fujitsu GCP, Gogrid and Amazon EC2 cloud drivers. A load balancer is launched into a specific realm. Only instances within this specific realm may be attached to the balancer. Each load balancer has

Each listener has a protocol (e.g. TCP), a load balancer port and an instance port. The load balancer represents the port on which the balancer accepts connections. The instance port represents the port on which network traffic is forwarded to instances in the instance list.



Get the details of all load balancers

To retrieve details of all load balancers use call GET /api/load_balancers.

Example request:

GET /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:37:19 GMT
Content-Length: 1844

<?xml version='1.0' encoding='utf-8' ?>
<load_balancers>
  <load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>80</load_balancer_port>
        <instance_port>3001</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
  <load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>443</load_balancer_port>
        <instance_port>443</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
</load_balancers>

Get the details for a load balancer

To retrieve details for a specific load balancer use call GET /api/load_balancers/:id.

Example request:

GET /api/load_balancers/secure-site-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 18:11:49 GMT
Content-Length: 1361

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>443</load_balancer_port>
      <instance_port>443</instance_port>
    </listener>
  </listeners>
  <instances>
    <instance href='http://localhost:3001/api/instances/i-4f06b52e' id='i-4f06b52e'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-4f06b52e' rel='unregister' />
    </instance>
    <instance href='http://localhost:3001/api/instances/i-d706b5b6' id='i-d706b5b6'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-d706b5b6' rel='unregister' />
    </instance>
  </instances>
</load_balancer>

Create a load balancer

To create a new load balancer use call POST /api/load_balancers. Clients must provide the load balancer name, the realm_id to which the balancer is applied, a listener_protocol which the balancer will respond to (one of HTTP or TCP), the listener_balancer_port which specifies the port that the load balancer will be expecting network traffic on and finally the listener_instance_port which specifies the port on which instances will be receiving network traffic forwarded by the load balancer. As with other operations in the Deltacloud API, parameters may be specified by a requesting client using multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

OST /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 121
Content-Type: application/x-www-form-urlencoded

name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:30:05 GMT
Content-Length: 884

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>80</load_balancer_port>
      <instance_port>3001</instance_port>
    </listener>
  </listeners>
  <instances>
  </instances>
</load_balancer>

Delete a load balancer

To delete the specified load balancer from the back-end cloud provider use call DELETE /api/load_balancers/:id. The Deltacloud server will respond with HTTP 204 No Content for a succesful operation

Example request:

DELETE /api/load_balancers/webtraffic-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 13:23:33 GMT

Register an instance with a load balancer

To register a running instance with a specified load balancer use call POST /api/load_balancers/:id/register. Clients must provide the instance_id as a parameter to the request. The Deltacloud server will respond with a HTTP 204 No Content after a succesful operation. The Deltacloud server will accept client request parameters encoded as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/register?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e
Server response:
HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 18:20:03 GMT

Unreagister an instance from a load balancer

To unregister a specified instance from the given load balancer use call POST /api/load_balancers/:id/unregister. The client must supply the instance_id parameter to identify the instance, either as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/unregister?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 19:09:17 GMT
Storage resources
;T; I"O2


Load balancers

Load balancers allow distribution of ingress network traffic received by a specified IP address to a number of running instances. For example, a number of instances that are fulfilling the role of web servers can be attached to a single load balancer. It allows you to handle a large number of requests without influence on website performance.

This collection is not supported by all back-end cloud providers and at present, it is implemented for the Fujitsu GCP, Gogrid and Amazon EC2 cloud drivers. A load balancer is launched into a specific realm. Only instances within this specific realm may be attached to the balancer. Each load balancer has

Each listener has a protocol (e.g. TCP), a load balancer port and an instance port. The load balancer represents the port on which the balancer accepts connections. The instance port represents the port on which network traffic is forwarded to instances in the instance list.



Get the details of all load balancers

To retrieve details of all load balancers use call GET /api/load_balancers.

Example request:

GET /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:37:19 GMT
Content-Length: 1844

<?xml version='1.0' encoding='utf-8' ?>
<load_balancers>
  <load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>80</load_balancer_port>
        <instance_port>3001</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
  <load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
    <actions>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
    </actions>
    <public_addresses>
      <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
    </public_addresses>
    <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
    <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
    <listeners>
      <listener protocol='HTTP'>
        <load_balancer_port>443</load_balancer_port>
        <instance_port>443</instance_port>
      </listener>
    </listeners>
    <instances>
    </instances>
  </load_balancer>
</load_balancers>

Get the details for a load balancer

To retrieve details for a specific load balancer use call GET /api/load_balancers/:id.

Example request:

GET /api/load_balancers/secure-site-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 18:11:49 GMT
Content-Length: 1361

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/secure-site-balancer' id='secure-site-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>secure-site-balancer-1347100846.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:36:29 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>443</load_balancer_port>
      <instance_port>443</instance_port>
    </listener>
  </listeners>
  <instances>
    <instance href='http://localhost:3001/api/instances/i-4f06b52e' id='i-4f06b52e'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-4f06b52e' rel='unregister' />
    </instance>
    <instance href='http://localhost:3001/api/instances/i-d706b5b6' id='i-d706b5b6'>
      <link href='http://localhost:3001/api/load_balancers/secure-site-balancer/unregister?instance_id=i-d706b5b6' rel='unregister' />
    </instance>
  </instances>
</load_balancer>

Create a load balancer

To create a new load balancer use call POST /api/load_balancers. Clients must provide the load balancer name, the realm_id to which the balancer is applied, a listener_protocol which the balancer will respond to (one of HTTP or TCP), the listener_balancer_port which specifies the port that the load balancer will be expecting network traffic on and finally the listener_instance_port which specifies the port on which instances will be receiving network traffic forwarded by the load balancer. As with other operations in the Deltacloud API, parameters may be specified by a requesting client using multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

OST /api/load_balancers?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 121
Content-Type: application/x-www-form-urlencoded

name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Thu, 28 Jul 2011 13:30:05 GMT
Content-Length: 884

<?xml version='1.0' encoding='utf-8' ?>
<load_balancer href='http://localhost:3001/api/load_balancers/webtraffic-balancer' id='webtraffic-balancer'>
  <actions>
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/load_balancers/webtraffic-balancer/register' method='post' rel='register' />
  </actions>
  <public_addresses>
    <address>webtraffic-balancer-1306196965.us-east-1.elb.amazonaws.com</address>
  </public_addresses>
  <created_at>Thu Jul 28 13:29:52 UTC 2011</created_at>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
  <listeners>
    <listener protocol='HTTP'>
      <load_balancer_port>80</load_balancer_port>
      <instance_port>3001</instance_port>
    </listener>
  </listeners>
  <instances>
  </instances>
</load_balancer>

Delete a load balancer

To delete the specified load balancer from the back-end cloud provider use call DELETE /api/load_balancers/:id. The Deltacloud server will respond with HTTP 204 No Content for a succesful operation

Example request:

DELETE /api/load_balancers/webtraffic-balancer?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 13:23:33 GMT

Register an instance with a load balancer

To register a running instance with a specified load balancer use call POST /api/load_balancers/:id/register. Clients must provide the instance_id as a parameter to the request. The Deltacloud server will respond with a HTTP 204 No Content after a succesful operation. The Deltacloud server will accept client request parameters encoded as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/register?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e
Server response:
HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 18:20:03 GMT

Unreagister an instance from a load balancer

To unregister a specified instance from the given load balancer use call POST /api/load_balancers/:id/unregister. The client must supply the instance_id parameter to identify the instance, either as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/load_balancers/secure-site-balancer/unregister?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-4f06b52e

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 19:09:17 GMT

Storage resources


;T; @4I"/firewalls/;T{;{ ;I"*[ Firewalls


Firewalls

Firewalls represent sets of rules that govern the accessibility of a running instance over the public Internet. At present, only Amazon EC2 cloud (Amazon EC2 'Security Groups') and Fujitsu GCP support this collection. A firewall has these attributes:

  • a name
  • a description
  • an owner_id
  • set of rules

For Amazon EC2, an instance is launched into a firewall by specifying the firewalls1 ... firewallsN parameters in the POST /api/instances operation (see the Create an instance section).

Each firewall rule has a number of attributes describing the access granted to clients that want to communicate with the instance over the Internet. Each rule consists of

  • an allow_protocol (tcp, udp or icmp);
  • a port_from and a port_to that delimit the port range for access; and
  • a sources list, which can contain firewalls (i.e. allow instances in another firewall to communicate with instances in the firewall in which this rule exists), or a number of IP addresses in CIDR format, or a mix of both.

Each rule also specifies a direction, indicating whether it applies to ingress or egress traffic. A rule can also specify a rule_action (accept, deny), to indicate whether the firewall should accept or deny access for this traffic, and log_rule (true, false), to indicate whether an entry should be added to the log.

As Amazon EC2 has no notion of a firewall rule ID, the Deltacloud server constructs one ID for each rule as the concatenation of its attributes. The format used is: owner_id~protocol~from_port~to_port~@sources.

As explained above a source can be the address type in which case it defines an IP type (ipv4/ipv6), an IP address and routing prefix (CIDR netmask). Sources of type group have an owner_id and a name. The owner_id is the identifier of the account that created the specified firewall. The name defines the firewall to which the access is being granted.

An example of a rule id is:

393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24
          {owner_id~protocol~from_port~to_port~@sources}

By creating the rule identifier abstraction, the Deltacloud API supports deletion of an entire firewall rule as one operation.



Get a list of all firewalls

To retrieve a list of all firewalls use call GET /api/firewalls.

Example request:

GET /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Tue, 26 Jul 2011 15:56:04 GMT
Content-Length: 1640

<?xml version='1.0' encoding='utf-8' ?>
<firewalls>
  <firewall href='http://localhost:3001/api/firewalls/default' id='default'>
    <name><![CDATA[default]]></name>
    <description><![CDATA[default group]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@address,ipv4,87.228.192.251,32'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source address='87.228.192.251' family='ipv4' prefix='32' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/test' id='test'>
    <name><![CDATA[test]]></name>
    <description><![CDATA[this is just a test]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source name='default' owner='393485797142' type='group'></source>
          <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/new_firewall' id='new_firewall'>
    <name><![CDATA[new_firewall]]></name>
    <description><![CDATA[new_one]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
    </rules>
  </firewall>
</firewalls>

Get the details of a specified firewall

To retrieve details of a single specified firewall use call GET /api/firewalls/:id.

Example request:

GET /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server reponse:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:20:29 GMT
Content-Length: 835

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/test' id='test'>
  <name><![CDATA[test]]></name>
  <description><![CDATA[this is just a test]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/test/393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24' id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='default' owner='393485797142' type='group'></source>
        <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Create a new firewall

To create a new firewall use call GET /api/firewalls/:id. Clients must specify the firewall name and description as parameters to the request. The Deltacloud server will respond with HTTP 201 Created to a succesful completion and return details of the newly created firewall. As with other POST operations in the Deltacloud API, a client may specify parameters as multipart/form-data or using the application/x-www-form-urlencoded content-type.

Example request:

POST /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 64
Content-Type: application/x-www-form-urlencoded

name=Devel_Group&description=Access%20for%20all%20development%20machines

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:35:43 GMT
Content-Length: 296

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/Devel_Group' id='Devel_Group'>
  <name><![CDATA[Devel_Group]]></name>
  <description><![CDATA[Access for all development machines]]></description>
  <owner_id></owner_id>
  <rules>
  </rules>
</firewall>

Delete a firewall

To delete the specified firewall from the back-end cloud provider use call DELETE /api/firewalls/:id. The Deltacloud server will respond with HTTP 204 No Content after a successful deletion:

Example request:

DELETE /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 09:47:43 GMT

The rules governing the deletion of a firewall are back-end cloud specific.

For Fujitsu GCP, as this operation destroys the virtual system with it, all instances in the system, including the firewall need to be in the STOPPED state.

For Amazon EC2, it is permitted to delete a firewall that has rules defined within it, with two exceptions. You cannot delete a firewall if it is referenced by another firewall; for instance firewall_1 has a rule giving access to firewall_2. An attempt to delete firewall_2 will result in the error InvalidGroup.InUse, as you can see in the example below. The second exception is that you cannot delete a firewall if there are currently any running instances within that firewall (i.e. instances that specified the given firewall when they were launched). The error message in that case would be InvalidGroup.InUse: There are active instances using security group. In both cases the error messages are propagated from the back-end cloud provider to the requesting client.

Example request (error deleting a firewall referenced by another firewall):

DELETE /api/firewalls/firewall_2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Content-Length: 626

<error status='502' url='/api/firewalls/firewall_2?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[InvalidGroup.InUse: Group 393485797142:firewall_2 is used by groups: 393485797142:firewall_1
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AGG332FWWR5A11F327Q&Action=DeleteSecurityGroup&GroupName=firewall_2&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-27T08%3A50%3A50.000Z&Version=2010-08-31&Signature=g613223efwv5WAVhAosmPcrsfHqApAuw\nnwfYnZp0k3U%3D
  REQUEST ID=8591fa20-a6ee-4db7-b30f-3022ecc9a9f5]]></message>
</error>

Create a firewall rule

To create a new firewall rule within a specified firewall use call POST /api/firewalls/:id/rules. This operation of the firewalls collection is not supported by Fujitsu GCP. A client must supply the protocol (one of udp, tcp or icmp), port_from and port_to as parameters. Of course the client must also specify the sources to which the given rule is applied. IP addresses are specified in CIDR format sequentially: ip_address1=192.168.10.10/24, ip_address2=10.1.1.1/16 ... ip_addressN=.... The IP address '0.0.0.0/0' acts as a wildcard to specify any IP address. Source firewalls are also specified sequentially, but the owner_id of the firewall prepared for authorization must also be supplied (this is an Amazon EC2 requirement): group1=name1, group1owner=1234567890, group2=name2, group2owner=0987654321, ... groupN=nameN, groupNowner=...

The Deltacloud server responds with a HTTP 201 Created after a successful operation and adds the details of the given firewall. The example client request below specifies the required parameters as multipart/form-data. However clients may also legitimately use the application/x-www-form-urlencoded to provide firewall rule parameters.

Example request:

POST /api/firewalls/default/rules?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 1005
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------4c9e7fa0a35e

------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="protocol"

tcp
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_from"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_to"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1"

devel_group
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2"

outside
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address1"

192.168.1.1/24
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address2"

65.128.31.27/32
------------------------------4c9e7fa0a35e--

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 10:18:51 GMT
Content-Length: 1143

<firewall href='http://localhost:3001/api/firewalls/default' id='default'>
  <name><![CDATA[default]]></name>
  <description><![CDATA[default group]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/default/393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32' id='393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='devel_group' owner='393485797142' type='group'></source>
        <source name='outside' owner='393485797142' type='group'></source>
        <source address='192.168.1.1' family='ipv4' prefix='24' type='address'></source>
        <source address='65.128.31.27' family='ipv4' prefix='32' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Delete a firewall rule

To delete the specified firewall rule use call DELETE /api/firewalls/:id/:rule_id. The Deltacloud server will respond with HTTP 204 No Content on completion of a successful delete operation:

Example request:

DELETE /api/firewalls/default/393485797142~tcp~0~0~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 10:39:52 GMT

Addresses


;T; I"™E

Firewalls

Firewalls represent sets of rules that govern the accessibility of a running instance over the public Internet. At present, only Amazon EC2 cloud (Amazon EC2 'Security Groups') and Fujitsu GCP support this collection. A firewall has these attributes:

For Amazon EC2, an instance is launched into a firewall by specifying the firewalls1 ... firewallsN parameters in the POST /api/instances operation (see the Create an instance section).

Each firewall rule has a number of attributes describing the access granted to clients that want to communicate with the instance over the Internet. Each rule consists of

Each rule also specifies a direction, indicating whether it applies to ingress or egress traffic. A rule can also specify a rule_action (accept, deny), to indicate whether the firewall should accept or deny access for this traffic, and log_rule (true, false), to indicate whether an entry should be added to the log.

As Amazon EC2 has no notion of a firewall rule ID, the Deltacloud server constructs one ID for each rule as the concatenation of its attributes. The format used is: owner_id~protocol~from_port~to_port~@sources.

As explained above a source can be the address type in which case it defines an IP type (ipv4/ipv6), an IP address and routing prefix (CIDR netmask). Sources of type group have an owner_id and a name. The owner_id is the identifier of the account that created the specified firewall. The name defines the firewall to which the access is being granted.

An example of a rule id is:

393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24
          {owner_id~protocol~from_port~to_port~@sources}

By creating the rule identifier abstraction, the Deltacloud API supports deletion of an entire firewall rule as one operation.



Get a list of all firewalls

To retrieve a list of all firewalls use call GET /api/firewalls.

Example request:

GET /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Tue, 26 Jul 2011 15:56:04 GMT
Content-Length: 1640

<?xml version='1.0' encoding='utf-8' ?>
<firewalls>
  <firewall href='http://localhost:3001/api/firewalls/default' id='default'>
    <name><![CDATA[default]]></name>
    <description><![CDATA[default group]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@address,ipv4,87.228.192.251,32'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source address='87.228.192.251' family='ipv4' prefix='32' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/test' id='test'>
    <name><![CDATA[test]]></name>
    <description><![CDATA[this is just a test]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source name='default' owner='393485797142' type='group'></source>
          <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/new_firewall' id='new_firewall'>
    <name><![CDATA[new_firewall]]></name>
    <description><![CDATA[new_one]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
    </rules>
  </firewall>
</firewalls>

Get the details of a specified firewall

To retrieve details of a single specified firewall use call GET /api/firewalls/:id.

Example request:

GET /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server reponse:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:20:29 GMT
Content-Length: 835

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/test' id='test'>
  <name><![CDATA[test]]></name>
  <description><![CDATA[this is just a test]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/test/393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24' id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='default' owner='393485797142' type='group'></source>
        <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Create a new firewall

To create a new firewall use call GET /api/firewalls/:id. Clients must specify the firewall name and description as parameters to the request. The Deltacloud server will respond with HTTP 201 Created to a succesful completion and return details of the newly created firewall. As with other POST operations in the Deltacloud API, a client may specify parameters as multipart/form-data or using the application/x-www-form-urlencoded content-type.

Example request:

POST /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 64
Content-Type: application/x-www-form-urlencoded

name=Devel_Group&description=Access%20for%20all%20development%20machines

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:35:43 GMT
Content-Length: 296

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/Devel_Group' id='Devel_Group'>
  <name><![CDATA[Devel_Group]]></name>
  <description><![CDATA[Access for all development machines]]></description>
  <owner_id></owner_id>
  <rules>
  </rules>
</firewall>

Delete a firewall

To delete the specified firewall from the back-end cloud provider use call DELETE /api/firewalls/:id. The Deltacloud server will respond with HTTP 204 No Content after a successful deletion:

Example request:

DELETE /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 09:47:43 GMT

The rules governing the deletion of a firewall are back-end cloud specific.

For Fujitsu GCP, as this operation destroys the virtual system with it, all instances in the system, including the firewall need to be in the STOPPED state.

For Amazon EC2, it is permitted to delete a firewall that has rules defined within it, with two exceptions. You cannot delete a firewall if it is referenced by another firewall; for instance firewall_1 has a rule giving access to firewall_2. An attempt to delete firewall_2 will result in the error InvalidGroup.InUse, as you can see in the example below. The second exception is that you cannot delete a firewall if there are currently any running instances within that firewall (i.e. instances that specified the given firewall when they were launched). The error message in that case would be InvalidGroup.InUse: There are active instances using security group. In both cases the error messages are propagated from the back-end cloud provider to the requesting client.

Example request (error deleting a firewall referenced by another firewall):

DELETE /api/firewalls/firewall_2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Content-Length: 626

<error status='502' url='/api/firewalls/firewall_2?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[InvalidGroup.InUse: Group 393485797142:firewall_2 is used by groups: 393485797142:firewall_1
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AGG332FWWR5A11F327Q&Action=DeleteSecurityGroup&GroupName=firewall_2&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-27T08%3A50%3A50.000Z&Version=2010-08-31&Signature=g613223efwv5WAVhAosmPcrsfHqApAuw\nnwfYnZp0k3U%3D
  REQUEST ID=8591fa20-a6ee-4db7-b30f-3022ecc9a9f5]]></message>
</error>

Create a firewall rule

To create a new firewall rule within a specified firewall use call POST /api/firewalls/:id/rules. This operation of the firewalls collection is not supported by Fujitsu GCP. A client must supply the protocol (one of udp, tcp or icmp), port_from and port_to as parameters. Of course the client must also specify the sources to which the given rule is applied. IP addresses are specified in CIDR format sequentially: ip_address1=192.168.10.10/24, ip_address2=10.1.1.1/16 ... ip_addressN=.... The IP address '0.0.0.0/0' acts as a wildcard to specify any IP address. Source firewalls are also specified sequentially, but the owner_id of the firewall prepared for authorization must also be supplied (this is an Amazon EC2 requirement): group1=name1, group1owner=1234567890, group2=name2, group2owner=0987654321, ... groupN=nameN, groupNowner=...

The Deltacloud server responds with a HTTP 201 Created after a successful operation and adds the details of the given firewall. The example client request below specifies the required parameters as multipart/form-data. However clients may also legitimately use the application/x-www-form-urlencoded to provide firewall rule parameters.

Example request:

POST /api/firewalls/default/rules?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 1005
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------4c9e7fa0a35e

------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="protocol"

tcp
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_from"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_to"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1"

devel_group
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2"

outside
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address1"

192.168.1.1/24
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address2"

65.128.31.27/32
------------------------------4c9e7fa0a35e--

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 10:18:51 GMT
Content-Length: 1143

<firewall href='http://localhost:3001/api/firewalls/default' id='default'>
  <name><![CDATA[default]]></name>
  <description><![CDATA[default group]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/default/393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32' id='393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='devel_group' owner='393485797142' type='group'></source>
        <source name='outside' owner='393485797142' type='group'></source>
        <source address='192.168.1.1' family='ipv4' prefix='24' type='address'></source>
        <source address='65.128.31.27' family='ipv4' prefix='32' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Delete a firewall rule

To delete the specified firewall rule use call DELETE /api/firewalls/:id/:rule_id. The Deltacloud server will respond with HTTP 204 No Content on completion of a successful delete operation:

Example request:

DELETE /api/firewalls/default/393485797142~tcp~0~0~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 10:39:52 GMT
Addresses
;T; I"ÆE


Firewalls

Firewalls represent sets of rules that govern the accessibility of a running instance over the public Internet. At present, only Amazon EC2 cloud (Amazon EC2 'Security Groups') and Fujitsu GCP support this collection. A firewall has these attributes:

For Amazon EC2, an instance is launched into a firewall by specifying the firewalls1 ... firewallsN parameters in the POST /api/instances operation (see the Create an instance section).

Each firewall rule has a number of attributes describing the access granted to clients that want to communicate with the instance over the Internet. Each rule consists of

Each rule also specifies a direction, indicating whether it applies to ingress or egress traffic. A rule can also specify a rule_action (accept, deny), to indicate whether the firewall should accept or deny access for this traffic, and log_rule (true, false), to indicate whether an entry should be added to the log.

As Amazon EC2 has no notion of a firewall rule ID, the Deltacloud server constructs one ID for each rule as the concatenation of its attributes. The format used is: owner_id~protocol~from_port~to_port~@sources.

As explained above a source can be the address type in which case it defines an IP type (ipv4/ipv6), an IP address and routing prefix (CIDR netmask). Sources of type group have an owner_id and a name. The owner_id is the identifier of the account that created the specified firewall. The name defines the firewall to which the access is being granted.

An example of a rule id is:

393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24
          {owner_id~protocol~from_port~to_port~@sources}

By creating the rule identifier abstraction, the Deltacloud API supports deletion of an entire firewall rule as one operation.



Get a list of all firewalls

To retrieve a list of all firewalls use call GET /api/firewalls.

Example request:

GET /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Tue, 26 Jul 2011 15:56:04 GMT
Content-Length: 1640

<?xml version='1.0' encoding='utf-8' ?>
<firewalls>
  <firewall href='http://localhost:3001/api/firewalls/default' id='default'>
    <name><![CDATA[default]]></name>
    <description><![CDATA[default group]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@address,ipv4,87.228.192.251,32'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source address='87.228.192.251' family='ipv4' prefix='32' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/test' id='test'>
    <name><![CDATA[test]]></name>
    <description><![CDATA[this is just a test]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
      <rule id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
        <allow_protocol>tcp</allow_protocol>
        <port_from>22</port_from>
        <port_to>22</port_to>
        <direction>ingress</direction>
        <sources>
          <source name='default' owner='393485797142' type='group'></source>
          <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
        </sources>
      </rule>
    </rules>
  </firewall>
  <firewall href='http://localhost:3001/api/firewalls/new_firewall' id='new_firewall'>
    <name><![CDATA[new_firewall]]></name>
    <description><![CDATA[new_one]]></description>
    <owner_id>393485797142</owner_id>
    <rules>
    </rules>
  </firewall>
</firewalls>

Get the details of a specified firewall

To retrieve details of a single specified firewall use call GET /api/firewalls/:id.

Example request:

GET /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server reponse:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:20:29 GMT
Content-Length: 835

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/test' id='test'>
  <name><![CDATA[test]]></name>
  <description><![CDATA[this is just a test]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/test/393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24' id='393485797142~tcp~22~22~@group,393485797142,default,@address,ipv4,10.1.2.3,24'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='default' owner='393485797142' type='group'></source>
        <source address='10.1.2.3' family='ipv4' prefix='24' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Create a new firewall

To create a new firewall use call GET /api/firewalls/:id. Clients must specify the firewall name and description as parameters to the request. The Deltacloud server will respond with HTTP 201 Created to a succesful completion and return details of the newly created firewall. As with other POST operations in the Deltacloud API, a client may specify parameters as multipart/form-data or using the application/x-www-form-urlencoded content-type.

Example request:

POST /api/firewalls?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 64
Content-Type: application/x-www-form-urlencoded

name=Devel_Group&description=Access%20for%20all%20development%20machines

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 08:35:43 GMT
Content-Length: 296

<?xml version='1.0' encoding='utf-8' ?>
<firewall href='http://localhost:3001/api/firewalls/Devel_Group' id='Devel_Group'>
  <name><![CDATA[Devel_Group]]></name>
  <description><![CDATA[Access for all development machines]]></description>
  <owner_id></owner_id>
  <rules>
  </rules>
</firewall>

Delete a firewall

To delete the specified firewall from the back-end cloud provider use call DELETE /api/firewalls/:id. The Deltacloud server will respond with HTTP 204 No Content after a successful deletion:

Example request:

DELETE /api/firewalls/test?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 09:47:43 GMT

The rules governing the deletion of a firewall are back-end cloud specific.

For Fujitsu GCP, as this operation destroys the virtual system with it, all instances in the system, including the firewall need to be in the STOPPED state.

For Amazon EC2, it is permitted to delete a firewall that has rules defined within it, with two exceptions. You cannot delete a firewall if it is referenced by another firewall; for instance firewall_1 has a rule giving access to firewall_2. An attempt to delete firewall_2 will result in the error InvalidGroup.InUse, as you can see in the example below. The second exception is that you cannot delete a firewall if there are currently any running instances within that firewall (i.e. instances that specified the given firewall when they were launched). The error message in that case would be InvalidGroup.InUse: There are active instances using security group. In both cases the error messages are propagated from the back-end cloud provider to the requesting client.

Example request (error deleting a firewall referenced by another firewall):

DELETE /api/firewalls/firewall_2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Content-Length: 626

<error status='502' url='/api/firewalls/firewall_2?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[InvalidGroup.InUse: Group 393485797142:firewall_2 is used by groups: 393485797142:firewall_1
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AGG332FWWR5A11F327Q&Action=DeleteSecurityGroup&GroupName=firewall_2&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-27T08%3A50%3A50.000Z&Version=2010-08-31&Signature=g613223efwv5WAVhAosmPcrsfHqApAuw\nnwfYnZp0k3U%3D
  REQUEST ID=8591fa20-a6ee-4db7-b30f-3022ecc9a9f5]]></message>
</error>

Create a firewall rule

To create a new firewall rule within a specified firewall use call POST /api/firewalls/:id/rules. This operation of the firewalls collection is not supported by Fujitsu GCP. A client must supply the protocol (one of udp, tcp or icmp), port_from and port_to as parameters. Of course the client must also specify the sources to which the given rule is applied. IP addresses are specified in CIDR format sequentially: ip_address1=192.168.10.10/24, ip_address2=10.1.1.1/16 ... ip_addressN=.... The IP address '0.0.0.0/0' acts as a wildcard to specify any IP address. Source firewalls are also specified sequentially, but the owner_id of the firewall prepared for authorization must also be supplied (this is an Amazon EC2 requirement): group1=name1, group1owner=1234567890, group2=name2, group2owner=0987654321, ... groupN=nameN, groupNowner=...

The Deltacloud server responds with a HTTP 201 Created after a successful operation and adds the details of the given firewall. The example client request below specifies the required parameters as multipart/form-data. However clients may also legitimately use the application/x-www-form-urlencoded to provide firewall rule parameters.

Example request:

POST /api/firewalls/default/rules?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 1005
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------4c9e7fa0a35e

------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="protocol"

tcp
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_from"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="port_to"

22
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1"

devel_group
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group1owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2"

outside
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="group2owner"

393485797142
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address1"

192.168.1.1/24
------------------------------4c9e7fa0a35e
Content-Disposition: form-data; name="ip_address2"

65.128.31.27/32
------------------------------4c9e7fa0a35e--

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Date: Wed, 27 Jul 2011 10:18:51 GMT
Content-Length: 1143

<firewall href='http://localhost:3001/api/firewalls/default' id='default'>
  <name><![CDATA[default]]></name>
  <description><![CDATA[default group]]></description>
  <owner_id>393485797142</owner_id>
  <rules>
    <rule href='http://localhost:3001/api/firewalls/default/393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32' id='393485797142~tcp~22~22~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32'>
      <allow_protocol>tcp</allow_protocol>
      <port_from>22</port_from>
      <port_to>22</port_to>
      <direction>ingress</direction>
      <sources>
        <source name='devel_group' owner='393485797142' type='group'></source>
        <source name='outside' owner='393485797142' type='group'></source>
        <source address='192.168.1.1' family='ipv4' prefix='24' type='address'></source>
        <source address='65.128.31.27' family='ipv4' prefix='32' type='address'></source>
      </sources>
    </rule>
  </rules>
</firewall>

Delete a firewall rule

To delete the specified firewall rule use call DELETE /api/firewalls/:id/:rule_id. The Deltacloud server will respond with HTTP 204 No Content on completion of a successful delete operation:

Example request:

DELETE /api/firewalls/default/393485797142~tcp~0~0~@group,393485797142,devel_group,@group,393485797142,outside,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 10:39:52 GMT

Addresses


;T; @:I"/htaccess/;T{;{;I"‰Redirect 301 /documentation.html /usage.html Redirect 301 /api.html /rest-api.html Redirect 301 /developers.html /how-to-contribute.html ;T; @@; @@I"/addresses/;T{;{ ;I"®5 Addresses


Addresses

The addresses collection represents IP addresses and allows IP address management.

This collection is currently implemented for Amazon EC2 and Fujitsu GCP drivers. For EC2, IP address management corresponds to Amazon's 'Elastic IP' feature.


The addresses collection supports these operations:

  • creating an address
  • destroying an address
  • association an address with a running instance
  • dissociating an address from a running instance



Get a list of all addresses

To retrieve a list of all addresses use call GET /api/addresses.

Example request:

GET /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:55:16 GMT
Content-Length: 817

<?xml version='1.0' encoding='utf-8' ?>
<addresses>
  <address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
    <ip>107.20.232.251</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
    </actions>
  </address>
  <address href='http://localhost:3001/api/addresses/107.20.234.161' id='107.20.234.161'>
    <ip>107.20.234.161</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.234.161' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.234.161/associate' method='post' rel='associate' />
    </actions>
  </address>
</addresses>

Get the details of an address

To retrieve details for a specific address use call GET /api/addresses/:id.

Example request:

GET /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:57:27 GMT
Content-Length: 402

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Create an address

To create a new address use call POST /api/addresses. The Deltacloud server will respond with HTTP 201 Created and provide the details of the new address after a succesful operation:

Example request:

POST /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 388

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Delete an address

To delete a specified address use call DELETE /api/addresses/:id. The Deltacloud server responds with a HTTP 204 No Content after a succesful operation.

Example request:

DELETE /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 13:29:00 GMT

Associate an address with an instance

To associate a given address with a running instance use call POST /api/addresses/:id/associate. The client must specify the instance_id as a parameter to this call. For Amazon EC2, the specified address will replace the currently assigned public_address of the instance, while for the Fujitsu GCP it is added. A succesful operation results in a HTTP 202 Accepted response. The example client request below specifies the required instance_id parameter using the application/x-www-form-urlencoded content-type, however client can also use multipart/form-data.

Example request:

POST /api/addresses/107.20.232.251/associate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-9d8a3dfc

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:01:11 GMT
Content-Length: 0

Disassociate an address from an instance

To disassociate a given address from the instance to which it is currently assigned use call POST /api/addresses/:id/disassociate.

Example request:

POST /api/addresses/107.20.232.251/disassociate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:05:38 GMT
Content-Length: 0

Load Balancers


;T; I"I

Addresses

The addresses collection represents IP addresses and allows IP address management.

This collection is currently implemented for Amazon EC2 and Fujitsu GCP drivers. For EC2, IP address management corresponds to Amazon's 'Elastic IP' feature.


The addresses collection supports these operations:




Get a list of all addresses

To retrieve a list of all addresses use call GET /api/addresses.

Example request:

GET /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:55:16 GMT
Content-Length: 817

<?xml version='1.0' encoding='utf-8' ?>
<addresses>
  <address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
    <ip>107.20.232.251</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
    </actions>
  </address>
  <address href='http://localhost:3001/api/addresses/107.20.234.161' id='107.20.234.161'>
    <ip>107.20.234.161</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.234.161' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.234.161/associate' method='post' rel='associate' />
    </actions>
  </address>
</addresses>

Get the details of an address

To retrieve details for a specific address use call GET /api/addresses/:id.

Example request:

GET /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:57:27 GMT
Content-Length: 402

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Create an address

To create a new address use call POST /api/addresses. The Deltacloud server will respond with HTTP 201 Created and provide the details of the new address after a succesful operation:

Example request:

POST /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 388

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Delete an address

To delete a specified address use call DELETE /api/addresses/:id. The Deltacloud server responds with a HTTP 204 No Content after a succesful operation.

Example request:

DELETE /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 13:29:00 GMT

Associate an address with an instance

To associate a given address with a running instance use call POST /api/addresses/:id/associate. The client must specify the instance_id as a parameter to this call. For Amazon EC2, the specified address will replace the currently assigned public_address of the instance, while for the Fujitsu GCP it is added. A succesful operation results in a HTTP 202 Accepted response. The example client request below specifies the required instance_id parameter using the application/x-www-form-urlencoded content-type, however client can also use multipart/form-data.

Example request:

POST /api/addresses/107.20.232.251/associate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-9d8a3dfc

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:01:11 GMT
Content-Length: 0

Disassociate an address from an instance

To disassociate a given address from the instance to which it is currently assigned use call POST /api/addresses/:id/disassociate.

Example request:

POST /api/addresses/107.20.232.251/disassociate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:05:38 GMT
Content-Length: 0
Load Balancers
;T; I"3


Addresses

The addresses collection represents IP addresses and allows IP address management.

This collection is currently implemented for Amazon EC2 and Fujitsu GCP drivers. For EC2, IP address management corresponds to Amazon's 'Elastic IP' feature.


The addresses collection supports these operations:




Get a list of all addresses

To retrieve a list of all addresses use call GET /api/addresses.

Example request:

GET /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:55:16 GMT
Content-Length: 817

<?xml version='1.0' encoding='utf-8' ?>
<addresses>
  <address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
    <ip>107.20.232.251</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
    </actions>
  </address>
  <address href='http://localhost:3001/api/addresses/107.20.234.161' id='107.20.234.161'>
    <ip>107.20.234.161</ip>
    <actions>
      <link href='http://localhost:3001/api/addresses/107.20.234.161' method='delete' rel='destroy' />
      <link href='http://localhost:3001/api/addresses/107.20.234.161/associate' method='post' rel='associate' />
    </actions>
  </address>
</addresses>

Get the details of an address

To retrieve details for a specific address use call GET /api/addresses/:id.

Example request:

GET /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:57:27 GMT
Content-Length: 402

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Create an address

To create a new address use call POST /api/addresses. The Deltacloud server will respond with HTTP 201 Created and provide the details of the new address after a succesful operation:

Example request:

POST /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 388

<?xml version='1.0' encoding='utf-8' ?>
<address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'>
  <ip>107.20.232.251</ip>
  <actions>
    <link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' />
    <link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' />
  </actions>
</address>

Delete an address

To delete a specified address use call DELETE /api/addresses/:id. The Deltacloud server responds with a HTTP 204 No Content after a succesful operation.

Example request:

DELETE /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 13:29:00 GMT

Associate an address with an instance

To associate a given address with a running instance use call POST /api/addresses/:id/associate. The client must specify the instance_id as a parameter to this call. For Amazon EC2, the specified address will replace the currently assigned public_address of the instance, while for the Fujitsu GCP it is added. A succesful operation results in a HTTP 202 Accepted response. The example client request below specifies the required instance_id parameter using the application/x-www-form-urlencoded content-type, however client can also use multipart/form-data.

Example request:

POST /api/addresses/107.20.232.251/associate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

instance_id=i-9d8a3dfc

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:01:11 GMT
Content-Length: 0

Disassociate an address from an instance

To disassociate a given address from the instance to which it is currently assigned use call POST /api/addresses/:id/disassociate.

Example request:

POST /api/addresses/107.20.232.251/disassociate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:05:38 GMT
Content-Length: 0

Load Balancers


;T; @DI" /usage/;T{;{ ;I"@- Usage


Using API

Clients

Instead of dealing with HTTP interface you can use various clients to communicate with Deltacloud server.

The Deltacloud Ruby Client

You need to install Ruby client seperately to the Deltacloud API server. Assuming you already have Ruby and RubyGems setup, you can install the Deltacloud client by simply typing:

$ sudo gem install deltacloud-client

The Deltacloud client consists of a Ruby library (packaged as a Ruby gem) which you can use to interact with the Deltacloud server and control your cloud infrastructure across cloud providers.

To use the client, you must require deltacloud:

require 'deltacloud'

Connect to a Deltacloud provider:

require 'deltacloud'

api_url      = 'http://localhost:3001/api'
api_name     = 'mockuser'
api_password = 'mockpassword'

client = DeltaCloud.new( api_name, api_password, api_url )

# work with client here

In addition to creating a client, you can specify operations within a block included on the initialization.

DeltaCloud.new( api_name, api_password, api_url ) do |client|
  # work with client here
end

In case of a failure, any underlying HTTP transport exceptions will be thrown away and returned back to the caller.

To work with another driver, just switch the client:

client = DeltaCloud.new( api_name, api_password, api_url )

# switch the client to use EC2 driver
ec2 = client.with_config(:driver => :ec2)

# switch the client to use OpenStack driver
openstack = client.with_config(:driver => :openstack)
Work with the Ruby client

HTTP clients - cURL

Basically, you interact with the Deltacloud server via HTTP calls, so you can use any HTTP client to talk to Deltacloud using the Deltacloud REST API.

cURL is a popular command line tool available on most modern linux distributions. See the following examples to learn how to use cURL to interact with Deltacloud. There is an assumption that the Deltacloud server is running on locahost:3001 and was started with the 'ec2' driver (i.e., deltacloudd -i ec2 ).

Get a list of all images available in the back-end cloud:

curl  --user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/images?format=xml"

The cURL --user option is used to specify the username:password credentials for access to the back-end cloud provider (Amazon EC2 in this case).

Create a new instance from the image with id 'ami-f51aff9c', in realm 'us-east-1c', with the hardware profile 'c1.medium', in firewall 'default':

curl -X POST -F "keyname=eftah" -F "image_id=ami-f51aff9c"
-F "realm_id=us-east-1c" -F "hwp_id=c1.medium" -F "firewalls1=default"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/instances?format=xml"

Delete a firewall called 'develgroup':

curl -X DELETE
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/firewalls/develgroup?format=xml

Create a blob called 'my_new_blob' within the bucket 'mybucket' from a local file with HTTP PUT specifying its content type and setting some metadata key:value pairs:

curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:mariosblob'
-H 'X-Deltacloud-Blobmeta-Version:2.1' --upload-file
"/home/marios/Desktop/somefile.html"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

Retrieve blob metadata for the blob called 'my_new_blob':

curl -iv -X HEAD
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

The '-iv' flags will ensure that cURL displays the request and response headers (blob metadata are reported in the response headers with an empty response body).

Working with cURL

Libdeltacloud Client (C library)

Libdeltacloud is a C/C++ library for accessing the Deltacloud API. It exports convenient structures and functions for manipulating cloud objects through the Deltacloud API.

Get the source code:
$ git clone git://git.fedorahosted.org/deltacloud/libdeltacloud.git

As of version 0.9, libdeltacloud is mostly API stable, but not ABI stable. The difference between the two is subtle but important. A library that is ABI (Application Binary Interface) stable means, that programs using the library don't need to be modified nor re-compiled when a new version of the library comes out. A library that is API (Application Programming Interface) stable means that programs using the library don't need to be modified, but may need to be re-compiled when a new version of the library comes out. The reason is that the sizes of structures in the library might change, which can lead to a misunderstanding between what the library and the program thinks the size of a structure is.

Due to the magic of libtool versioning, programs built against an older version of libdeltacloud will refuse to run against a newer version of libdeltacloud if the size of the structures has changed. If this happens, then the program must be recompiled against the newer libdeltacloud.

Libdeltacloud documentation
;T; I"µ

Using API

Clients

Instead of dealing with HTTP interface you can use various clients to communicate with Deltacloud server.

The Deltacloud Ruby Client

You need to install Ruby client seperately to the Deltacloud API server. Assuming you already have Ruby and RubyGems setup, you can install the Deltacloud client by simply typing:
$ sudo gem install deltacloud-client

The Deltacloud client consists of a Ruby library (packaged as a Ruby gem) which you can use to interact with the Deltacloud server and control your cloud infrastructure across cloud providers.

To use the client, you must require deltacloud:

require 'deltacloud'

Connect to a Deltacloud provider:

require 'deltacloud'

api_url      = 'http://localhost:3001/api'
api_name     = 'mockuser'
api_password = 'mockpassword'

client = DeltaCloud.new( api_name, api_password, api_url )

# work with client here

In addition to creating a client, you can specify operations within a block included on the initialization.

DeltaCloud.new( api_name, api_password, api_url ) do |client|
  # work with client here
end

In case of a failure, any underlying HTTP transport exceptions will be thrown away and returned back to the caller.

To work with another driver, just switch the client:

client = DeltaCloud.new( api_name, api_password, api_url )

# switch the client to use EC2 driver
ec2 = client.with_config(:driver => :ec2)

# switch the client to use OpenStack driver
openstack = client.with_config(:driver => :openstack)
Work with the Ruby client

HTTP clients - cURL

Basically, you interact with the Deltacloud server via HTTP calls, so you can use any HTTP client to talk to Deltacloud using the Deltacloud REST API.

cURL is a popular command line tool available on most modern linux distributions. See the following examples to learn how to use cURL to interact with Deltacloud. There is an assumption that the Deltacloud server is running on locahost:3001 and was started with the 'ec2' driver (i.e., deltacloudd -i ec2 ).

Get a list of all images available in the back-end cloud:

curl  --user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/images?format=xml"

The cURL --user option is used to specify the username:password credentials for access to the back-end cloud provider (Amazon EC2 in this case).

Create a new instance from the image with id 'ami-f51aff9c', in realm 'us-east-1c', with the hardware profile 'c1.medium', in firewall 'default':

curl -X POST -F "keyname=eftah" -F "image_id=ami-f51aff9c"
-F "realm_id=us-east-1c" -F "hwp_id=c1.medium" -F "firewalls1=default"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/instances?format=xml"

Delete a firewall called 'develgroup':

curl -X DELETE
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/firewalls/develgroup?format=xml

Create a blob called 'my_new_blob' within the bucket 'mybucket' from a local file with HTTP PUT specifying its content type and setting some metadata key:value pairs:

curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:mariosblob'
-H 'X-Deltacloud-Blobmeta-Version:2.1' --upload-file
"/home/marios/Desktop/somefile.html"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

Retrieve blob metadata for the blob called 'my_new_blob':

curl -iv -X HEAD
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

The '-iv' flags will ensure that cURL displays the request and response headers (blob metadata are reported in the response headers with an empty response body).

Working with cURL

Libdeltacloud Client (C library)

Libdeltacloud is a C/C++ library for accessing the Deltacloud API. It exports convenient structures and functions for manipulating cloud objects through the Deltacloud API.

Get the source code:
$ git clone git://git.fedorahosted.org/deltacloud/libdeltacloud.git

As of version 0.9, libdeltacloud is mostly API stable, but not ABI stable. The difference between the two is subtle but important. A library that is ABI (Application Binary Interface) stable means, that programs using the library don't need to be modified nor re-compiled when a new version of the library comes out. A library that is API (Application Programming Interface) stable means that programs using the library don't need to be modified, but may need to be re-compiled when a new version of the library comes out. The reason is that the sizes of structures in the library might change, which can lead to a misunderstanding between what the library and the program thinks the size of a structure is.

Due to the magic of libtool versioning, programs built against an older version of libdeltacloud will refuse to run against a newer version of libdeltacloud if the size of the structures has changed. If this happens, then the program must be recompiled against the newer libdeltacloud.

Libdeltacloud documentation
;T; I"É


Using API

Clients

Instead of dealing with HTTP interface you can use various clients to communicate with Deltacloud server.

The Deltacloud Ruby Client

You need to install Ruby client seperately to the Deltacloud API server. Assuming you already have Ruby and RubyGems setup, you can install the Deltacloud client by simply typing:

$ sudo gem install deltacloud-client

The Deltacloud client consists of a Ruby library (packaged as a Ruby gem) which you can use to interact with the Deltacloud server and control your cloud infrastructure across cloud providers.

To use the client, you must require deltacloud:

require 'deltacloud'

Connect to a Deltacloud provider:

require 'deltacloud'

api_url      = 'http://localhost:3001/api'
api_name     = 'mockuser'
api_password = 'mockpassword'

client = DeltaCloud.new( api_name, api_password, api_url )

# work with client here

In addition to creating a client, you can specify operations within a block included on the initialization.

DeltaCloud.new( api_name, api_password, api_url ) do |client|
  # work with client here
end

In case of a failure, any underlying HTTP transport exceptions will be thrown away and returned back to the caller.

To work with another driver, just switch the client:

client = DeltaCloud.new( api_name, api_password, api_url )

# switch the client to use EC2 driver
ec2 = client.with_config(:driver => :ec2)

# switch the client to use OpenStack driver
openstack = client.with_config(:driver => :openstack)
Work with the Ruby client

HTTP clients - cURL

Basically, you interact with the Deltacloud server via HTTP calls, so you can use any HTTP client to talk to Deltacloud using the Deltacloud REST API.

cURL is a popular command line tool available on most modern linux distributions. See the following examples to learn how to use cURL to interact with Deltacloud. There is an assumption that the Deltacloud server is running on locahost:3001 and was started with the 'ec2' driver (i.e., deltacloudd -i ec2 ).

Get a list of all images available in the back-end cloud:

curl  --user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/images?format=xml"

The cURL --user option is used to specify the username:password credentials for access to the back-end cloud provider (Amazon EC2 in this case).

Create a new instance from the image with id 'ami-f51aff9c', in realm 'us-east-1c', with the hardware profile 'c1.medium', in firewall 'default':

curl -X POST -F "keyname=eftah" -F "image_id=ami-f51aff9c"
-F "realm_id=us-east-1c" -F "hwp_id=c1.medium" -F "firewalls1=default"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/instances?format=xml"

Delete a firewall called 'develgroup':

curl -X DELETE
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/firewalls/develgroup?format=xml

Create a blob called 'my_new_blob' within the bucket 'mybucket' from a local file with HTTP PUT specifying its content type and setting some metadata key:value pairs:

curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:mariosblob'
-H 'X-Deltacloud-Blobmeta-Version:2.1' --upload-file
"/home/marios/Desktop/somefile.html"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

Retrieve blob metadata for the blob called 'my_new_blob':

curl -iv -X HEAD
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml

The '-iv' flags will ensure that cURL displays the request and response headers (blob metadata are reported in the response headers with an empty response body).

Working with cURL

Libdeltacloud Client (C library)

Libdeltacloud is a C/C++ library for accessing the Deltacloud API. It exports convenient structures and functions for manipulating cloud objects through the Deltacloud API.

Get the source code:
$ git clone git://git.fedorahosted.org/deltacloud/libdeltacloud.git

As of version 0.9, libdeltacloud is mostly API stable, but not ABI stable. The difference between the two is subtle but important. A library that is ABI (Application Binary Interface) stable means, that programs using the library don't need to be modified nor re-compiled when a new version of the library comes out. A library that is API (Application Programming Interface) stable means that programs using the library don't need to be modified, but may need to be re-compiled when a new version of the library comes out. The reason is that the sizes of structures in the library might change, which can lead to a misunderstanding between what the library and the program thinks the size of a structure is.

Due to the magic of libtool versioning, programs built against an older version of libdeltacloud will refuse to run against a newer version of libdeltacloud if the size of the structures has changed. If this happens, then the program must be recompiled against the newer libdeltacloud.

Libdeltacloud documentation
;T; @JI"/contact/;T{;{ ;I"²! Contact


Contact us!

We'd love to hear about your experiences with Deltacloud.

Please don't hesitate to get in touch if you have any questions about the project, if you've had any issues with installing or using Deltacloud or even just to tell us how great you think Deltacloud is!


Deltacloud Community Calls

We are trying to establish regular community calls - right now they are held weekly every Thursday - at @ 1700 CET (Prague, Brno, GMT+1) - which means 0800 PST (US West Coast, GMT-8) or 1100 EST (US East Coast, GMT-5). These calls are open to anyone that is interested in Deltacloud - please contact us if youā€™d like to join the next call.

For now weā€™re using an etherpad to keep track of the agenda. Feel free to add items there that youā€™d like to see addressed in future calls. Calls and agenda are announced on the dev@deltacloud.apache.org mailing list.


Past Calls:


Deltacloud Community Call #1

Working with Deltacloud API clients, Contributing patches, review process, etc


Deltacloud Community Call #2

Networking API discussion, Writing Deltacloud API tests


Deltacloud Community Call #3

Adding state to Deltacloud for the CIMI frontend - Datamapper


Deltacloud Community Call #4

Debugging deltacloud - how to chase a bug - common steps, debugging tools. Mailing list questions: i) ovirt and the User Level API, ii) Plans for CIMI back-end driver?


Deltacloud Community Call #5

How to file bug reports for Deltacloud - process, what to report, following up and CIMI resourceMetadata (implementation, why it is important?) - testing scenarios.


Deltacloud Community Call #7

The Deltacloud website - how it works, how to submit changes etc - Deltacloud exceptions and error handling introduction, how to catch provider errors and raise specific HTTP response codes.


Deltacloud Community Call #8

Deep dive into a Deltacloud API call, a look at the Deltacloud server gemspec - gems used as clients to cloud providers

;T; I"Į

Contact us!

We'd love to hear about your experiences with Deltacloud.

Please don't hesitate to get in touch if you have any questions about the project, if you've had any issues with installing or using Deltacloud or even just to tell us how great you think Deltacloud is!


Deltacloud Community Calls

We are trying to establish regular community calls - right now they are held weekly every Thursday - at @ 1700 CET (Prague, Brno, GMT+1) - which means 0800 PST (US West Coast, GMT-8) or 1100 EST (US East Coast, GMT-5). These calls are open to anyone that is interested in Deltacloud - please contact us if you'd like to join the next call. For now we're using an etherpad to keep track of the agenda. Feel free to add items there that you'd like to see addressed in future calls. Calls and agenda are announced on the dev@deltacloud.apache.org mailing list.

Past Calls:


Deltacloud Community Call #1 Working with Deltacloud API clients, Contributing patches, review process, etc
Deltacloud Community Call #2 Networking API discussion, Writing Deltacloud API tests
Deltacloud Community Call #3 Adding state to Deltacloud for the CIMI frontend - Datamapper
Deltacloud Community Call #4 Debugging deltacloud - how to chase a bug - common steps, debugging tools. Mailing list questions: i) ovirt and the User Level API, ii) Plans for CIMI back-end driver?
Deltacloud Community Call #5 How to file bug reports for Deltacloud - process, what to report, following up and CIMI resourceMetadata (implementation, why it is important?) - testing scenarios.
Deltacloud Community Call #7 The Deltacloud website - how it works, how to submit changes etc - Deltacloud exceptions and error handling introduction, how to catch provider errors and raise specific HTTP response codes.
Deltacloud Community Call #8 Deep dive into a Deltacloud API call, a look at the Deltacloud server gemspec - gems used as clients to cloud providers;T; I"9


Contact us!

We'd love to hear about your experiences with Deltacloud.

Please don't hesitate to get in touch if you have any questions about the project, if you've had any issues with installing or using Deltacloud or even just to tell us how great you think Deltacloud is!


Deltacloud Community Calls

We are trying to establish regular community calls - right now they are held weekly every Thursday - at @ 1700 CET (Prague, Brno, GMT+1) - which means 0800 PST (US West Coast, GMT-8) or 1100 EST (US East Coast, GMT-5). These calls are open to anyone that is interested in Deltacloud - please contact us if youā€™d like to join the next call.

For now weā€™re using an etherpad to keep track of the agenda. Feel free to add items there that youā€™d like to see addressed in future calls. Calls and agenda are announced on the dev@deltacloud.apache.org mailing list.


Past Calls:


Deltacloud Community Call #1

Working with Deltacloud API clients, Contributing patches, review process, etc


Deltacloud Community Call #2

Networking API discussion, Writing Deltacloud API tests


Deltacloud Community Call #3

Adding state to Deltacloud for the CIMI frontend - Datamapper


Deltacloud Community Call #4

Debugging deltacloud - how to chase a bug - common steps, debugging tools. Mailing list questions: i) ovirt and the User Level API, ii) Plans for CIMI back-end driver?


Deltacloud Community Call #5

How to file bug reports for Deltacloud - process, what to report, following up and CIMI resourceMetadata (implementation, why it is important?) - testing scenarios.


Deltacloud Community Call #7

The Deltacloud website - how it works, how to submit changes etc - Deltacloud exceptions and error handling introduction, how to catch provider errors and raise specific HTTP response codes.


Deltacloud Community Call #8

Deep dive into a Deltacloud API call, a look at the Deltacloud server gemspec - gems used as clients to cloud providers

;T; @PI"/curl-examples/;T{;{ ;I"‘A Working with cURL


Working with cURL as a command line client

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against Deltacloud. All the examples on this page assume the deltacloud server is running at localhost:3001:

  • Credentials are specified with --user "name:password"
  • Request headers are specified with -H "header: value" . For the "Accept" header Deltacloud offers a convenient way of specifying the desired response format; you can include the "?format=" parameter into the request URL rather than setting the Accept header
  • HTTP verbs are specified with -X VERB
  • The -i flag will show you the response headers and the -v flag will show you request and response headers as well as info about cURL activity:
    curl -v -X DELETE --user "username:password" -H "Accept: application/xml" http://localhost:3001/api/keys/mykey
          

Working with instances

Display a complete list of instances in xml format:

 curl --user "user:pass" http://localhost:3001/api/instances?format=xml 

Alternatively and if you prefer you can manually specify the Accept header:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/api/instances

Launch an instance. Note that in this example parameters are specified as application/x-www-form-urlencoded through the use of the -d flag:

 curl -X POST --user "user:pass" -d "image_id=ami-84db39ed&hwp_id=m1.small&keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Alternatively, you can use the -F flag to specify the parameters as multipart/form-data:

 curl -X POST --user "user:pass" -F "image_id=ami-84db39ed" -F "hwp_id=m1.small" -F "keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Launch an instance action - reboot:

 curl -X POST --user "user:pass" http://localhost:3001/api/instances/reboot?format=xml 

Run command on an instance (where available):

 curl -X POST --user "user:pass" -F "cmd=uname -a; ls -l" -F "private_key=`cat /location/of/ssh/keyfile`" http://localhost:3001/api/instances/i-d77cd0ac/run?format=xml 

Working with images

Get the details of a specific image:

 curl --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Create an image from an existing instance (where available):

curl -X POST --user "user:pass" -d "instance_id=i-d77cd0ac&name=mariostestimage" http://localhost:3001/api/images?format=xml 

Delete an image:

curl -X DELETE --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Working with hardware profiles

Get a list of all hardware profiles:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles?format=xml

Get the details of a specific hardware profile:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles/m2.4xlarge?format=xml 

Working with realms

Get a list of all realms:

 curl --user "user:pass" http://localhost:3001/api/realms?format=xml

Get the details of a specific realm:

 curl --user "user:pass" http://localhost:3001/api/realms/us-east-1a?format=xml 

Working with keys

Get a list of all keys:

 curl --user "user:pass" http://localhost:3001/api/keys?format=xml

Create a new key (where available):

 curl -X POST --user "user:pass" -d "name=mynewkey" http://localhost:3001/api/keys?format=xml 

Import an existing key (where available):

 curl -X POST --user "user:pass" -F "name=mynewkey" -F "public_key=`cat /location/of/public/key/id_rsa.pub`" http://localhost:3001/api/keys?format=xml 

Delete a key:

 curl -X DELETE --user "user:pass" http://localhost:3001/api/keys/mynewkey?format=xml 

Working with firewalls

Get a list of all firewalls:

 curl -v --user "user:pass" http://localhost:3001/api/firewalls?format=xml 

Create a new firewall:

 curl -v -X POST --user "user:pass" -d "name=my_new_firewall&description=a test firewall" http://localhost:3001/api/firewalls?format=xml

Create a new firewall rule - port 22 tcp, with one source firewall (group) and 2 IP addresses:

 curl -v -X POST --user "user:pass" -F "protocol=tcp" -F "port_from=22" -F "port_to=22" -F "group1=default" -F "group1owner=821108636519" -F "ip_address1=192.168.1.1/24" -F "ip_address2=65.128.31.27/32" http://localhost:3001/api/firewalls/my_new_firewall/rules

Delete a firewall rule:

 curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall/821108636519~tcp~22~22~@group,821108636519,default,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml 

Delete a firewall:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall?format=xml 

Working with addresses

Get a list of all addresses:

 curl -v --user "user:pass" http://localhost:3001/api/addresses?format=xml 

Create a new address:

 curl -v --user "user:pass" -X POST http://localhost:3001/api/addresses?format=xml

Associate an address with an instance:

 curl -v -X POST --user "user:pass" -d "instance_id=i-d77cd0ac" http://localhost:3001/api/addresses/23.23.176.127/associate?format=xml 

Disassociate an address from an instance:

curl -v -X POST --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127/disassociate?format=xml  

Delete an address:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127?format=xml  

Working with load balancers

Get a list of all load balancers:

 curl -v --user "user:pass" http://localhost:3001/api/load_balancers?format=xml 

Create a load balancer:

 curl -v -X POST --user "user:pass" -d "name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001" http://localhost:3001/api/load_balancers?format=xml 

Register an instance with a load balancer:

 curl -v -X POST --user "user:pass" -d "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/register?format=xml 

Unregister an instance from a load balancer:

 curl -v -X POST --user "user:pass" -d  "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/unregister?format=xml 

Delete a load balancer:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/load_balancers/web-traffic-balancer

Working with buckets

Get the details of a bucket:

curl -v --user "user:pass" http://localhost:3001/api/buckets/my_bucket?format=xml

Create a new bucket:

curl -v --user "user:pass" -X POST -d "name=shinynewbucket" http://localhost:3001/api/buckets?format=xml

Create a new blob, specifying a content-type and some metadata:

curl -v --user "user:pass" -H "content-type: image/jpg" -H 'X-Deltacloud-Blobmeta-Name:mariosblob' -H 'X-Deltacloud-Blobmeta-Author:me' --upload-file "/some/location/image.jpg" http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml 

Note that the --upload-file parameter above causes cURL to issue a HTTP PUT

Get blob metadata:

 curl -v --user "user:pass" -X HEAD http://localhost:3001/api/buckets/shinynewbucket/newblob

Note that blob metadata is returned in the HTTP response headers. So the use of the -v flag is important here or you will not see the metadata.

Update blob metadata:

curl -v --user "user:pass" -X POST -H 'X-Deltacloud-Blobmeta-Name:mariosblobV2' -H 'X-Deltacloud-Blobmeta-Version:v2.1.1'  http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a blob:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a bucket:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/bucket/shinynewbucket

Working with storage volumes

Get a list of all storage volumes:

curl -v --user "user:pass" http://localhost:3001/api/storage_volumes?format=xml

Create a new storage volume:

curl -v --user "user:pass" -X POST -d "capacity=10&realm_id=us-east-1c" http://localhost:3001/api/storage_volumes?format=xml

Attach a volume to a running instance:

curl -v --user "user:pass" -X POST -d "instance_id=i-b100b3d0&device=/dev/sdi" http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach?format=xml

Detach a volume (from whichever instance it is connected to):

curl -v --user "user:pass" -X POST  http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach?format=xml

Delete a storage volume:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_volumes/vol-0bc0de60?format=xml

Working with storage snapshots

Get details about a specific storage snapshot:

curl -v --user "user:pass" http://localhost:3001/api/storage_snapshots/snap-45b8d024?format=xml

Create a new storage snapshot:

curl -v --user "user:pass" -X POST -d "volume_id=vol-99fbe5f2" http://localhost:3001/api/storage_snapshots?format=xml

Delete a storage snapshot:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_snapshots/snap-dda6cebc?format=xml
;T; I"ļ+

Working with cURL as a command line client

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against Deltacloud. All the examples on this page assume the deltacloud server is running at localhost:3001:


Working with instances

Display a complete list of instances in xml format:

 curl --user "user:pass" http://localhost:3001/api/instances?format=xml 
Alternatively and if you prefer you can manually specify the Accept header:
 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/api/instances

Launch an instance. Note that in this example parameters are specified as application/x-www-form-urlencoded through the use of the -d flag:

 curl -X POST --user "user:pass" -d "image_id=ami-84db39ed&hwp_id=m1.small&keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Alternatively, you can use the -F flag to specify the parameters as multipart/form-data:

 curl -X POST --user "user:pass" -F "image_id=ami-84db39ed" -F "hwp_id=m1.small" -F "keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Launch an instance action - reboot:

 curl -X POST --user "user:pass" http://localhost:3001/api/instances/reboot?format=xml 

Run command on an instance (where available):

 curl -X POST --user "user:pass" -F "cmd=uname -a; ls -l" -F "private_key=`cat /location/of/ssh/keyfile`" http://localhost:3001/api/instances/i-d77cd0ac/run?format=xml 

Working with images

Get the details of a specific image:

 curl --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Create an image from an existing instance (where available):

curl -X POST --user "user:pass" -d "instance_id=i-d77cd0ac&name=mariostestimage" http://localhost:3001/api/images?format=xml 

Delete an image:

curl -X DELETE --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Working with hardware profiles

Get a list of all hardware profiles:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles?format=xml

Get the details of a specific hardware profile:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles/m2.4xlarge?format=xml 

Working with realms

Get a list of all realms:

 curl --user "user:pass" http://localhost:3001/api/realms?format=xml

Get the details of a specific realm:

 curl --user "user:pass" http://localhost:3001/api/realms/us-east-1a?format=xml 

Working with keys

Get a list of all keys:

 curl --user "user:pass" http://localhost:3001/api/keys?format=xml

Create a new key (where available):

 curl -X POST --user "user:pass" -d "name=mynewkey" http://localhost:3001/api/keys?format=xml 

Import an existing key (where available):

 curl -X POST --user "user:pass" -F "name=mynewkey" -F "public_key=`cat /location/of/public/key/id_rsa.pub`" http://localhost:3001/api/keys?format=xml 

Delete a key:

 curl -X DELETE --user "user:pass" http://localhost:3001/api/keys/mynewkey?format=xml 

Working with firewalls

Get a list of all firewalls:

 curl -v --user "user:pass" http://localhost:3001/api/firewalls?format=xml 

Create a new firewall:

 curl -v -X POST --user "user:pass" -d "name=my_new_firewall&description=a test firewall" http://localhost:3001/api/firewalls?format=xml

Create a new firewall rule - port 22 tcp, with one source firewall (group) and 2 IP addresses:

 curl -v -X POST --user "user:pass" -F "protocol=tcp" -F "port_from=22" -F "port_to=22" -F "group1=default" -F "group1owner=821108636519" -F "ip_address1=192.168.1.1/24" -F "ip_address2=65.128.31.27/32" http://localhost:3001/api/firewalls/my_new_firewall/rules

Delete a firewall rule:

 curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall/821108636519~tcp~22~22~@group,821108636519,default,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml 

Delete a firewall:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall?format=xml 

Working with addresses

Get a list of all addresses:

 curl -v --user "user:pass" http://localhost:3001/api/addresses?format=xml 

Create a new address:

 curl -v --user "user:pass" -X POST http://localhost:3001/api/addresses?format=xml

Associate an address with an instance:

 curl -v -X POST --user "user:pass" -d "instance_id=i-d77cd0ac" http://localhost:3001/api/addresses/23.23.176.127/associate?format=xml 

Disassociate an address from an instance:

curl -v -X POST --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127/disassociate?format=xml  

Delete an address:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127?format=xml  

Working with load balancers

Get a list of all load balancers:

 curl -v --user "user:pass" http://localhost:3001/api/load_balancers?format=xml 

Create a load balancer:

 curl -v -X POST --user "user:pass" -d "name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001" http://localhost:3001/api/load_balancers?format=xml 

Register an instance with a load balancer:

 curl -v -X POST --user "user:pass" -d "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/register?format=xml 

Unregister an instance from a load balancer:

 curl -v -X POST --user "user:pass" -d  "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/unregister?format=xml 

Delete a load balancer:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/load_balancers/web-traffic-balancer

Working with buckets

Get the details of a bucket:

curl -v --user "user:pass" http://localhost:3001/api/buckets/my_bucket?format=xml

Create a new bucket:

curl -v --user "user:pass" -X POST -d "name=shinynewbucket" http://localhost:3001/api/buckets?format=xml

Create a new blob, specifying a content-type and some metadata:

curl -v --user "user:pass" -H "content-type: image/jpg" -H 'X-Deltacloud-Blobmeta-Name:mariosblob' -H 'X-Deltacloud-Blobmeta-Author:me' --upload-file "/some/location/image.jpg" http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml 

Note that the --upload-file parameter above causes cURL to issue a HTTP PUT

Get blob metadata:

 curl -v --user "user:pass" -X HEAD http://localhost:3001/api/buckets/shinynewbucket/newblob

Note that blob metadata is returned in the HTTP response headers. So the use of the -v flag is important here or you will not see the metadata.

Update blob metadata:

curl -v --user "user:pass" -X POST -H 'X-Deltacloud-Blobmeta-Name:mariosblobV2' -H 'X-Deltacloud-Blobmeta-Version:v2.1.1'  http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a blob:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a bucket:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/bucket/shinynewbucket

Working with storage volumes

Get a list of all storage volumes:

curl -v --user "user:pass" http://localhost:3001/api/storage_volumes?format=xml

Create a new storage volume:

curl -v --user "user:pass" -X POST -d "capacity=10&realm_id=us-east-1c" http://localhost:3001/api/storage_volumes?format=xml

Attach a volume to a running instance:

curl -v --user "user:pass" -X POST -d "instance_id=i-b100b3d0&device=/dev/sdi" http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach?format=xml

Detach a volume (from whichever instance it is connected to):

curl -v --user "user:pass" -X POST  http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach?format=xml

Delete a storage volume:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_volumes/vol-0bc0de60?format=xml

Working with storage snapshots

Get details about a specific storage snapshot:

curl -v --user "user:pass" http://localhost:3001/api/storage_snapshots/snap-45b8d024?format=xml

Create a new storage snapshot:

curl -v --user "user:pass" -X POST -d "volume_id=vol-99fbe5f2" http://localhost:3001/api/storage_snapshots?format=xml

Delete a storage snapshot:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_snapshots/snap-dda6cebc?format=xml
;T; I",


Working with cURL as a command line client

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against Deltacloud. All the examples on this page assume the deltacloud server is running at localhost:3001:


Working with instances

Display a complete list of instances in xml format:

 curl --user "user:pass" http://localhost:3001/api/instances?format=xml 

Alternatively and if you prefer you can manually specify the Accept header:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/api/instances

Launch an instance. Note that in this example parameters are specified as application/x-www-form-urlencoded through the use of the -d flag:

 curl -X POST --user "user:pass" -d "image_id=ami-84db39ed&hwp_id=m1.small&keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Alternatively, you can use the -F flag to specify the parameters as multipart/form-data:

 curl -X POST --user "user:pass" -F "image_id=ami-84db39ed" -F "hwp_id=m1.small" -F "keyname=marios_key"  http://localhost:3001/api/instances?format=xml 

Launch an instance action - reboot:

 curl -X POST --user "user:pass" http://localhost:3001/api/instances/reboot?format=xml 

Run command on an instance (where available):

 curl -X POST --user "user:pass" -F "cmd=uname -a; ls -l" -F "private_key=`cat /location/of/ssh/keyfile`" http://localhost:3001/api/instances/i-d77cd0ac/run?format=xml 

Working with images

Get the details of a specific image:

 curl --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Create an image from an existing instance (where available):

curl -X POST --user "user:pass" -d "instance_id=i-d77cd0ac&name=mariostestimage" http://localhost:3001/api/images?format=xml 

Delete an image:

curl -X DELETE --user "user:pass" http://localhost:3001/api/images/ami-3dc06a54?format=xml 

Working with hardware profiles

Get a list of all hardware profiles:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles?format=xml

Get the details of a specific hardware profile:

 curl --user "user:pass" http://localhost:3001/api/hardware_profiles/m2.4xlarge?format=xml 

Working with realms

Get a list of all realms:

 curl --user "user:pass" http://localhost:3001/api/realms?format=xml

Get the details of a specific realm:

 curl --user "user:pass" http://localhost:3001/api/realms/us-east-1a?format=xml 

Working with keys

Get a list of all keys:

 curl --user "user:pass" http://localhost:3001/api/keys?format=xml

Create a new key (where available):

 curl -X POST --user "user:pass" -d "name=mynewkey" http://localhost:3001/api/keys?format=xml 

Import an existing key (where available):

 curl -X POST --user "user:pass" -F "name=mynewkey" -F "public_key=`cat /location/of/public/key/id_rsa.pub`" http://localhost:3001/api/keys?format=xml 

Delete a key:

 curl -X DELETE --user "user:pass" http://localhost:3001/api/keys/mynewkey?format=xml 

Working with firewalls

Get a list of all firewalls:

 curl -v --user "user:pass" http://localhost:3001/api/firewalls?format=xml 

Create a new firewall:

 curl -v -X POST --user "user:pass" -d "name=my_new_firewall&description=a test firewall" http://localhost:3001/api/firewalls?format=xml

Create a new firewall rule - port 22 tcp, with one source firewall (group) and 2 IP addresses:

 curl -v -X POST --user "user:pass" -F "protocol=tcp" -F "port_from=22" -F "port_to=22" -F "group1=default" -F "group1owner=821108636519" -F "ip_address1=192.168.1.1/24" -F "ip_address2=65.128.31.27/32" http://localhost:3001/api/firewalls/my_new_firewall/rules

Delete a firewall rule:

 curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall/821108636519~tcp~22~22~@group,821108636519,default,@address,ipv4,192.168.1.1,24,@address,ipv4,65.128.31.27,32?format=xml 

Delete a firewall:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/firewalls/marios_test_firewall?format=xml 

Working with addresses

Get a list of all addresses:

 curl -v --user "user:pass" http://localhost:3001/api/addresses?format=xml 

Create a new address:

 curl -v --user "user:pass" -X POST http://localhost:3001/api/addresses?format=xml

Associate an address with an instance:

 curl -v -X POST --user "user:pass" -d "instance_id=i-d77cd0ac" http://localhost:3001/api/addresses/23.23.176.127/associate?format=xml 

Disassociate an address from an instance:

curl -v -X POST --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127/disassociate?format=xml  

Delete an address:

curl -v -X DELETE --user "user:pass" http://localhost:3001/api/addresses/23.23.176.127?format=xml  

Working with load balancers

Get a list of all load balancers:

 curl -v --user "user:pass" http://localhost:3001/api/load_balancers?format=xml 

Create a load balancer:

 curl -v -X POST --user "user:pass" -d "name=webtraffic-balancer&realm_id=us-east-1c&listener_protocol=HTTP&
listener_balancer_port=80&listener_instance_port=3001" http://localhost:3001/api/load_balancers?format=xml 

Register an instance with a load balancer:

 curl -v -X POST --user "user:pass" -d "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/register?format=xml 

Unregister an instance from a load balancer:

 curl -v -X POST --user "user:pass" -d  "instance_id=i-4f06b52e" http://localhost:3001/api/load_balancers/webtraffic-balancer/unregister?format=xml 

Delete a load balancer:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/load_balancers/web-traffic-balancer

Working with buckets

Get the details of a bucket:

curl -v --user "user:pass" http://localhost:3001/api/buckets/my_bucket?format=xml

Create a new bucket:

curl -v --user "user:pass" -X POST -d "name=shinynewbucket" http://localhost:3001/api/buckets?format=xml

Create a new blob, specifying a content-type and some metadata:

curl -v --user "user:pass" -H "content-type: image/jpg" -H 'X-Deltacloud-Blobmeta-Name:mariosblob' -H 'X-Deltacloud-Blobmeta-Author:me' --upload-file "/some/location/image.jpg" http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml 

Note that the --upload-file parameter above causes cURL to issue a HTTP PUT

Get blob metadata:

 curl -v --user "user:pass" -X HEAD http://localhost:3001/api/buckets/shinynewbucket/newblob

Note that blob metadata is returned in the HTTP response headers. So the use of the -v flag is important here or you will not see the metadata.

Update blob metadata:

curl -v --user "user:pass" -X POST -H 'X-Deltacloud-Blobmeta-Name:mariosblobV2' -H 'X-Deltacloud-Blobmeta-Version:v2.1.1'  http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a blob:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/buckets/shinynewbucket/newblob?format=xml

Delete a bucket:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/bucket/shinynewbucket

Working with storage volumes

Get a list of all storage volumes:

curl -v --user "user:pass" http://localhost:3001/api/storage_volumes?format=xml

Create a new storage volume:

curl -v --user "user:pass" -X POST -d "capacity=10&realm_id=us-east-1c" http://localhost:3001/api/storage_volumes?format=xml

Attach a volume to a running instance:

curl -v --user "user:pass" -X POST -d "instance_id=i-b100b3d0&device=/dev/sdi" http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach?format=xml

Detach a volume (from whichever instance it is connected to):

curl -v --user "user:pass" -X POST  http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach?format=xml

Delete a storage volume:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_volumes/vol-0bc0de60?format=xml

Working with storage snapshots

Get details about a specific storage snapshot:

curl -v --user "user:pass" http://localhost:3001/api/storage_snapshots/snap-45b8d024?format=xml

Create a new storage snapshot:

curl -v --user "user:pass" -X POST -d "volume_id=vol-99fbe5f2" http://localhost:3001/api/storage_snapshots?format=xml

Delete a storage snapshot:

curl -v --user "user:pass" -X DELETE http://localhost:3001/api/storage_snapshots/snap-dda6cebc?format=xml
;T; @VI"/send-patch/;T{;{ ;I"×/ Send a Patch


Formatting and sending patches

The Deltacloud community works with Git. The process of contributing to the project we prefer contains these steps: local_branch ā†’ patch ā†’ review ā†’ accept ā†’ commit process for contributing to the project. This is how the typical workflow used by the core developers looks like:

  1. Set the following settings inside the git configuration file. The config file is located in the root of the Deltacloud project in a hidden .git directory. Open the config file with your preferred editor:

    $ vim deltacloud/.git/config
    

    Add the following information to the configuration file and replace the relevant values with your own ones:

    [sendemail]
    signedoffbycc = no
    chainreplyto = no
    smtpserver = your_smpt.server.address
    thread = yes
    from = your_email_address
    suppresscc = all
    to = dev@deltacloud.apache.org
    
    [core]
    whitespace = trailing-space,space-before-tab
    
    [apply]
    whitespace = error-all
    
  2. Get the latest HEAD of the Deltacloud git repo. You will gain one local branch called master:

    $ git branch
    * master
    
  3. Fetch the latest changes from the git repo:

    $ git pull
    
  4. Create a new local branch for your edits and give it a name:

    $ git checkout -b my_new_branch
    
  5. Make your changes and then check, what you've edited:

    $ git status
    
  6. Commit these changes to your local branch:

    $ git commit -a
    

    This will open an editor (e.g. vi). Enter a commit message. The message should be short and succinct and individual lines shouldn't be longer than 80 characters. See the recent commits with their commit messages to find an inspiration:

    $ git log
    

    When you commit your changes to your local branch, the local branch will be different from your local master branch. Other developers may have already committed their changes to the remote master branch in the Apache git repo in the meantime. Thus, you need to fetch any new changes and merge them into your local master.

  7. Change to master and fetch upstream changes (it there are any):

    $ git checkout master
    $ git pull
    

    Your local master is now up-to-date with the remote master in the git repo.

  8. Rebase the local master onto the branch containing your changes:

    $ git rebase master my_new_branch
    

    This allows you to make patches against master and send them to the Deltacloud mailing list.

    $ git format-patch -o /path/to/where/you/keep/patches/ master
    $ git send-email --compose --subject 'some subject'
      --thread /path/to/where/you/keep/patches/*
    

    The other members of the community will review your patches. The patch has to receive at least one ACK and no NACK to be approved. Then the patch will be committed by one of the Deltacloud developers with commit rights to the Apache repo. If noone is responding to your patch sent to mailing list, feel free to remind yourself after few days.

You can also contribute to the project by reviewing patches sent by other contributors:

  1. Make a new branch where you will apply the patches and test:

    $ git checkout -b jsmith_patches
    
  2. Save the patches to a known location and make sure you're on the right branch . Then apply.

    $ git checkout jsmith_patches
    
    $ cat /path/to/patches/0001-name-of-patch.txt | git apply
    
    or
    $ git am /path/to/patches/0001-name-of-patch.eml
    

    You can use git am ("apply mail") to apply patches in mail format, or git apply for plain-text patches. If you use git apply, you will only apply the patches, whereas git am will also commit the patches to the local branch (preserving the author's commit messages). However, the difference between git am and git apply is insignificant for the purpose of reviewing patches. It depends on whether you want to save the patches as plain-text or in .mbox email format.

  3. If you think the patches are working correctly, send an ACK to the Deltacloud mailing list. Similarly, if you think the patches could cause a problem, send a NACK and explain the issue you have found.

Test the patch Back

;T; I"a

Formatting and sending patches

The Deltacloud community works with Git. The process of contributing to the project we prefer contains these steps: local_branch ā†’ patch ā†’ review ā†’ accept ā†’ commit process for contributing to the project. This is how the typical workflow used by the core developers looks like:

  1. Set the following settings inside the git configuration file. The config file is located in the root of the Deltacloud project in a hidden .git directory. Open the config file with your preferred editor:

    $ vim deltacloud/.git/config
    

    Add the following information to the configuration file and replace the relevant values with your own ones:

    [sendemail]
    signedoffbycc = no
    chainreplyto = no
    smtpserver = your_smpt.server.address
    thread = yes
    from = your_email_address
    suppresscc = all
    to = dev@deltacloud.apache.org
    
    [core]
    whitespace = trailing-space,space-before-tab
    
    [apply]
    whitespace = error-all
    
  2. Get the latest HEAD of the Deltacloud git repo. You will gain one local branch called master:

    $ git branch
    * master
    
  3. Fetch the latest changes from the git repo:

    $ git pull
    
  4. Create a new local branch for your edits and give it a name:

    $ git checkout -b my_new_branch
    
  5. Make your changes and then check, what you've edited:

    $ git status
    
  6. Commit these changes to your local branch:

    $ git commit -a
    

    This will open an editor (e.g. vi). Enter a commit message. The message should be short and succinct and individual lines shouldn't be longer than 80 characters. See the recent commits with their commit messages to find an inspiration:

    $ git log
    

    When you commit your changes to your local branch, the local branch will be different from your local master branch. Other developers may have already committed their changes to the remote master branch in the Apache git repo in the meantime. Thus, you need to fetch any new changes and merge them into your local master.

  7. Change to master and fetch upstream changes (it there are any):

    $ git checkout master
    $ git pull
    

    Your local master is now up-to-date with the remote master in the git repo.

  8. Rebase the local master onto the branch containing your changes:

    $ git rebase master my_new_branch
    

    This allows you to make patches against master and send them to the Deltacloud mailing list.

    $ git format-patch -o /path/to/where/you/keep/patches/ master
    $ git send-email --compose --subject 'some subject'
      --thread /path/to/where/you/keep/patches/*
    

    The other members of the community will review your patches. The patch has to receive at least one ACK and no NACK to be approved. Then the patch will be committed by one of the Deltacloud developers with commit rights to the Apache repo. If noone is responding to your patch sent to mailing list, feel free to remind yourself after few days.

You can also contribute to the project by reviewing patches sent by other contributors:

  1. Make a new branch where you will apply the patches and test:

    $ git checkout -b jsmith_patches
    
  2. Save the patches to a known location and make sure you're on the right branch . Then apply.

    $ git checkout jsmith_patches
    
    $ cat /path/to/patches/0001-name-of-patch.txt | git apply
    
    or
    $ git am /path/to/patches/0001-name-of-patch.eml
    

    You can use git am ("apply mail") to apply patches in mail format, or git apply for plain-text patches. If you use git apply, you will only apply the patches, whereas git am will also commit the patches to the local branch (preserving the author's commit messages). However, the difference between git am and git apply is insignificant for the purpose of reviewing patches. It depends on whether you want to save the patches as plain-text or in .mbox email format.

  3. If you think the patches are working correctly, send an ACK to the Deltacloud mailing list. Similarly, if you think the patches could cause a problem, send a NACK and explain the issue you have found.

Test the patch Back

;T; I"Y


Formatting and sending patches

The Deltacloud community works with Git. The process of contributing to the project we prefer contains these steps: local_branch ā†’ patch ā†’ review ā†’ accept ā†’ commit process for contributing to the project. This is how the typical workflow used by the core developers looks like:

  1. Set the following settings inside the git configuration file. The config file is located in the root of the Deltacloud project in a hidden .git directory. Open the config file with your preferred editor:

    $ vim deltacloud/.git/config
    

    Add the following information to the configuration file and replace the relevant values with your own ones:

    [sendemail]
    signedoffbycc = no
    chainreplyto = no
    smtpserver = your_smpt.server.address
    thread = yes
    from = your_email_address
    suppresscc = all
    to = dev@deltacloud.apache.org
    
    [core]
    whitespace = trailing-space,space-before-tab
    
    [apply]
    whitespace = error-all
    
  2. Get the latest HEAD of the Deltacloud git repo. You will gain one local branch called master:

    $ git branch
    * master
    
  3. Fetch the latest changes from the git repo:

    $ git pull
    
  4. Create a new local branch for your edits and give it a name:

    $ git checkout -b my_new_branch
    
  5. Make your changes and then check, what you've edited:

    $ git status
    
  6. Commit these changes to your local branch:

    $ git commit -a
    

    This will open an editor (e.g. vi). Enter a commit message. The message should be short and succinct and individual lines shouldn't be longer than 80 characters. See the recent commits with their commit messages to find an inspiration:

    $ git log
    

    When you commit your changes to your local branch, the local branch will be different from your local master branch. Other developers may have already committed their changes to the remote master branch in the Apache git repo in the meantime. Thus, you need to fetch any new changes and merge them into your local master.

  7. Change to master and fetch upstream changes (it there are any):

    $ git checkout master
    $ git pull
    

    Your local master is now up-to-date with the remote master in the git repo.

  8. Rebase the local master onto the branch containing your changes:

    $ git rebase master my_new_branch
    

    This allows you to make patches against master and send them to the Deltacloud mailing list.

    $ git format-patch -o /path/to/where/you/keep/patches/ master
    $ git send-email --compose --subject 'some subject'
      --thread /path/to/where/you/keep/patches/*
    

    The other members of the community will review your patches. The patch has to receive at least one ACK and no NACK to be approved. Then the patch will be committed by one of the Deltacloud developers with commit rights to the Apache repo. If noone is responding to your patch sent to mailing list, feel free to remind yourself after few days.

You can also contribute to the project by reviewing patches sent by other contributors:

  1. Make a new branch where you will apply the patches and test:

    $ git checkout -b jsmith_patches
    
  2. Save the patches to a known location and make sure you're on the right branch . Then apply.

    $ git checkout jsmith_patches
    
    $ cat /path/to/patches/0001-name-of-patch.txt | git apply
    
    or
    $ git am /path/to/patches/0001-name-of-patch.eml
    

    You can use git am ("apply mail") to apply patches in mail format, or git apply for plain-text patches. If you use git apply, you will only apply the patches, whereas git am will also commit the patches to the local branch (preserving the author's commit messages). However, the difference between git am and git apply is insignificant for the purpose of reviewing patches. It depends on whether you want to save the patches as plain-text or in .mbox email format.

  3. If you think the patches are working correctly, send an ACK to the Deltacloud mailing list. Similarly, if you think the patches could cause a problem, send a NACK and explain the issue you have found.

Test the patch Back

;T; @\I"/command-tools/;T{;{ ;I"Œ# Command Line Tools


deltacloudc is being deprecated

The deltacloudc command line tool is being deprecated. For now the code making up deltacloudc has been moved to the /deltacloud/clients/console directory but will ultimately be removed from the repo. If the command line client is important to you then please let us know. A new command line client may be put onto the roadmap if there is demand for one.

The deltacloud core developers use (almost exclusively) cURL as a command line client for working with a deltacloud server. You can find more information on working with cURL against deltacloud here.



/deprecated:




Using Deltacloud command tool

Installing the Deltacloud Ruby client also gives you the deltacloudc command line tool. This executable uses the Deltacloud client library to speak to the Deltacloud server through the Deltacloud REST API. This means that you can control your cloud infrastructure from the command line. The general usage pattern for deltacloudc is:

$ deltacloudc collection operation [options]
Collection
refers to the Deltacloud object collections, such as Instances, Images, Buckets, Realms etc., as described in a greater detail in the Deltacloud REST API documentation.
Operation
is collection dependant. All collections respond to 'index' and 'show' operations (retrieve details on all objects in a given collection or on a specific object). Some collections respond to 'create' and 'destroy' operations. The collection of instances (realized virtual servers) responds to operations for managing the instance lifecycle, such as 'stop' or 'reboot'.
Options
are listed by invoking deltacloudc -h. The important option is -u, which specifies the API_URL, where the Deltacloud server is running. The API_URL takes the form of http://[user]:[password]@[api_url]:[port]/[api]. Alternatively, you can set the API_URL environment variable (e.g., export API_URL=http://mockuser:mockpassword@localhost:3001/api). If your username or your password contains special characters, it's necessary to use options -U and -P in addition to the option -u. Check the list of credentials you need for each back-end cloud provider.

The following examples assume that the Deltacloud server is running on your local machine port 3001 (the deltacloudd server daemon defaults to 'localhost:3001') and that it was started with the 'mock' provider (i.e. deltacloudd -i mock ).

List all collections available in the current driver:

$ deltacloudc -l -u http://mockuser:mockpassword@localhost:3001/api

Get a list of all images:

$ deltacloudc images index -u http://mockuser:mockpassword@localhost:3001/api

List all operations for the buckets collection:

$ deltacloudc buckets -l -u http://mockuser:mockpassword@localhost:3001/api

Create a new blob in the bucket called 'bucket1':

$ deltacloudc blob create -i 'my_new_blob' -b 'bucket1' -f /home/marios/file.txt
;T; I"č

deltacloudc is being deprecated

The deltacloudc command line tool is being deprecated. For now the code making up deltacloudc has been moved to the /deltacloud/clients/console directory but will ultimately be removed from the repo. If the command line client is important to you then please let us know. A new command line client may be put onto the roadmap if there is demand for one. The deltacloud core developers use (almost exclusively) cURL as a command line client for working with a deltacloud server. You can find more information on working with cURL against deltacloud here.

/deprecated:




Using Deltacloud command tool

Installing the Deltacloud Ruby client also gives you the deltacloudc command line tool. This executable uses the Deltacloud client library to speak to the Deltacloud server through the Deltacloud REST API. This means that you can control your cloud infrastructure from the command line. The general usage pattern for deltacloudc is:

$ deltacloudc collection operation [options]
Collection
refers to the Deltacloud object collections, such as Instances, Images, Buckets, Realms etc., as described in a greater detail in the Deltacloud REST API documentation.
Operation
is collection dependant. All collections respond to 'index' and 'show' operations (retrieve details on all objects in a given collection or on a specific object). Some collections respond to 'create' and 'destroy' operations. The collection of instances (realized virtual servers) responds to operations for managing the instance lifecycle, such as 'stop' or 'reboot'.
Options
are listed by invoking deltacloudc -h. The important option is -u, which specifies the API_URL, where the Deltacloud server is running. The API_URL takes the form of http://[user]:[password]@[api_url]:[port]/[api]. Alternatively, you can set the API_URL environment variable (e.g., export API_URL=http://mockuser:mockpassword@localhost:3001/api). If your username or your password contains special characters, it's necessary to use options -U and -P in addition to the option -u. Check the list of credentials you need for each back-end cloud provider.

The following examples assume that the Deltacloud server is running on your local machine port 3001 (the deltacloudd server daemon defaults to 'localhost:3001') and that it was started with the 'mock' provider (i.e. deltacloudd -i mock ).

List all collections available in the current driver:

$ deltacloudc -l -u http://mockuser:mockpassword@localhost:3001/api

Get a list of all images:

$ deltacloudc images index -u http://mockuser:mockpassword@localhost:3001/api

List all operations for the buckets collection:

$ deltacloudc buckets -l -u http://mockuser:mockpassword@localhost:3001/api

Create a new blob in the bucket called 'bucket1':

$ deltacloudc blob create -i 'my_new_blob' -b 'bucket1' -f /home/marios/file.txt
;T; I"


deltacloudc is being deprecated

The deltacloudc command line tool is being deprecated. For now the code making up deltacloudc has been moved to the /deltacloud/clients/console directory but will ultimately be removed from the repo. If the command line client is important to you then please let us know. A new command line client may be put onto the roadmap if there is demand for one.

The deltacloud core developers use (almost exclusively) cURL as a command line client for working with a deltacloud server. You can find more information on working with cURL against deltacloud here.



/deprecated:




Using Deltacloud command tool

Installing the Deltacloud Ruby client also gives you the deltacloudc command line tool. This executable uses the Deltacloud client library to speak to the Deltacloud server through the Deltacloud REST API. This means that you can control your cloud infrastructure from the command line. The general usage pattern for deltacloudc is:

$ deltacloudc collection operation [options]
Collection
refers to the Deltacloud object collections, such as Instances, Images, Buckets, Realms etc., as described in a greater detail in the Deltacloud REST API documentation.
Operation
is collection dependant. All collections respond to 'index' and 'show' operations (retrieve details on all objects in a given collection or on a specific object). Some collections respond to 'create' and 'destroy' operations. The collection of instances (realized virtual servers) responds to operations for managing the instance lifecycle, such as 'stop' or 'reboot'.
Options
are listed by invoking deltacloudc -h. The important option is -u, which specifies the API_URL, where the Deltacloud server is running. The API_URL takes the form of http://[user]:[password]@[api_url]:[port]/[api]. Alternatively, you can set the API_URL environment variable (e.g., export API_URL=http://mockuser:mockpassword@localhost:3001/api). If your username or your password contains special characters, it's necessary to use options -U and -P in addition to the option -u. Check the list of credentials you need for each back-end cloud provider.

The following examples assume that the Deltacloud server is running on your local machine port 3001 (the deltacloudd server daemon defaults to 'localhost:3001') and that it was started with the 'mock' provider (i.e. deltacloudd -i mock ).

List all collections available in the current driver:

$ deltacloudc -l -u http://mockuser:mockpassword@localhost:3001/api

Get a list of all images:

$ deltacloudc images index -u http://mockuser:mockpassword@localhost:3001/api

List all operations for the buckets collection:

$ deltacloudc buckets -l -u http://mockuser:mockpassword@localhost:3001/api

Create a new blob in the bucket called 'bucket1':

$ deltacloudc blob create -i 'my_new_blob' -b 'bucket1' -f /home/marios/file.txt
;T; @bI"/use-the-api/;T{;{ ;I"} Use the API
;T; I";F; I";F; @hI"/clients/;T{;{ ;I"y Clients
;T; I";F; I";F; @nI"/supported-providers/;T{;{ ;I"#D Supported Providers


Driver functionality and Credentials

Compute Driver Functionality

Ā  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
FGCP yes yes yes no yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes


Storage Driver Functionality

Ā  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes


Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
Aruba cloud.it aruba Username Password
;T; I"0

Driver functionality and Credentials

Compute Driver Functionality

  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
FGCP yes yes yes no yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes

Storage Driver Functionality

  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes

Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
Aruba cloud.it aruba Username Password
;T; I"ž.


Driver functionality and Credentials

Compute Driver Functionality

Ā  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
FGCP yes yes yes no yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes


Storage Driver Functionality

Ā  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes


Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
Aruba cloud.it aruba Username Password
;T; @tI"/compute-resources/;T{;{ ;I"•( Compute resources


Compute Resources

The compute resources are: instances, instance states, images, realms, hardware profiles, firewalls, load balancers, addresses and keys.

Realms

A realm represents a boundary containing resources, such as a data center. The exact definition of a realm is given by the cloud provider. In some cases, a realm may represent different datacenters, different continents or different pools of resources within a single datacenter. A cloud provider may insist that all the resources exist within a single realm in order to cooperate. For instance, storage volumes may only be allowed to be mounted to instances within the same realm. Generally speaking, going from one realm to another within the same cloud may change many aspects of the cloud, such as SLAā€™s, pricing terms, etc.

Get a list of all realms

To list all realms use call GET /api/realms. You can filter the list by adding a request parameter architecture to the realms that support a specific architecture, such as i386. The example below shows the retrieval of all realms for the AWS EC2 driver, which correspond to EC2 "availability zones":

Example request:

GET /api/realms?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 639
<?xml version='1.0' encoding='utf-8' ?>
<realms>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'>
    <name>us-east-1a</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1b' id='us-east-1b'>
    <name>us-east-1b</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'>
    <name>us-east-1c</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'>
    <name>us-east-1d</name>
    <state>available</state>
  </realm>
</realms>

Get the details of a realm

To provide the details of a realm use call GET /api/realms/:id. The server responds with a name, a state and a limit applicable to the current requester. The name is an arbitrary label with no specific meaning in the API. The state can be either AVAILABLE or UNAVAILABLE.

The example below shows the realm for the Rackspace driver. Since Rackspace does not currently have a notion of realms, the Deltacloud Rackspace driver provides a single realm called 'US', signifying that all compute resources for that cloud provider are hosted in the United States:

Example request:

GET /api/realms/us?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<realm href='http://localhost:3001/api/realms/us' id='us'>
    <name>United States</name>
    <state>AVAILABLE</state>
    <limit></limit>
</realm>

Hardware profiles


;T; I"

Compute Resources

The compute resources are: instances, instance states, images, realms, hardware profiles, firewalls, load balancers, addresses and keys.

Realms

A realm represents a boundary containing resources, such as a data center. The exact definition of a realm is given by the cloud provider. In some cases, a realm may represent different datacenters, different continents or different pools of resources within a single datacenter. A cloud provider may insist that all the resources exist within a single realm in order to cooperate. For instance, storage volumes may only be allowed to be mounted to instances within the same realm. Generally speaking, going from one realm to another within the same cloud may change many aspects of the cloud, such as SLAā€™s, pricing terms, etc.

Get a list of all realms

To list all realms use call GET /api/realms. You can filter the list by adding a request parameter architecture to the realms that support a specific architecture, such as i386. The example below shows the retrieval of all realms for the AWS EC2 driver, which correspond to EC2 "availability zones":

Example request:

GET /api/realms?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 639
<?xml version='1.0' encoding='utf-8' ?>
<realms>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'>
    <name>us-east-1a</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1b' id='us-east-1b'>
    <name>us-east-1b</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'>
    <name>us-east-1c</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'>
    <name>us-east-1d</name>
    <state>available</state>
  </realm>
</realms>

Get the details of a realm

To provide the details of a realm use call GET /api/realms/:id. The server responds with a name, a state and a limit applicable to the current requester. The name is an arbitrary label with no specific meaning in the API. The state can be either AVAILABLE or UNAVAILABLE.

The example below shows the realm for the Rackspace driver. Since Rackspace does not currently have a notion of realms, the Deltacloud Rackspace driver provides a single realm called 'US', signifying that all compute resources for that cloud provider are hosted in the United States:

Example request:

GET /api/realms/us?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<realm href='http://localhost:3001/api/realms/us' id='us'>
    <name>United States</name>
    <state>AVAILABLE</state>
    <limit></limit>
</realm>
Hardware profiles
;T; I"


Compute Resources

The compute resources are: instances, instance states, images, realms, hardware profiles, firewalls, load balancers, addresses and keys.

Realms

A realm represents a boundary containing resources, such as a data center. The exact definition of a realm is given by the cloud provider. In some cases, a realm may represent different datacenters, different continents or different pools of resources within a single datacenter. A cloud provider may insist that all the resources exist within a single realm in order to cooperate. For instance, storage volumes may only be allowed to be mounted to instances within the same realm. Generally speaking, going from one realm to another within the same cloud may change many aspects of the cloud, such as SLAā€™s, pricing terms, etc.

Get a list of all realms

To list all realms use call GET /api/realms. You can filter the list by adding a request parameter architecture to the realms that support a specific architecture, such as i386. The example below shows the retrieval of all realms for the AWS EC2 driver, which correspond to EC2 "availability zones":

Example request:

GET /api/realms?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 639
<?xml version='1.0' encoding='utf-8' ?>
<realms>
  <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'>
    <name>us-east-1a</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1b' id='us-east-1b'>
    <name>us-east-1b</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'>
    <name>us-east-1c</name>
    <state>available</state>
  </realm>
  <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'>
    <name>us-east-1d</name>
    <state>available</state>
  </realm>
</realms>

Get the details of a realm

To provide the details of a realm use call GET /api/realms/:id. The server responds with a name, a state and a limit applicable to the current requester. The name is an arbitrary label with no specific meaning in the API. The state can be either AVAILABLE or UNAVAILABLE.

The example below shows the realm for the Rackspace driver. Since Rackspace does not currently have a notion of realms, the Deltacloud Rackspace driver provides a single realm called 'US', signifying that all compute resources for that cloud provider are hosted in the United States:

Example request:

GET /api/realms/us?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<realm href='http://localhost:3001/api/realms/us' id='us'>
    <name>United States</name>
    <state>AVAILABLE</state>
    <limit></limit>
</realm>

Hardware profiles


;T; @zI"/api-docs/;T{;{ ;I"ƒ API Documentation
;T; I";F; I";F; @{I"/write-new-driver/;T{;{ ;I"ī8 Write New Provider Driver


Write a provider driver

The deltacloud drivers are stored in deltacloud/server/lib/deltacloud/drivers.

  1. To add a driver for a hypotetical Foo cloud, add a directory into /drivers/ and then add a file for a driver itself:

    deltacloud/server/lib/deltacloud/drivers/foo/foo_driver.rb

    You need to define a class Deltacloud::Drivers::Foo::FooDriver to this file. The class has to be a subclass of the Deltacloud::BaseDriver.

  2. Set up which collections the provider for you are writing the driver supports - e.g. images, instances, keys, buckets/blobs (storage), etc.:

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ] - [ :storage_snapshots, :storage_volumes ]
    end
    

    This declares that the driver supports the DEFAULT_COLLECTIONS (defined in deltacloud/server/lib/drivers.rb) except storage_snapshots and storage_volumes and also supports the buckets collection. A storage only cloud provider driver would support only the buckets collection.

  3. Define the methods for each collection that your driver supports. The methods, as well as the routes to them, are defined in deltacloud/server/lib/deltacloud/server.rb. You can look at the existing drivers to get the idea of how to implement a specific method.

  4. Consider how the driver will be communicating with the cloud provider. Many of the existing drivers use external ruby gems for this purpose. For example, the ec2 driver uses the aws gem, the rackspace driver uses the cloudfiles and cloudservers gems. However, other drivers implement their own clients to communicate with the cloud provider, such as the IBM SmartCloud driver and the Gogrid driver. This also explains why some drivers in the /drivers directory contain only the provider _driver.rb file, while the others also define a provider_client.rb file. It is entirely up to you, whether you write your own client or use an existing one.

Thus, your driver for the cloud provider Foo may look like:

require 'deltacloud/base_driver'
require 'foo_lib' # a library for talking to the foo cloud

module Deltacloud
  module Drivers
    module Foo

class FooDriver < Deltacloud::BaseDriver

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ]
    end

    def images(credentials, opts={})
      client = new_foo_client(credentials)
      # Use client to get a list of images from the back-end cloud and then create a Deltacloud Image object for each of these.
      # Filter the result (eg specific image requested) and return to user.
    end

    def realms(credentials, opts={})
      (...)
    end

    def instances(credentials, opts={})
      (...)
    end

    ... ETC

    private

    def new_foo_client(credentials)
      client = FooLib::Service.new({:user => credentials.user,
:pass => credentials.password })
    end

end
        end
      end
    end

An important method for drivers that implement the instances collection is instance_states. This method represents the finite-state-machine for instances which varies across cloud providers. In some clouds an instance may be in the 'running' state after creation, whereas in other clouds an instance may need to be started explicitly. For example:

define_instance_states do
  start.to( :pending )          .on( :create )
  pending.to( :running )        .automatically
  running.to( :running )        .on( :reboot )
  running.to( :shutting_down )  .on( :stop )
  shutting_down.to( :stopped )  .automatically
  stopped.to( :finish )         .automatically
end

The voodoo used here (i.e. definition of .to and .on etc) is defined in /deltacloud/server/lib/deltacloud/state_machine.rb.

Valid states are:

The instance is located in the:begin state before being created. Immediately after being destroyed the instance is removed to the :end state.

Valid transition actions are:

The action :automatically may be used to indicate a tranisition that may occur without an action being triggered (see the example above).

You can implement some other methods according to the collections you will be supporting:

The hardware_profiles(...) method should return an array of HardwareProfile objects. The opts hash, if present, must be inspected for :id and :architecture keys. If these keys are available, the results should be filtered by the value associated with each key. The filter_on(...) helper method is used for the filtering and as you can see from existing driver method definitions, is invoked in many of the driver collection methods:

def hardware_profiles(credentials, opts=nil)
  hardware_profiles = # get all hardware profiles from provider
  hardware_profiles = filter_on( hardware_profiles, :id, opts )
  hardware_profiles = filter_on( hardware_profiles, :architecture, opts )
  return hardware_profiles
end

Once you've implemented some of the methods for your driver you should test if the driver is working correctly. Before you'll do this, you need to create a yaml file for your driver so that the Deltacloud server recognizes the driver. Assuming you've written the driver for cloud Foo and you've created the file foo_driver.rb (containing the class Deltacloud::Drivers::Foo::FooDriver), you need to drop a file into /deltacloud/server/config/drivers called foo.yaml, which contains:

---
:foo:
  :name Foo

Then, you can start the Deltacloud server:

deltacloudd -i foo

Back Test the driver

;T; I"p#

Write a provider driver

The deltacloud drivers are stored in deltacloud/server/lib/deltacloud/drivers.

  1. To add a driver for a hypotetical Foo cloud, add a directory into /drivers/ and then add a file for a driver itself:

    deltacloud/server/lib/deltacloud/drivers/foo/foo_driver.rb

    You need to define a class Deltacloud::Drivers::Foo::FooDriver to this file. The class has to be a subclass of the Deltacloud::BaseDriver.

  2. Set up which collections the provider for you are writing the driver supports - e.g. images, instances, keys, buckets/blobs (storage), etc.:

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ] - [ :storage_snapshots, :storage_volumes ]
    end
    

    This declares that the driver supports the DEFAULT_COLLECTIONS (defined in deltacloud/server/lib/drivers.rb) except storage_snapshots and storage_volumes and also supports the buckets collection. A storage only cloud provider driver would support only the buckets collection.

  3. Define the methods for each collection that your driver supports. The methods, as well as the routes to them, are defined in deltacloud/server/lib/deltacloud/server.rb. You can look at the existing drivers to get the idea of how to implement a specific method.

  4. Consider how the driver will be communicating with the cloud provider. Many of the existing drivers use external ruby gems for this purpose. For example, the ec2 driver uses the aws gem, the rackspace driver uses the cloudfiles and cloudservers gems. However, other drivers implement their own clients to communicate with the cloud provider, such as the IBM SmartCloud driver and the Gogrid driver. This also explains why some drivers in the /drivers directory contain only the provider _driver.rb file, while the others also define a provider_client.rb file. It is entirely up to you, whether you write your own client or use an existing one.

Thus, your driver for the cloud provider Foo may look like:

require 'deltacloud/base_driver'
require 'foo_lib' # a library for talking to the foo cloud

module Deltacloud
  module Drivers
    module Foo

class FooDriver < Deltacloud::BaseDriver

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ]
    end

    def images(credentials, opts={})
      client = new_foo_client(credentials)
      # Use client to get a list of images from the back-end cloud and then create a Deltacloud Image object for each of these.
      # Filter the result (eg specific image requested) and return to user.
    end

    def realms(credentials, opts={})
      (...)
    end

    def instances(credentials, opts={})
      (...)
    end

    ... ETC

    private

    def new_foo_client(credentials)
      client = FooLib::Service.new({:user => credentials.user,
:pass => credentials.password })
    end

end
        end
      end
    end

An important method for drivers that implement the instances collection is instance_states. This method represents the finite-state-machine for instances which varies across cloud providers. In some clouds an instance may be in the 'running' state after creation, whereas in other clouds an instance may need to be started explicitly. For example:

define_instance_states do
  start.to( :pending )          .on( :create )
  pending.to( :running )        .automatically
  running.to( :running )        .on( :reboot )
  running.to( :shutting_down )  .on( :stop )
  shutting_down.to( :stopped )  .automatically
  stopped.to( :finish )         .automatically
end

The voodoo used here (i.e. definition of .to and .on etc) is defined in /deltacloud/server/lib/deltacloud/state_machine.rb.

Valid states are:

The instance is located in the:begin state before being created. Immediately after being destroyed the instance is removed to the :end state.

Valid transition actions are:

The action :automatically may be used to indicate a tranisition that may occur without an action being triggered (see the example above).

You can implement some other methods according to the collections you will be supporting:

The hardware_profiles(...) method should return an array of HardwareProfile objects. The opts hash, if present, must be inspected for :id and :architecture keys. If these keys are available, the results should be filtered by the value associated with each key. The filter_on(...) helper method is used for the filtering and as you can see from existing driver method definitions, is invoked in many of the driver collection methods:

def hardware_profiles(credentials, opts=nil)
  hardware_profiles = # get all hardware profiles from provider
  hardware_profiles = filter_on( hardware_profiles, :id, opts )
  hardware_profiles = filter_on( hardware_profiles, :architecture, opts )
  return hardware_profiles
end

Once you've implemented some of the methods for your driver you should test if the driver is working correctly. Before you'll do this, you need to create a yaml file for your driver so that the Deltacloud server recognizes the driver. Assuming you've written the driver for cloud Foo and you've created the file foo_driver.rb (containing the class Deltacloud::Drivers::Foo::FooDriver), you need to drop a file into /deltacloud/server/config/drivers called foo.yaml, which contains:

---
:foo:
  :name Foo

Then, you can start the Deltacloud server:

deltacloudd -i foo

Back Test the driver

;T; I"c#


Write a provider driver

The deltacloud drivers are stored in deltacloud/server/lib/deltacloud/drivers.

  1. To add a driver for a hypotetical Foo cloud, add a directory into /drivers/ and then add a file for a driver itself:

    deltacloud/server/lib/deltacloud/drivers/foo/foo_driver.rb

    You need to define a class Deltacloud::Drivers::Foo::FooDriver to this file. The class has to be a subclass of the Deltacloud::BaseDriver.

  2. Set up which collections the provider for you are writing the driver supports - e.g. images, instances, keys, buckets/blobs (storage), etc.:

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ] - [ :storage_snapshots, :storage_volumes ]
    end
    

    This declares that the driver supports the DEFAULT_COLLECTIONS (defined in deltacloud/server/lib/drivers.rb) except storage_snapshots and storage_volumes and also supports the buckets collection. A storage only cloud provider driver would support only the buckets collection.

  3. Define the methods for each collection that your driver supports. The methods, as well as the routes to them, are defined in deltacloud/server/lib/deltacloud/server.rb. You can look at the existing drivers to get the idea of how to implement a specific method.

  4. Consider how the driver will be communicating with the cloud provider. Many of the existing drivers use external ruby gems for this purpose. For example, the ec2 driver uses the aws gem, the rackspace driver uses the cloudfiles and cloudservers gems. However, other drivers implement their own clients to communicate with the cloud provider, such as the IBM SmartCloud driver and the Gogrid driver. This also explains why some drivers in the /drivers directory contain only the provider _driver.rb file, while the others also define a provider_client.rb file. It is entirely up to you, whether you write your own client or use an existing one.

Thus, your driver for the cloud provider Foo may look like:

require 'deltacloud/base_driver'
require 'foo_lib' # a library for talking to the foo cloud

module Deltacloud
  module Drivers
    module Foo

class FooDriver < Deltacloud::BaseDriver

    def supported_collections
      DEFAULT_COLLECTIONS + [ :buckets ]
    end

    def images(credentials, opts={})
      client = new_foo_client(credentials)
      # Use client to get a list of images from the back-end cloud and then create a Deltacloud Image object for each of these.
      # Filter the result (eg specific image requested) and return to user.
    end

    def realms(credentials, opts={})
      (...)
    end

    def instances(credentials, opts={})
      (...)
    end

    ... ETC

    private

    def new_foo_client(credentials)
      client = FooLib::Service.new({:user => credentials.user,
:pass => credentials.password })
    end

end
        end
      end
    end

An important method for drivers that implement the instances collection is instance_states. This method represents the finite-state-machine for instances which varies across cloud providers. In some clouds an instance may be in the 'running' state after creation, whereas in other clouds an instance may need to be started explicitly. For example:

define_instance_states do
  start.to( :pending )          .on( :create )
  pending.to( :running )        .automatically
  running.to( :running )        .on( :reboot )
  running.to( :shutting_down )  .on( :stop )
  shutting_down.to( :stopped )  .automatically
  stopped.to( :finish )         .automatically
end

The voodoo used here (i.e. definition of .to and .on etc) is defined in /deltacloud/server/lib/deltacloud/state_machine.rb.

Valid states are:

The instance is located in the:begin state before being created. Immediately after being destroyed the instance is removed to the :end state.

Valid transition actions are:

The action :automatically may be used to indicate a tranisition that may occur without an action being triggered (see the example above).

You can implement some other methods according to the collections you will be supporting:

The hardware_profiles(...) method should return an array of HardwareProfile objects. The opts hash, if present, must be inspected for :id and :architecture keys. If these keys are available, the results should be filtered by the value associated with each key. The filter_on(...) helper method is used for the filtering and as you can see from existing driver method definitions, is invoked in many of the driver collection methods:

def hardware_profiles(credentials, opts=nil)
  hardware_profiles = # get all hardware profiles from provider
  hardware_profiles = filter_on( hardware_profiles, :id, opts )
  hardware_profiles = filter_on( hardware_profiles, :architecture, opts )
  return hardware_profiles
end

Once you've implemented some of the methods for your driver you should test if the driver is working correctly. Before you'll do this, you need to create a yaml file for your driver so that the Deltacloud server recognizes the driver. Assuming you've written the driver for cloud Foo and you've created the file foo_driver.rb (containing the class Deltacloud::Drivers::Foo::FooDriver), you need to drop a file into /deltacloud/server/config/drivers called foo.yaml, which contains:

---
:foo:
  :name Foo

Then, you can start the Deltacloud server:

deltacloudd -i foo

Back Test the driver

;T; @I"/how-to-contribute/;T{;{ ;I"£) How Can I Contribute?


Contribute to Deltacloud

Deltacloud project is a free open source software licensed under the Apache Software Foundation license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor license agreement. Do not hesitate to contact us if you have any questions about contributing to the Deltacloud project.

How can I contribute?


Overview of the Deltacloud directory structure

The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:

deltacloud
|-----------------------------------------------------------------------------------
|-d-->tests                           Contains Cucumber tests
|-----------------------------------------------------------------------------------
|-d-->site                            Files for this website
|-----------------------------------------------------------------------------------
|-d-->client                          Contains the Deltacloud ruby client
|-----------------------------------------------------------------------------------
|-d-->clients                         Contains other Deltacloud clients (e.g. java)
|-----------------------------------------------------------------------------------
|-d--> server
       |----------------------------------------------------------------------------
       |-d-->bin                      Contains the Deltacloud executable deltacloudd
       |----------------------------------------------------------------------------
       |-d-->views                    Contains haml views for each collection
       |----------------------------------------------------------------------------
       |-d-->tests                    Contains unit tests for drivers
       |----------------------------------------------------------------------------
       |-d-->lib
             |----------------------------------------------------------------------
             |-d-->sinatra            Contains rabbit DSL and various helpers
             |----------------------------------------------------------------------
             |-d-->deltacloud
                   |----------------------------------------------------------------
                   |-d-->models       Definition of each collection model
                   |----------------------------------------------------------------
                   |-d-->drivers      Contains the drivers for each cloud provider
                   |----------------------------------------------------------------
                   |-d-->helpers      Various helper methods used by the drivers
                   |----------------------------------------------------------------
                   |-d-->base_driver  Contains the Deltacloud base driver
                   |----------------------------------------------------------------
                   |-f-->server.rb                Contains the sinatra routes
                   |----------------------------------------------------------------


Reporting a bug

We track bugs in Apache JIRA. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, report it.

Proposing an idea

Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our Teambox page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.

Writing documentation

You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, donā€™t hesitate to do it and send us your contribution. We really appreciate your help.

;T; I"Ā

Contribute to Deltacloud

Deltacloud project is a free open source software licensed under the Apache Software Foundation license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor license agreement. Do not hesitate to contact us if you have any questions about contributing to the Deltacloud project.

How can I contribute?


Overview of the Deltacloud directory structure

The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:

deltacloud
|-----------------------------------------------------------------------------------
|-d-->tests                           Contains Cucumber tests
|-----------------------------------------------------------------------------------
|-d-->site                            Files for this website
|-----------------------------------------------------------------------------------
|-d-->client                          Contains the Deltacloud ruby client
|-----------------------------------------------------------------------------------
|-d-->clients                         Contains other Deltacloud clients (e.g. java)
|-----------------------------------------------------------------------------------
|-d--> server
       |----------------------------------------------------------------------------
       |-d-->bin                      Contains the Deltacloud executable deltacloudd
       |----------------------------------------------------------------------------
       |-d-->views                    Contains haml views for each collection
       |----------------------------------------------------------------------------
       |-d-->tests                    Contains unit tests for drivers
       |----------------------------------------------------------------------------
       |-d-->lib
             |----------------------------------------------------------------------
             |-d-->sinatra            Contains rabbit DSL and various helpers
             |----------------------------------------------------------------------
             |-d-->deltacloud
                   |----------------------------------------------------------------
                   |-d-->models       Definition of each collection model
                   |----------------------------------------------------------------
                   |-d-->drivers      Contains the drivers for each cloud provider
                   |----------------------------------------------------------------
                   |-d-->helpers      Various helper methods used by the drivers
                   |----------------------------------------------------------------
                   |-d-->base_driver  Contains the Deltacloud base driver
                   |----------------------------------------------------------------
                   |-f-->server.rb                Contains the sinatra routes
                   |----------------------------------------------------------------

Reporting a bug

We track bugs in Apache JIRA. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, report it.

Proposing an idea

Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our Teambox page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.

Writing documentation

You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don't hesitate to do it and send us your contribution. We really appreciate your help.;T; I"


Contribute to Deltacloud

Deltacloud project is a free open source software licensed under the Apache Software Foundation license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor license agreement. Do not hesitate to contact us if you have any questions about contributing to the Deltacloud project.

How can I contribute?


Overview of the Deltacloud directory structure

The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:

deltacloud
|-----------------------------------------------------------------------------------
|-d-->tests                           Contains Cucumber tests
|-----------------------------------------------------------------------------------
|-d-->site                            Files for this website
|-----------------------------------------------------------------------------------
|-d-->client                          Contains the Deltacloud ruby client
|-----------------------------------------------------------------------------------
|-d-->clients                         Contains other Deltacloud clients (e.g. java)
|-----------------------------------------------------------------------------------
|-d--> server
       |----------------------------------------------------------------------------
       |-d-->bin                      Contains the Deltacloud executable deltacloudd
       |----------------------------------------------------------------------------
       |-d-->views                    Contains haml views for each collection
       |----------------------------------------------------------------------------
       |-d-->tests                    Contains unit tests for drivers
       |----------------------------------------------------------------------------
       |-d-->lib
             |----------------------------------------------------------------------
             |-d-->sinatra            Contains rabbit DSL and various helpers
             |----------------------------------------------------------------------
             |-d-->deltacloud
                   |----------------------------------------------------------------
                   |-d-->models       Definition of each collection model
                   |----------------------------------------------------------------
                   |-d-->drivers      Contains the drivers for each cloud provider
                   |----------------------------------------------------------------
                   |-d-->helpers      Various helper methods used by the drivers
                   |----------------------------------------------------------------
                   |-d-->base_driver  Contains the Deltacloud base driver
                   |----------------------------------------------------------------
                   |-f-->server.rb                Contains the sinatra routes
                   |----------------------------------------------------------------


Reporting a bug

We track bugs in Apache JIRA. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, report it.

Proposing an idea

Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our Teambox page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.

Writing documentation

You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, donā€™t hesitate to do it and send us your contribution. We really appreciate your help.

;T; @‡I"/hardware-profiles/;T{;{ ;I"Č= Hardware profiles


Hardware profiles

A hardware profile describes the size of a virtual machine in a cloud and specifies details such as how many virtual CPUs, how much memory or how much local storage an instance might have. The attributes of a hardware profile consist of a human-readable name and a list of elements. Each element defines possible values along with a sizing dimension.

Since clouds differ sharply in how virtual machine sizing is represented and influenced, hardware profiles provide a generic mechanism to express sizing constraints. For each dimension (such as amount of memory), the hardware profile can express that

  • size is fixed in the dimension, for example instances all have 2GB of memory;
  • size can vary within some range, for example instances can have from 1GB to 4GB of memory;
  • size can be chosen from a predefined set of values - an enumeration, for example instances can have 512 MB, 1 GB or 4GB of memory.

When creating a new instance, a client must specify the hardware profile on which the instance is based.

In addition to the sizing constraints, a hardware profile may also indicate the parameters that can be specified by a client in instance operations. A <param> XML tag signifies the user-defined variable dimensions within the given property. For instance, the following extract shows the memory dimension for a hardware profile that can be specified in the HTTP POST create

operation of the instances collection (i.e. creating a new instance). The given parameter must be specified using the name hwp_memory. The default value is 10240 but the client may specify a value in the range 7680 up to 15360:

...
<property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
</property>
...

Get a list of all hardware profiles

To produce a list of all hardware profiles availaible with this cloud use call GET /api/hardware_profiles. The example below shows how to list the hardware profiles available in the Amazon EC2 cloud. As EC2 provides a set of pre-defined hardware profiles, the properties of each dimension (memory,cpu etc) are the type fixed.

Example request:

GET /api/hardware_profiles?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 3896
<?xml version='1.0' encoding='utf-8' ?>
<hardware_profiles>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/t1.micro' id='t1.micro'>
    <name>t1.micro</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='645.12' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    <name>m1.small</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.large' id='m1.large'>
    <name>m1.large</name>
    <property kind='fixed' name='cpu' unit='count' value='4' />
    <property kind='fixed' name='memory' unit='MB' value='7680.0' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.xlarge' id='m1.xlarge'>
    <name>m1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='8' />
    <property kind='fixed' name='memory' unit='MB' value='15360' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    <name>c1.medium</name>
    <property kind='fixed' name='cpu' unit='count' value='5' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='350' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.xlarge' id='c1.xlarge'>
    <name>c1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='20' />
    <property kind='fixed' name='memory' unit='MB' value='7168' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.xlarge' id='m2.xlarge'>
    <name>m2.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='6.5' />
    <property kind='fixed' name='memory' unit='MB' value='17510.4' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='420' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.2xlarge' id='m2.2xlarge'>
    <name>m2.2xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='13' />
    <property kind='fixed' name='memory' unit='MB' value='35020.8' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.4xlarge' id='m2.4xlarge'>
    <name>m2.4xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='26' />
    <property kind='fixed' name='memory' unit='MB' value='70041.6' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
</hardware_profiles>

Get the details of a hardware profile

To retrieve the details of a specific hardware profile use call GET /api/hardware profiles/:id. The example below shows a request for the m1-large profile of the Deltacloud mock driver. This hardware profile demonstrates the three different types of parameters (fixed, range, enum). Instances launched within this hardware profile will have exactly 2 virtual CPUs, memory in the range 7.5 to 15GB and local storage that can either be 850MB or 1GB. The default value for each dimension is indicated by the value attribute on the property element.

Example request:

GET /api/hardware_profiles/m1-large?format=xml HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3003
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 808

<?xml version='1.0' encoding='utf-8' ?>
<hardware_profile href='http://localhost:3003/api/hardware_profiles/m1-large' id='m1-large'>
  <name>m1-large</name>
  <property kind='fixed' name='cpu' unit='count' value='2' />
  <property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
  </property>
  <property kind='enum' name='storage' unit='GB' value='850'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_storage' operation='create' />
    <enum>
      <entry value='850' />
      <entry value='1024' />
    </enum>
  </property>
  <property kind='fixed' name='architecture' unit='label' value='x86_64' />
</hardware_profile>

Images


;T; I"M(

Hardware profiles

A hardware profile describes the size of a virtual machine in a cloud and specifies details such as how many virtual CPUs, how much memory or how much local storage an instance might have. The attributes of a hardware profile consist of a human-readable name and a list of elements. Each element defines possible values along with a sizing dimension.

Since clouds differ sharply in how virtual machine sizing is represented and influenced, hardware profiles provide a generic mechanism to express sizing constraints. For each dimension (such as amount of memory), the hardware profile can express that

When creating a new instance, a client must specify the hardware profile on which the instance is based.

In addition to the sizing constraints, a hardware profile may also indicate the parameters that can be specified by a client in instance operations. A <param> XML tag signifies the user-defined variable dimensions within the given property. For instance, the following extract shows the memory dimension for a hardware profile that can be specified in the HTTP POST create

operation of the instances collection (i.e. creating a new instance). The given parameter must be specified using the name hwp_memory. The default value is 10240 but the client may specify a value in the range 7680 up to 15360:

...
<property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
</property>
...

Get a list of all hardware profiles

To produce a list of all hardware profiles availaible with this cloud use call GET /api/hardware_profiles. The example below shows how to list the hardware profiles available in the Amazon EC2 cloud. As EC2 provides a set of pre-defined hardware profiles, the properties of each dimension (memory,cpu etc) are the type fixed.

Example request:

GET /api/hardware_profiles?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 3896
<?xml version='1.0' encoding='utf-8' ?>
<hardware_profiles>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/t1.micro' id='t1.micro'>
    <name>t1.micro</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='645.12' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    <name>m1.small</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.large' id='m1.large'>
    <name>m1.large</name>
    <property kind='fixed' name='cpu' unit='count' value='4' />
    <property kind='fixed' name='memory' unit='MB' value='7680.0' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.xlarge' id='m1.xlarge'>
    <name>m1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='8' />
    <property kind='fixed' name='memory' unit='MB' value='15360' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    <name>c1.medium</name>
    <property kind='fixed' name='cpu' unit='count' value='5' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='350' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.xlarge' id='c1.xlarge'>
    <name>c1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='20' />
    <property kind='fixed' name='memory' unit='MB' value='7168' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.xlarge' id='m2.xlarge'>
    <name>m2.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='6.5' />
    <property kind='fixed' name='memory' unit='MB' value='17510.4' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='420' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.2xlarge' id='m2.2xlarge'>
    <name>m2.2xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='13' />
    <property kind='fixed' name='memory' unit='MB' value='35020.8' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.4xlarge' id='m2.4xlarge'>
    <name>m2.4xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='26' />
    <property kind='fixed' name='memory' unit='MB' value='70041.6' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
</hardware_profiles>

Get the details of a hardware profile

To retrieve the details of a specific hardware profile use call GET /api/hardware profiles/:id. The example below shows a request for the m1-large profile of the Deltacloud mock driver. This hardware profile demonstrates the three different types of parameters (fixed, range, enum). Instances launched within this hardware profile will have exactly 2 virtual CPUs, memory in the range 7.5 to 15GB and local storage that can either be 850MB or 1GB. The default value for each dimension is indicated by the value attribute on the property element.

Example request:

GET /api/hardware_profiles/m1-large?format=xml HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3003
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 808

<?xml version='1.0' encoding='utf-8' ?>
<hardware_profile href='http://localhost:3003/api/hardware_profiles/m1-large' id='m1-large'>
  <name>m1-large</name>
  <property kind='fixed' name='cpu' unit='count' value='2' />
  <property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
  </property>
  <property kind='enum' name='storage' unit='GB' value='850'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_storage' operation='create' />
    <enum>
      <entry value='850' />
      <entry value='1024' />
    </enum>
  </property>
  <property kind='fixed' name='architecture' unit='label' value='x86_64' />
</hardware_profile>
Images
;T; I"E(


Hardware profiles

A hardware profile describes the size of a virtual machine in a cloud and specifies details such as how many virtual CPUs, how much memory or how much local storage an instance might have. The attributes of a hardware profile consist of a human-readable name and a list of elements. Each element defines possible values along with a sizing dimension.

Since clouds differ sharply in how virtual machine sizing is represented and influenced, hardware profiles provide a generic mechanism to express sizing constraints. For each dimension (such as amount of memory), the hardware profile can express that

When creating a new instance, a client must specify the hardware profile on which the instance is based.

In addition to the sizing constraints, a hardware profile may also indicate the parameters that can be specified by a client in instance operations. A <param> XML tag signifies the user-defined variable dimensions within the given property. For instance, the following extract shows the memory dimension for a hardware profile that can be specified in the HTTP POST create

operation of the instances collection (i.e. creating a new instance). The given parameter must be specified using the name hwp_memory. The default value is 10240 but the client may specify a value in the range 7680 up to 15360:

...
<property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
</property>
...

Get a list of all hardware profiles

To produce a list of all hardware profiles availaible with this cloud use call GET /api/hardware_profiles. The example below shows how to list the hardware profiles available in the Amazon EC2 cloud. As EC2 provides a set of pre-defined hardware profiles, the properties of each dimension (memory,cpu etc) are the type fixed.

Example request:

GET /api/hardware_profiles?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 3896
<?xml version='1.0' encoding='utf-8' ?>
<hardware_profiles>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/t1.micro' id='t1.micro'>
    <name>t1.micro</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='645.12' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    <name>m1.small</name>
    <property kind='fixed' name='cpu' unit='count' value='1' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.large' id='m1.large'>
    <name>m1.large</name>
    <property kind='fixed' name='cpu' unit='count' value='4' />
    <property kind='fixed' name='memory' unit='MB' value='7680.0' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.xlarge' id='m1.xlarge'>
    <name>m1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='8' />
    <property kind='fixed' name='memory' unit='MB' value='15360' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    <name>c1.medium</name>
    <property kind='fixed' name='cpu' unit='count' value='5' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='storage' unit='GB' value='350' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.xlarge' id='c1.xlarge'>
    <name>c1.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='20' />
    <property kind='fixed' name='memory' unit='MB' value='7168' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.xlarge' id='m2.xlarge'>
    <name>m2.xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='6.5' />
    <property kind='fixed' name='memory' unit='MB' value='17510.4' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='420' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.2xlarge' id='m2.2xlarge'>
    <name>m2.2xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='13' />
    <property kind='fixed' name='memory' unit='MB' value='35020.8' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='850' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/m2.4xlarge' id='m2.4xlarge'>
    <name>m2.4xlarge</name>
    <property kind='fixed' name='cpu' unit='count' value='26' />
    <property kind='fixed' name='memory' unit='MB' value='70041.6' />
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='fixed' name='storage' unit='GB' value='1690' />
  </hardware_profile>
</hardware_profiles>

Get the details of a hardware profile

To retrieve the details of a specific hardware profile use call GET /api/hardware profiles/:id. The example below shows a request for the m1-large profile of the Deltacloud mock driver. This hardware profile demonstrates the three different types of parameters (fixed, range, enum). Instances launched within this hardware profile will have exactly 2 virtual CPUs, memory in the range 7.5 to 15GB and local storage that can either be 850MB or 1GB. The default value for each dimension is indicated by the value attribute on the property element.

Example request:

GET /api/hardware_profiles/m1-large?format=xml HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3003
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 808

<?xml version='1.0' encoding='utf-8' ?>
<hardware_profile href='http://localhost:3003/api/hardware_profiles/m1-large' id='m1-large'>
  <name>m1-large</name>
  <property kind='fixed' name='cpu' unit='count' value='2' />
  <property kind='range' name='memory' unit='MB' value='10240'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_memory' operation='create' />
    <range first='7680.0' last='15360' />
  </property>
  <property kind='enum' name='storage' unit='GB' value='850'>
    <param href='http://localhost:3003/api/instances' method='post' name='hwp_storage' operation='create' />
    <enum>
      <entry value='850' />
      <entry value='1024' />
    </enum>
  </property>
  <property kind='fixed' name='architecture' unit='label' value='x86_64' />
</hardware_profile>

Images


;T; @I"/drivers/;T{;{ ;I"`~ Drivers


Deltacloud drivers

Deltacloud provides drivers for a growing number of popular IaaS cloud providers. This page contains notes relevant to specific cloud provider drivers, such as the credentials that should be used for a given cloud provider. Furthermore the information here outlines the mechanism through which any API call sent by a given client to a Deltacloud server instance may be routed to a specific driver, regardless of the 'default' driver that the Deltacloud server was invoked for.

Dynamic driver switching

When the Deltacloud server is started it is passed a parameter that specifies the default driver to be used for API operations:

$ deltacloudd -i ec2

The above example shows how to start the Detlacloud server with the Amazon EC2 driver. It is possible to start a number of Deltacloud server instances for each cloud provider that you wish to connect to (e.g. on different ports). There is also a mechanism is with which you can instruct the server to use a specific driver, regardless of the current default. The Deltacloud API drivers collection (e.g. GET /api/drivers) provides a list of all currently supported cloud provider drivers.

Some drivers also support the notion of a provider. Changing the provider makes it possible to use the same driver against different instances of a cloud, for example different regions in EC2 or different installations of RHEV-M. The possible range of values for the provider is driver-specific, and it is listed in the notes for each driver below.

The driver and provider can be selected through the request headers X-Deltacloud-Driver and X-Deltacloud-Provider. For example, including the headers X-Deltacloud-Driver: ec2 and X-Deltacloud-Provider: eu-west-1 ensures that a request will be serviced by the EC2 driver, and that the driver will use the eu-west-1 region in EC2.

Driver functionality and Credentials

Compute Driver Functionality

Ā  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
Fujitsu FGCP yes yes yes no yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes


Storage Driver Functionality

Ā  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes


Deltacloud uses basic HTTP authentication to receive credentials from the client and passes them through to the particular back-end cloud. The credentials always consist of a username and password and they are never stored on the server. The exact credentials for logging into the server, and a place where you can find them, depends on the backend cloud that the server is talking to.

The following table gives details about the credentials that must be provided for each of the supported clouds. The entry from the Driver column needs to be passed as the -i option to the deltacloudd server daemon. Note that some of the drivers require additional information, e.g. API endpoint URL's. For more details see the Notes on specific drivers section.

Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver does not communicate with any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key Retrieve neccessary information from the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
Fujitsu FGCP fgcp User certificate's folder name User certificate's passphrase

Set the environment variable FGCP_CERT_DIR to a folder where the folder with UserCert.p12 is stored or place UserCert.p12 in

 ~/.deltacloud/drivers/fgcp/<Username>/ 
in a linux environment, or
 %USERPROFILE%\.deltacloud\drivers\fgcp\<Username>\ 
in Windows. Then use Username to authenticate.
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the Shared Secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in name.blob.core.windows.net). The name and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
OpenStack openstack OpenStack user The username is OpenStack user name and tenant_name concatenated with a '+' and password is your openstack service password. Set the environment variable API_PROVIDER to the URL of Keystone Identity service. Alternatively use the '-P' option when starting the Deltacloud server. See notes for more info.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set the environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set the environment variable API_PROVIDER to the hostname of the vSphere server and the Datastore.
Aruba cloud.it aruba Username Password


Notes on specific drivers

The providers for the EC2 driver correspond to AWS's regions, and currently support all EC2 regions.

The Eucalyptus driver is based on the EC2 driver.

The driver allows selecting the Eucalyptus installation by setting a provider in the format

For example, for the Eucalyptus installation at 192.168.1.1:8773 and a Walrus installation at 192.168.1.2:8773, the driver can be pointed at that installation by passing the request headers

X-Deltacloud-Driver: eucalyptus
X-Deltacloud-Provider: ec2=192.168.1.1:8773;s3=192.168.1.2:8773
When using the IBM SmartCloud driver, the credentials passed in response to the HTTP 401 authentication challenge should be your IBM SmartCloud username and password.

When you use the OpenNebula driver, the credentials passed in response to the HTTP 401 authentication challenge should be your OpenNebula user and password.

The address, on which the OCCI server is listening, needs to be defined in an environment variable called OCCI_URL.

The OpenNebula driver has been updated to support v3.x of the OpenNebula API. The driver is contributed by Daniel Molina who has also put together a guide for using OpenNebula through Deltacloud.

When you use the Fujitsu FGCP driver, do not authenticate with your FGCP Portal username. Use the name of the folder in which your UserCert.p12 is stored. UserCert.p12 is the certificate you issued on the FGCP Portal to access MyPortal.

Set the environment variable FGCP_CERT_DIR to override the default path ~/.deltacloud/drivers/fgcp/ to locate the Username folder with the UserCert.p12 file.

FGCP virtual systems and networks are both mapped to realms:

  • Creating a firewall is equivalent to creating a FGCP virtual system. Specify a system descriptor ID as firewall description (e.g. "1-tier Skeleton").
  • Destroying a firewall destroys the virtual system. All instances in it need to be in the STOPPED state. This operation first stops the firewall and therefore it can take five minutes until the firewall actually disappears.
  • When creating an instance, specify a network segment realm as target location.
To use the Openstack driver you need to set the API_PROVIDER environment variable, or the 'X-Deltacloud-Provider' HTTP header to the URI of the Keystone Identity service (you should get this from your Openstack service administrator). You can also pass this with the '-P' option when starting the Deltacloud server.

Furthermore, you need to provide username, tenant_name and password for authentication. The username and tenant_name are specified as one string, concatenated with '+'. For example, with a username of "you@domain.com" and tenantname of "you@domain.com-default-tenant", you would pass "you@domain.com+you@domain.com-default-tenant" as the username in HTTP basic authentication to Deltacloud. This is explained further in this blog post.
When you use the Rackspace-cloud driver (Rackspace cloud used to be called "Mosso") - the password in a HTTP 401 challenge should be your API key, NOT your Rackspace account password. You can get the API-key, or generate a new one, from the Rackspace console.

The RHEV-M driver supports latest release of Red Hat Enterprise Virtualization Manager (3.0 currently). In order to make the driver work with this provider, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' request header to the URL of the RHEV-M REST API entry point. The usual URL looks like:

API_PROVIDER="https://rhevm.hostname.com:8443/api;645e425e-66fe-4ac9-8874-537bd10ef08d"

To make sure that you have right credentials, try to access https://rhevm.hostname.com:8443/rhevm-api in your browser. If you're able to authenticate within the browser, then the crendentials you used are valid Deltacloud credentials.

In order to make RHEV-M driver work properly, you need to set the RHEV-M Data Center UUID you want to speak with in API_PROVIDER url (see the example above). To obtain a list of all Data Centers you can choose from, start Deltacloud API without specifying a datacenter in the API_PROVIDER URL and do this request:

GET /api/drivers/rhevm?format=xml

The list of possible datacenters will appear in the 'providers' section.

Further details coming soon.

You can find the details on how to make the VMware vSphere driver work with Deltacloud API in vSphere Setup in Aeolus project wiki.

In order to connect to vSphere, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' HTTP header in the request to the vSphere host you want to use and the Datastore you want to speak to. For example:

API_PROVIDER="vsphere.hostname.com;DATASTORE-ID"

The username and password in 401 challenge should be the same as you use in the vSphere Control Center.

;T; I"ˆj

Deltacloud drivers

Deltacloud provides drivers for a growing number of popular IaaS cloud providers. This page contains notes relevant to specific cloud provider drivers, such as the credentials that should be used for a given cloud provider. Furthermore the information here outlines the mechanism through which any API call sent by a given client to a Deltacloud server instance may be routed to a specific driver, regardless of the 'default' driver that the Deltacloud server was invoked for.

Dynamic driver switching

When the Deltacloud server is started it is passed a parameter that specifies the default driver to be used for API operations:

$ deltacloudd -i ec2

The above example shows how to start the Detlacloud server with the Amazon EC2 driver. It is possible to start a number of Deltacloud server instances for each cloud provider that you wish to connect to (e.g. on different ports). There is also a mechanism is with which you can instruct the server to use a specific driver, regardless of the current default. The Deltacloud API drivers collection (e.g. GET /api/drivers) provides a list of all currently supported cloud provider drivers.

Some drivers also support the notion of a provider. Changing the provider makes it possible to use the same driver against different instances of a cloud, for example different regions in EC2 or different installations of RHEV-M. The possible range of values for the provider is driver-specific, and it is listed in the notes for each driver below.

The driver and provider can be selected through the request headers X-Deltacloud-Driver and X-Deltacloud-Provider. For example, including the headers X-Deltacloud-Driver: ec2 and X-Deltacloud-Provider: eu-west-1 ensures that a request will be serviced by the EC2 driver, and that the driver will use the eu-west-1 region in EC2.

Driver functionality and Credentials

Compute Driver Functionality

  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
Fujitsu FGCP yes yes yes no yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes

Storage Driver Functionality

  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes

Deltacloud uses basic HTTP authentication to receive credentials from the client and passes them through to the particular back-end cloud. The credentials always consist of a username and password and they are never stored on the server. The exact credentials for logging into the server, and a place where you can find them, depends on the backend cloud that the server is talking to.

The following table gives details about the credentials that must be provided for each of the supported clouds. The entry from the Driver column needs to be passed as the -i option to the deltacloudd server daemon. Note that some of the drivers require additional information, e.g. API endpoint URL's. For more details see the Notes on specific drivers section.

Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver does not communicate with any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key Retrieve neccessary information from the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
Fujitsu FGCP fgcp User certificate's folder name User certificate's passphrase

Set the environment variable FGCP_CERT_DIR to a folder where the folder with UserCert.p12 is stored or place UserCert.p12 in

 ~/.deltacloud/drivers/fgcp/<Username>/ 
in a linux environment, or
 %USERPROFILE%\.deltacloud\drivers\fgcp\<Username>\ 
in Windows. Then use Username to authenticate.

GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the Shared Secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in name.blob.core.windows.net). The name and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
OpenStack openstack OpenStack user The username is OpenStack user name and tenant_name concatenated with a '+' and password is your openstack service password. Set the environment variable API_PROVIDER to the URL of Keystone Identity service. Alternatively use the '-P' option when starting the Deltacloud server. See notes for more info.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set the environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set the environment variable API_PROVIDER to the hostname of the vSphere server and the Datastore.
Aruba cloud.it aruba Username Password

Notes on specific drivers

The providers for the EC2 driver correspond to AWS's regions, and currently support all EC2 regions.

The Eucalyptus driver is based on the EC2 driver.

The driver allows selecting the Eucalyptus installation by setting a provider in the format

For example, for the Eucalyptus installation at 192.168.1.1:8773 and a Walrus installation at 192.168.1.2:8773, the driver can be pointed at that installation by passing the request headers

X-Deltacloud-Driver: eucalyptus
X-Deltacloud-Provider: ec2=192.168.1.1:8773;s3=192.168.1.2:8773
When using the IBM SmartCloud driver, the credentials passed in response to the HTTP 401 authentication challenge should be your IBM SmartCloud username and password.

When you use the OpenNebula driver, the credentials passed in response to the HTTP 401 authentication challenge should be your OpenNebula user and password.

The address, on which the OCCI server is listening, needs to be defined in an environment variable called OCCI_URL.

The OpenNebula driver has been updated to support v3.x of the OpenNebula API. The driver is contributed by Daniel Molina who has also put together a guide for using OpenNebula through Deltacloud.

When you use the Fujitsu FGCP driver, do not authenticate with your FGCP Portal username. Use the name of the folder in which your UserCert.p12 is stored. UserCert.p12 is the certificate you issued on the FGCP Portal to access MyPortal.

Set the environment variable FGCP_CERT_DIR to override the default path ~/.deltacloud/drivers/fgcp/ to locate the Username folder with the UserCert.p12 file.

FGCP virtual systems and networks are both mapped to realms:

  • Creating a firewall is equivalent to creating a FGCP virtual system. Specify a system descriptor ID as firewall description (e.g. "1-tier Skeleton").
  • Destroying a firewall destroys the virtual system. All instances in it need to be in the STOPPED state. This operation first stops the firewall and therefore it can take five minutes until the firewall actually disappears.
  • When creating an instance, specify a network segment realm as target location.

To use the Openstack driver you need to set the API_PROVIDER environment variable, or the 'X-Deltacloud-Provider' HTTP header to the URI of the Keystone Identity service (you should get this from your Openstack service administrator). You can also pass this with the '-P' option when starting the Deltacloud server.

Furthermore, you need to provide username, tenant_name and password for authentication. The username and tenant_name are specified as one string, concatenated with '+'. For example, with a username of "you@domain.com" and tenantname of "you@domain.com-default-tenant", you would pass "you@domain.com+you@domain.com-default-tenant" as the username in HTTP basic authentication to Deltacloud. This is explained further in this blog post.
When you use the Rackspace-cloud driver (Rackspace cloud used to be called "Mosso") - the password in a HTTP 401 challenge should be your API key, NOT your Rackspace account password. You can get the API-key, or generate a new one, from the Rackspace console.

The RHEV-M driver supports latest release of Red Hat Enterprise Virtualization Manager (3.0 currently). In order to make the driver work with this provider, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' request header to the URL of the RHEV-M REST API entry point. The usual URL looks like:

API_PROVIDER="https://rhevm.hostname.com:8443/api;645e425e-66fe-4ac9-8874-537bd10ef08d"

To make sure that you have right credentials, try to access https://rhevm.hostname.com:8443/rhevm-api in your browser. If you're able to authenticate within the browser, then the crendentials you used are valid Deltacloud credentials.

In order to make RHEV-M driver work properly, you need to set the RHEV-M Data Center UUID you want to speak with in API_PROVIDER url (see the example above). To obtain a list of all Data Centers you can choose from, start Deltacloud API without specifying a datacenter in the API_PROVIDER URL and do this request:

GET /api/drivers/rhevm?format=xml

The list of possible datacenters will appear in the 'providers' section.

Further details coming soon.

You can find the details on how to make the VMware vSphere driver work with Deltacloud API in vSphere Setup in Aeolus project wiki.

In order to connect to vSphere, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' HTTP header in the request to the vSphere host you want to use and the Datastore you want to speak to. For example:

API_PROVIDER="vsphere.hostname.com;DATASTORE-ID"

The username and password in 401 challenge should be the same as you use in the vSphere Control Center.

;T; I"ēh


Deltacloud drivers

Deltacloud provides drivers for a growing number of popular IaaS cloud providers. This page contains notes relevant to specific cloud provider drivers, such as the credentials that should be used for a given cloud provider. Furthermore the information here outlines the mechanism through which any API call sent by a given client to a Deltacloud server instance may be routed to a specific driver, regardless of the 'default' driver that the Deltacloud server was invoked for.

Dynamic driver switching

When the Deltacloud server is started it is passed a parameter that specifies the default driver to be used for API operations:

$ deltacloudd -i ec2

The above example shows how to start the Detlacloud server with the Amazon EC2 driver. It is possible to start a number of Deltacloud server instances for each cloud provider that you wish to connect to (e.g. on different ports). There is also a mechanism is with which you can instruct the server to use a specific driver, regardless of the current default. The Deltacloud API drivers collection (e.g. GET /api/drivers) provides a list of all currently supported cloud provider drivers.

Some drivers also support the notion of a provider. Changing the provider makes it possible to use the same driver against different instances of a cloud, for example different regions in EC2 or different installations of RHEV-M. The possible range of values for the provider is driver-specific, and it is listed in the notes for each driver below.

The driver and provider can be selected through the request headers X-Deltacloud-Driver and X-Deltacloud-Provider. For example, including the headers X-Deltacloud-Driver: ec2 and X-Deltacloud-Provider: eu-west-1 ensures that a request will be serviced by the EC2 driver, and that the driver will use the eu-west-1 region in EC2.

Driver functionality and Credentials

Compute Driver Functionality

Ā  Create new instances Start stopped instances Stop running instances Reboot running instances Destroy instances List all/get details about hardware profiles List all/get details about realms List all/get details about images List all/get details about instances
Amazon EC2 yes no yes yes yes yes yes yes yes
Eucalyptus yes no yes yes yes yes yes yes yes
Fujitsu FGCP yes yes yes no yes yes yes yes yes
IBM SmartCloud yes yes yes yes yes yes yes yes yes
GoGrid yes no yes yes yes yes yes yes yes
OpenNebula yes yes yes yes yes yes yes yes yes
Rackspace yes no yes yes yes yes yes yes yes
RHEV-M yes yes yes no yes yes yes yes yes
RimuHosting yes yes yes yes yes yes yes yes yes
Terremark yes yes yes yes yes yes yes yes yes
vSphere yes yes yes yes yes yes yes yes yes
OpenStack yes yes yes yes yes yes yes yes yes
Aruba cloud.it yes yes yes yes yes yes yes yes yes


Storage Driver Functionality

Ā  Create new buckets Update/delete buckets Create new blobs Update/delete blobs Read/write blob attributes Read/write individual blob attributes
Amazon S3 yes yes yes yes yes yes
Eucalyptus Walrus yes yes yes yes yes yes
Rackspace CloudFiles yes yes yes yes yes yes
Microsoft Azure yes yes yes yes yes yes
Google Storage yes yes yes yes yes yes


Deltacloud uses basic HTTP authentication to receive credentials from the client and passes them through to the particular back-end cloud. The credentials always consist of a username and password and they are never stored on the server. The exact credentials for logging into the server, and a place where you can find them, depends on the backend cloud that the server is talking to.

The following table gives details about the credentials that must be provided for each of the supported clouds. The entry from the Driver column needs to be passed as the -i option to the deltacloudd server daemon. Note that some of the drivers require additional information, e.g. API endpoint URL's. For more details see the Notes on specific drivers section.

Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver does not communicate with any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key Retrieve neccessary information from the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
Fujitsu FGCP fgcp User certificate's folder name User certificate's passphrase

Set the environment variable FGCP_CERT_DIR to a folder where the folder with UserCert.p12 is stored or place UserCert.p12 in

 ~/.deltacloud/drivers/fgcp/<Username>/ 
in a linux environment, or
 %USERPROFILE%\.deltacloud\drivers\fgcp\<Username>\ 
in Windows. Then use Username to authenticate.
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the Shared Secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in name.blob.core.windows.net). The name and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
OpenStack openstack OpenStack user The username is OpenStack user name and tenant_name concatenated with a '+' and password is your openstack service password. Set the environment variable API_PROVIDER to the URL of Keystone Identity service. Alternatively use the '-P' option when starting the Deltacloud server. See notes for more info.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set the environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set the environment variable API_PROVIDER to the hostname of the vSphere server and the Datastore.
Aruba cloud.it aruba Username Password


Notes on specific drivers

The providers for the EC2 driver correspond to AWS's regions, and currently support all EC2 regions.

The Eucalyptus driver is based on the EC2 driver.

The driver allows selecting the Eucalyptus installation by setting a provider in the format

For example, for the Eucalyptus installation at 192.168.1.1:8773 and a Walrus installation at 192.168.1.2:8773, the driver can be pointed at that installation by passing the request headers

X-Deltacloud-Driver: eucalyptus
X-Deltacloud-Provider: ec2=192.168.1.1:8773;s3=192.168.1.2:8773
When using the IBM SmartCloud driver, the credentials passed in response to the HTTP 401 authentication challenge should be your IBM SmartCloud username and password.

When you use the OpenNebula driver, the credentials passed in response to the HTTP 401 authentication challenge should be your OpenNebula user and password.

The address, on which the OCCI server is listening, needs to be defined in an environment variable called OCCI_URL.

The OpenNebula driver has been updated to support v3.x of the OpenNebula API. The driver is contributed by Daniel Molina who has also put together a guide for using OpenNebula through Deltacloud.

When you use the Fujitsu FGCP driver, do not authenticate with your FGCP Portal username. Use the name of the folder in which your UserCert.p12 is stored. UserCert.p12 is the certificate you issued on the FGCP Portal to access MyPortal.

Set the environment variable FGCP_CERT_DIR to override the default path ~/.deltacloud/drivers/fgcp/ to locate the Username folder with the UserCert.p12 file.

FGCP virtual systems and networks are both mapped to realms:

  • Creating a firewall is equivalent to creating a FGCP virtual system. Specify a system descriptor ID as firewall description (e.g. "1-tier Skeleton").
  • Destroying a firewall destroys the virtual system. All instances in it need to be in the STOPPED state. This operation first stops the firewall and therefore it can take five minutes until the firewall actually disappears.
  • When creating an instance, specify a network segment realm as target location.
To use the Openstack driver you need to set the API_PROVIDER environment variable, or the 'X-Deltacloud-Provider' HTTP header to the URI of the Keystone Identity service (you should get this from your Openstack service administrator). You can also pass this with the '-P' option when starting the Deltacloud server.

Furthermore, you need to provide username, tenant_name and password for authentication. The username and tenant_name are specified as one string, concatenated with '+'. For example, with a username of "you@domain.com" and tenantname of "you@domain.com-default-tenant", you would pass "you@domain.com+you@domain.com-default-tenant" as the username in HTTP basic authentication to Deltacloud. This is explained further in this blog post.
When you use the Rackspace-cloud driver (Rackspace cloud used to be called "Mosso") - the password in a HTTP 401 challenge should be your API key, NOT your Rackspace account password. You can get the API-key, or generate a new one, from the Rackspace console.

The RHEV-M driver supports latest release of Red Hat Enterprise Virtualization Manager (3.0 currently). In order to make the driver work with this provider, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' request header to the URL of the RHEV-M REST API entry point. The usual URL looks like:

API_PROVIDER="https://rhevm.hostname.com:8443/api;645e425e-66fe-4ac9-8874-537bd10ef08d"

To make sure that you have right credentials, try to access https://rhevm.hostname.com:8443/rhevm-api in your browser. If you're able to authenticate within the browser, then the crendentials you used are valid Deltacloud credentials.

In order to make RHEV-M driver work properly, you need to set the RHEV-M Data Center UUID you want to speak with in API_PROVIDER url (see the example above). To obtain a list of all Data Centers you can choose from, start Deltacloud API without specifying a datacenter in the API_PROVIDER URL and do this request:

GET /api/drivers/rhevm?format=xml

The list of possible datacenters will appear in the 'providers' section.

Further details coming soon.

You can find the details on how to make the VMware vSphere driver work with Deltacloud API in vSphere Setup in Aeolus project wiki.

In order to connect to vSphere, you need to set the API_PROVIDER environment variable or use the 'X-Deltacloud-Provider' HTTP header in the request to the vSphere host you want to use and the Datastore you want to speak to. For example:

API_PROVIDER="vsphere.hostname.com;DATASTORE-ID"

The username and password in 401 challenge should be the same as you use in the vSphere Control Center.

;T; @“I"/credentials/;T{;{ ;I"æ, Credentials


Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
;T; I"Ķ

Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
;T; I"B


Cloud provider credentials

Cloud Driver Username Password Notes
mock mock mockuser mockpassword The mock driver doesn't talk to any cloud; it just pretends to be a cloud.
Amazon EC2/S3 ec2 Access Key ID Secret Access Key This information can be found on the Security Credentials page in your AWS account.
Eucalyptus eucalyptus Access Key ID Secret Access Key
GoGrid gogrid API Key Shared Secret Go to My Account > API Keys for your account and click on the key you want to use to find the shared secret.
IBM SmartCloud sbc Username Password
Microsoft Azure (Storage Account only) azure Public Storage Account Name Primary Access Key The Storage Account Name is chosen when you create the service (e.g. name in http://name.blob.core.windows.net/). This and the access key are available from the service control panel.
OpenNebula opennebula OpenNebula user OpenNebula password Set the environment variable OCCI_URL to the address on which OpenNebula's OCCI server is listening.
Rackspace Cloud Servers/Cloud Files rackspace Rackspace user name API Key Obtain the key from the API Access page in your control panel.
RHEV-M rhevm RHEV-M user name plus Windows domain, e.g., admin@rhevm.example.com RHEV-M password Set environment variable API_PROVIDER to the URL of the RHEV-M REST API endpoint.
Rimuhosting rimuhosting not used (?) API Key
Terremark terremark Username Password
VMware vSphere vsphere vSphere user vSphere user password Set environment variable API_PROVIDER to the hostname of the vSphere server.
OpenStack openstack OpenStack user OpenStack user password Set environment variable API_PROVIDER to the URL of OpenStack API entrypoint.
;T; @™I"/instances/;T{;{ ;I"‚ Instances


Instances

An instance represents the core of all cloud compute activity: a running virtual machine. An instance is created from an image, with a specified hardware profile and in a given realm. Each instance can have a number of other attributes, not all of which are exposed for all back-end cloud providers. The full list of possible instance attributes is:

Attribute Meaning
owner_id the id of the cloud provider account that launched the instance
image_id the id of the image from which the instance was launched
name a human readable name for the instance given at launch time
realm_id realm into which the instance was launched
state current state of the instance (e.g. 'running')
actions actions that a client may effect on the instance, based on current state
public_addresses the globally routable IP address of the instance
private_addresses the private IP address of the instance, routable within its private network
instance_profile the specific values of memory, cpu, storage
launch_time timestamp at which the instance was launched
keyname name of authentication key, if this method is used for authentication (e.g. EC2)
username the username for authentication when connecting to the instance
password the password used together with username above
firewalls the firewalls that this instance was launched into (EC2 specific)

Get a list of all current instances

To produce a list of all current instances in the given cloud (belonging to the specified account) use call GET /api/instances. The example below displays instances in the Amazon EC2 cloud.

Example request:

GET /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 2790
<?xml version='1.0' encoding='utf-8' ?>
<instances>
  <instance href='http://localhost:3001/api/instances/i-1fbc627e' id='i-1fbc627e'>
    <name>ami-f51aff9c</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-1fbc627e/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/run;id=i-1fbc627e' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:29:48.000Z</launch_time>
    <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
    <name>ami-2b5fba42</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-2b5fba42' id='ami-2b5fba42'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:32:25.000Z</launch_time>
    <public_addresses><address>ec2-184-73-78-87.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>ip-10-196-89-221.ec2.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
      <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
</instances>

Get the details of an instance

To get the details of a specific instance use call GET /api/instances/:id. The example below shows an instance launched in the Rackspace Cloudservers cloud. As you can see, the type of authentication is password but the username and password attributes are blank. The reason why these attributes are blank is that Rackspace only reports these values once, during instance creation and not for subsequent requests. To find an example of the response from an instance go to the Create an instance section.

Example request:

GET /api/instances/20112212?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167
<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Launch an action on an instance

To launch an action on an instance use call POST /api/instances/:id/:action. The valid actions for an instance are specified by the instance states entity. The set of permissible actions that a client may perform on an instance at a given time depends on the current instance state. These are reported by the <actions> attribute in the Deltacloud server response to the GET /api/instances/:id call (Get the details of an instance section). The first example below shows a reboot action on a currently running instance, followed by a stop action.

After invoking the stop operation, the instance state may still be reported as RUNNING in the Deltacloud server response. It is because it may take some time for the instance state to change in the back-end cloud provider (and this will vary between providers). You can assure yourself that the action was performed correctly by requesting a list of instances or a by requesting a specific instance.

The Deltacloud server also allows a special 'run-on-instance' action for some cloud provider instances.This enables a client to perform a command on a running instance over SSH. The Deltacloud server will return the output of that command to the client. This is reported as the run action in the list of instance actions, if it is available. The cmd parameter specifies the command, which is executed on a running instance.The private_key parameter specifies the authentication for cloud providers that expect key based authentication for connecting to instances . For those cloud providers that use username/password for authentication, the password parameter specifies the authentication. Examples below illustrate the run-on-instance feature for an Amazon EC2 instance and a Rackspace Cloudservers instance. The examples differ in how authentication is performed (private RSA Key for EC2 and username/password for Rackspace).

Example request (reboot):

POST /api/instances/i-f3ba6492/reboot?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1322

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T11:29:48.000Z</launch_time>
  <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
  <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
  <firewalls>  <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall></firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

Example request (stop):

POST /api/instances/20112212/stop?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>STOPPED</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Example request (run-on-instance Amazon EC2):

Ɨ Note:

Run-on-instance requests to EC2 instances will fail with 502 Bad Gateway - Execution Expired if the firewall in which the instance was launched does not grant SSH access (tcp, port 22) to the requesting client's IP address. This access may be given using the firewalls collection.

POST /api/instances/i-afde73ce/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Content-Length: 1927
Content-Type: multipart/form-data; boundary=----------------------------332ed6691ab8

------------------------------332ed6691ab8
Content-Disposition: form-data; name="cmd"

uname -a; ls -l
------------------------------332ed6691ab8
Content-Disposition: form-data; name="private_key"

-----BEGIN RSA PRIVATE KEY-----.BTTEpATBAAKDAQEA4t3R/PgUo3KDDuX4
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
3NPbG3aHYPSnwsSxkFSG4Q6ukqYlxT9TPF/+wvdxfAtp3nYw3ZGuSX/DOtToWtQ8
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
9Dabu9BVZrl5BTOKlbAgrKnzsGKvaBST/D2.AB/HB9/GOT36OoBmEr1y9gFwu4Xf
aKw+AXVf9y9TKxVD3TE5uB.oDZG8s4gr2e691xHG9YGzBBBbNzfFh94b3Td5JBGS
zRDTKYBfOgv+Zu5N+WyeaZ0ab50DwK9BXYB5hsRu5zbAqObbTZkwN9qwBOZHzATX
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
qo2VP5WDZeOhRWEUY96./pWN3hNFDkT44vDpeXQUh3rBHyD5DWvWxAze9Ds+UTO/
esuLwP5vXhfoYp6gV9XG.BEBzSVq8kZ2kZtlbWHTR/SGepTkDgYEA9zwHTDhtKR2
KS8/BSFZQ884ZqFkbwT9fTW6s0rgUSBDTUDgYEA9W5HXTOEPGFDnqBhKPLN.xD9D
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
DAAeVWKU1OyDXfN4v6Zn1nNrhSkdrd+XV0nTLExsfg==.-----END RSA PRIVAT
E KEY-----
------------------------------332ed6691ab8--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 12:56:02 GMT
Content-Length: 497

<instance href='http://localhost:3001/api/instances/i-afde73ce' id='i-afde73ce'>
  <public_address>
    ec2-50-19-59-126.compute-1.amazonaws.com
  </public_address>
  <command>
    uname -a; ls -l
  </command>
  <output>Linux domU-12-31-39-0F-E1-78 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 i686 i386 GNU/Linux
  total 140
  -rw-r--r-- 1 root root 137263 Mar 26  2008 ec2-ami-tools-1.3-19974.noarch.rpm
  -rw-r--r-- 1 root root      0 Mar 26  2008 firstlogin
  </output>
</instance>

Example request (run-on-instance Rackspace Cloudservers):

POST /api/instances/20117112/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 275
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------9b05ece66f4d
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="cmd"

uname -a; ifconfig; pwd
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="password"

myserverqB2Uwk21I
------------------------------9b05ece66f4d--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 13:02:15 GMT
Content-Length: 1781

<instance href='http://localhost:3002/api/instances/20117112' id='20117112'>
  <public_address>
    50.57.117.249
  </public_address>
  <command>
    uname -a; ifconfig; pwd
  </command>
  <output>Linux myserver 2.6.35.4-rscloud #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
  eth0      Link encap:Ethernet  HWaddr 40:40:B1:7A:52:7E
            inet addr:50.57.117.249  Bcast:50.57.117.255  Mask:255.255.255.0
            inet6 addr: fe80::4240:b1ff:fe7a:527e/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:54 errors:0 dropped:0 overruns:0 frame:0
            TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:5880 (5.7 KiB)  TX bytes:6331 (6.1 KiB)
            Interrupt:24

  eth1      Link encap:Ethernet  HWaddr 40:40:8E:4B:52:23
            inet addr:10.182.131.159  Bcast:10.182.159.255  Mask:255.255.224.0
            inet6 addr: fe80::4240:8eff:fe4b:5223/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:3 errors:0 dropped:0 overruns:0 frame:0
            TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:188 (188.0 b)  TX bytes:720 (720.0 b)
            Interrupt:25

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

  /root</output>
</instance>

Create a new instance

To create a new instance use call POST /api/instances. At least, clients must specify the image from which the virtual machine instance is created. Optionally, a client may also specify a hardware profile and a realm (with default values used otherwise). Clients can also provide a name for the new instance though this is not supported by all back-end cloud providers. You can check whether a given feature is available in the response to the Deltacloud server API entry point. The details of the new instance are returned in response to this operation.

To create an instance in the Amazon EC2 cloud a client can also specify the name of the used EC2 keypair as well as the firewalls (EC2 security groups) that the instance should be launched into. The EC2 keypair is specified with the parameter keyname while firewalls are specified sequentially as firewalls1 ... firewalls2 ... etc.

See the example below. The values for public and private addresses are blank in the server response, because they have not yet been assigned by the cloud provider. Subsequent requests for the instance details will provide these values.

As with other POST operations in the Deltacloud API, clients may specify parameters as multipart/form-data or as x-www-url-form-urlencoded content type, as you can see in examples below.

Client request (AWS EC2):

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 107
Content-Type: application/x-www-form-urlencoded

keyname=eftah&image_id=ami-f51aff9c&realm_id=us-east-1c&hwp_id=c1.medium&
firewalls1=default&firewalls2=test

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 1183

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-cbb861aa' id='i-cbb861aa'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-cbb861aa/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-cbb861aa/run;id=i-cbb861aa' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T16:09:45.000Z</launch_time>
  <public_addresses></public_addresses>
  <private_addresses></private_addresses>
  <firewalls>
    <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
  </firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

In the following example you can see that the client provides the optional name parameter and that the created instance uses password type of authentication. Furthermore, the client uses a content-type of application/x-www-form-urlencoded. The username and password are returned with the details of the new instance:

Example request: (Rackspace Cloudservers)

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 34
Content-Type: application/x-www-form-urlencoded

image_id=53&hwp_id=1&name=myserver

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 883

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password>myserver4OvKh7Ak3</password>
    </login>
  </authentication>
</instance>
Ɨ

Note:

The Deltacloud does not report potential errors, if you are creating an instance in vSphere. When you launch an instance, Deltacloud does not wait until the task is finished. Instead of that, Deltacloud creates a YAML representation of the instance in vSphere datastore. The YAML instance is in a 'PENDING' state until the 'real' instance is created. If the real instance fails to create, the YAML representation is removed. However, Deltacloud does not send you any error message.

Keys


;T; I".m

Instances

An instance represents the core of all cloud compute activity: a running virtual machine. An instance is created from an image, with a specified hardware profile and in a given realm. Each instance can have a number of other attributes, not all of which are exposed for all back-end cloud providers. The full list of possible instance attributes is:

Attribute Meaning
owner_id the id of the cloud provider account that launched the instance
image_id the id of the image from which the instance was launched
name a human readable name for the instance given at launch time
realm_id realm into which the instance was launched
state current state of the instance (e.g. 'running')
actions actions that a client may effect on the instance, based on current state
public_addresses the globally routable IP address of the instance
private_addresses the private IP address of the instance, routable within its private network
instance_profile the specific values of memory, cpu, storage
launch_time timestamp at which the instance was launched
keyname name of authentication key, if this method is used for authentication (e.g. EC2)
username the username for authentication when connecting to the instance
password the password used together with username above
firewalls the firewalls that this instance was launched into (EC2 specific)

Get a list of all current instances

To produce a list of all current instances in the given cloud (belonging to the specified account) use call GET /api/instances. The example below displays instances in the Amazon EC2 cloud.

Example request:

GET /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 2790
<?xml version='1.0' encoding='utf-8' ?>
<instances>
  <instance href='http://localhost:3001/api/instances/i-1fbc627e' id='i-1fbc627e'>
    <name>ami-f51aff9c</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-1fbc627e/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/run;id=i-1fbc627e' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:29:48.000Z</launch_time>
    <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
    <name>ami-2b5fba42</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-2b5fba42' id='ami-2b5fba42'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:32:25.000Z</launch_time>
    <public_addresses><address>ec2-184-73-78-87.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>ip-10-196-89-221.ec2.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
      <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
</instances>

Get the details of an instance

To get the details of a specific instance use call GET /api/instances/:id. The example below shows an instance launched in the Rackspace Cloudservers cloud. As you can see, the type of authentication is password but the username and password attributes are blank. The reason why these attributes are blank is that Rackspace only reports these values once, during instance creation and not for subsequent requests. To find an example of the response from an instance go to the Create an instance section.

Example request:

GET /api/instances/20112212?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167
<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Launch an action on an instance

To launch an action on an instance use call POST /api/instances/:id/:action. The valid actions for an instance are specified by the instance states entity. The set of permissible actions that a client may perform on an instance at a given time depends on the current instance state. These are reported by the <actions> attribute in the Deltacloud server response to the GET /api/instances/:id call (Get the details of an instance section). The first example below shows a reboot action on a currently running instance, followed by a stop action.

After invoking the stop operation, the instance state may still be reported as RUNNING in the Deltacloud server response. It is because it may take some time for the instance state to change in the back-end cloud provider (and this will vary between providers). You can assure yourself that the action was performed correctly by requesting a list of instances or a by requesting a specific instance.

The Deltacloud server also allows a special 'run-on-instance' action for some cloud provider instances.This enables a client to perform a command on a running instance over SSH. The Deltacloud server will return the output of that command to the client. This is reported as the run action in the list of instance actions, if it is available. The cmd parameter specifies the command, which is executed on a running instance.The private_key parameter specifies the authentication for cloud providers that expect key based authentication for connecting to instances . For those cloud providers that use username/password for authentication, the password parameter specifies the authentication. Examples below illustrate the run-on-instance feature for an Amazon EC2 instance and a Rackspace Cloudservers instance. The examples differ in how authentication is performed (private RSA Key for EC2 and username/password for Rackspace).

Example request (reboot):

POST /api/instances/i-f3ba6492/reboot?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1322

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T11:29:48.000Z</launch_time>
  <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
  <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
  <firewalls>  <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall></firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

Example request (stop):

POST /api/instances/20112212/stop?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>STOPPED</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Example request (run-on-instance Amazon EC2):

Ɨ Note:

Run-on-instance requests to EC2 instances will fail with 502 Bad Gateway - Execution Expired if the firewall in which the instance was launched does not grant SSH access (tcp, port 22) to the requesting client's IP address. This access may be given using the firewalls collection.

POST /api/instances/i-afde73ce/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Content-Length: 1927
Content-Type: multipart/form-data; boundary=----------------------------332ed6691ab8

------------------------------332ed6691ab8
Content-Disposition: form-data; name="cmd"

uname -a; ls -l
------------------------------332ed6691ab8
Content-Disposition: form-data; name="private_key"

-----BEGIN RSA PRIVATE KEY-----.BTTEpATBAAKDAQEA4t3R/PgUo3KDDuX4
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
3NPbG3aHYPSnwsSxkFSG4Q6ukqYlxT9TPF/+wvdxfAtp3nYw3ZGuSX/DOtToWtQ8
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
9Dabu9BVZrl5BTOKlbAgrKnzsGKvaBST/D2.AB/HB9/GOT36OoBmEr1y9gFwu4Xf
aKw+AXVf9y9TKxVD3TE5uB.oDZG8s4gr2e691xHG9YGzBBBbNzfFh94b3Td5JBGS
zRDTKYBfOgv+Zu5N+WyeaZ0ab50DwK9BXYB5hsRu5zbAqObbTZkwN9qwBOZHzATX
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
qo2VP5WDZeOhRWEUY96./pWN3hNFDkT44vDpeXQUh3rBHyD5DWvWxAze9Ds+UTO/
esuLwP5vXhfoYp6gV9XG.BEBzSVq8kZ2kZtlbWHTR/SGepTkDgYEA9zwHTDhtKR2
KS8/BSFZQ884ZqFkbwT9fTW6s0rgUSBDTUDgYEA9W5HXTOEPGFDnqBhKPLN.xD9D
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
DAAeVWKU1OyDXfN4v6Zn1nNrhSkdrd+XV0nTLExsfg==.-----END RSA PRIVAT
E KEY-----
------------------------------332ed6691ab8--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 12:56:02 GMT
Content-Length: 497

<instance href='http://localhost:3001/api/instances/i-afde73ce' id='i-afde73ce'>
  <public_address>
    ec2-50-19-59-126.compute-1.amazonaws.com
  </public_address>
  <command>
    uname -a; ls -l
  </command>
  <output>Linux domU-12-31-39-0F-E1-78 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 i686 i386 GNU/Linux
  total 140
  -rw-r--r-- 1 root root 137263 Mar 26  2008 ec2-ami-tools-1.3-19974.noarch.rpm
  -rw-r--r-- 1 root root      0 Mar 26  2008 firstlogin
  </output>
</instance>

Example request (run-on-instance Rackspace Cloudservers):

POST /api/instances/20117112/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 275
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------9b05ece66f4d
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="cmd"

uname -a; ifconfig; pwd
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="password"

myserverqB2Uwk21I
------------------------------9b05ece66f4d--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 13:02:15 GMT
Content-Length: 1781

<instance href='http://localhost:3002/api/instances/20117112' id='20117112'>
  <public_address>
    50.57.117.249
  </public_address>
  <command>
    uname -a; ifconfig; pwd
  </command>
  <output>Linux myserver 2.6.35.4-rscloud #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
  eth0      Link encap:Ethernet  HWaddr 40:40:B1:7A:52:7E
            inet addr:50.57.117.249  Bcast:50.57.117.255  Mask:255.255.255.0
            inet6 addr: fe80::4240:b1ff:fe7a:527e/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:54 errors:0 dropped:0 overruns:0 frame:0
            TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:5880 (5.7 KiB)  TX bytes:6331 (6.1 KiB)
            Interrupt:24

  eth1      Link encap:Ethernet  HWaddr 40:40:8E:4B:52:23
            inet addr:10.182.131.159  Bcast:10.182.159.255  Mask:255.255.224.0
            inet6 addr: fe80::4240:8eff:fe4b:5223/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:3 errors:0 dropped:0 overruns:0 frame:0
            TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:188 (188.0 b)  TX bytes:720 (720.0 b)
            Interrupt:25

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

  /root</output>
</instance>

Create a new instance

To create a new instance use call POST /api/instances. At least, clients must specify the image from which the virtual machine instance is created. Optionally, a client may also specify a hardware profile and a realm (with default values used otherwise). Clients can also provide a name for the new instance though this is not supported by all back-end cloud providers. You can check whether a given feature is available in the response to the Deltacloud server API entry point. The details of the new instance are returned in response to this operation.

To create an instance in the Amazon EC2 cloud a client can also specify the name of the used EC2 keypair as well as the firewalls (EC2 security groups) that the instance should be launched into. The EC2 keypair is specified with the parameter keyname while firewalls are specified sequentially as firewalls1 ... firewalls2 ... etc.

See the example below. The values for public and private addresses are blank in the server response, because they have not yet been assigned by the cloud provider. Subsequent requests for the instance details will provide these values.

As with other POST operations in the Deltacloud API, clients may specify parameters as multipart/form-data or as x-www-url-form-urlencoded content type, as you can see in examples below.

Client request (AWS EC2):

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 107
Content-Type: application/x-www-form-urlencoded

keyname=eftah&image_id=ami-f51aff9c&realm_id=us-east-1c&hwp_id=c1.medium&
firewalls1=default&firewalls2=test

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 1183

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-cbb861aa' id='i-cbb861aa'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-cbb861aa/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-cbb861aa/run;id=i-cbb861aa' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T16:09:45.000Z</launch_time>
  <public_addresses></public_addresses>
  <private_addresses></private_addresses>
  <firewalls>
    <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
  </firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

In the following example you can see that the client provides the optional name parameter and that the created instance uses password type of authentication. Furthermore, the client uses a content-type of application/x-www-form-urlencoded. The username and password are returned with the details of the new instance:

Example request: (Rackspace Cloudservers)

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 34
Content-Type: application/x-www-form-urlencoded

image_id=53&hwp_id=1&name=myserver

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 883

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password>myserver4OvKh7Ak3</password>
    </login>
  </authentication>
</instance>
Ɨ

Note:

The Deltacloud does not report potential errors, if you are creating an instance in vSphere. When you launch an instance, Deltacloud does not wait until the task is finished. Instead of that, Deltacloud creates a YAML representation of the instance in vSphere datastore. The YAML instance is in a 'PENDING' state until the 'real' instance is created. If the real instance fails to create, the YAML representation is removed. However, Deltacloud does not send you any error message.

Keys
;T; I"œl


Instances

An instance represents the core of all cloud compute activity: a running virtual machine. An instance is created from an image, with a specified hardware profile and in a given realm. Each instance can have a number of other attributes, not all of which are exposed for all back-end cloud providers. The full list of possible instance attributes is:

Attribute Meaning
owner_id the id of the cloud provider account that launched the instance
image_id the id of the image from which the instance was launched
name a human readable name for the instance given at launch time
realm_id realm into which the instance was launched
state current state of the instance (e.g. 'running')
actions actions that a client may effect on the instance, based on current state
public_addresses the globally routable IP address of the instance
private_addresses the private IP address of the instance, routable within its private network
instance_profile the specific values of memory, cpu, storage
launch_time timestamp at which the instance was launched
keyname name of authentication key, if this method is used for authentication (e.g. EC2)
username the username for authentication when connecting to the instance
password the password used together with username above
firewalls the firewalls that this instance was launched into (EC2 specific)

Get a list of all current instances

To produce a list of all current instances in the given cloud (belonging to the specified account) use call GET /api/instances. The example below displays instances in the Amazon EC2 cloud.

Example request:

GET /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Client response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 2790
<?xml version='1.0' encoding='utf-8' ?>
<instances>
  <instance href='http://localhost:3001/api/instances/i-1fbc627e' id='i-1fbc627e'>
    <name>ami-f51aff9c</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-1fbc627e/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-1fbc627e/run;id=i-1fbc627e' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:29:48.000Z</launch_time>
    <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
    <name>ami-2b5fba42</name>
    <owner_id>393485797142</owner_id>
    <image href='http://localhost:3001/api/images/ami-2b5fba42' id='ami-2b5fba42'></image>
    <realm href='http://localhost:3001/api/realms/us-east-1d' id='us-east-1d'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1.small' id='m1.small'>
    </hardware_profile>
    <actions>
      <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
      <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
    </actions>
    <launch_time>2011-07-22T11:32:25.000Z</launch_time>
    <public_addresses><address>ec2-184-73-78-87.compute-1.amazonaws.com</address></public_addresses>
    <private_addresses><address>ip-10-196-89-221.ec2.internal</address></private_addresses>
    <firewalls>
      <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
      <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    </firewalls>
    <authentication type='key'>
      <login>
        <keyname>eftah</keyname>
      </login>
    </authentication>
  </instance>
</instances>

Get the details of an instance

To get the details of a specific instance use call GET /api/instances/:id. The example below shows an instance launched in the Rackspace Cloudservers cloud. As you can see, the type of authentication is password but the username and password attributes are blank. The reason why these attributes are blank is that Rackspace only reports these values once, during instance creation and not for subsequent requests. To find an example of the response from an instance go to the Create an instance section.

Example request:

GET /api/instances/20112212?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167
<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Launch an action on an instance

To launch an action on an instance use call POST /api/instances/:id/:action. The valid actions for an instance are specified by the instance states entity. The set of permissible actions that a client may perform on an instance at a given time depends on the current instance state. These are reported by the <actions> attribute in the Deltacloud server response to the GET /api/instances/:id call (Get the details of an instance section). The first example below shows a reboot action on a currently running instance, followed by a stop action.

After invoking the stop operation, the instance state may still be reported as RUNNING in the Deltacloud server response. It is because it may take some time for the instance state to change in the back-end cloud provider (and this will vary between providers). You can assure yourself that the action was performed correctly by requesting a list of instances or a by requesting a specific instance.

The Deltacloud server also allows a special 'run-on-instance' action for some cloud provider instances.This enables a client to perform a command on a running instance over SSH. The Deltacloud server will return the output of that command to the client. This is reported as the run action in the list of instance actions, if it is available. The cmd parameter specifies the command, which is executed on a running instance.The private_key parameter specifies the authentication for cloud providers that expect key based authentication for connecting to instances . For those cloud providers that use username/password for authentication, the password parameter specifies the authentication. Examples below illustrate the run-on-instance feature for an Amazon EC2 instance and a Rackspace Cloudservers instance. The examples differ in how authentication is performed (private RSA Key for EC2 and username/password for Rackspace).

Example request (reboot):

POST /api/instances/i-f3ba6492/reboot?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1322

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-f3ba6492' id='i-f3ba6492'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-f3ba6492/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-f3ba6492/run;id=i-f3ba6492' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T11:29:48.000Z</launch_time>
  <public_addresses><address>ec2-50-16-183-107.compute-1.amazonaws.com</address></public_addresses>
  <private_addresses><address>domU-12-31-39-0F-79-D4.compute-1.internal</address></private_addresses>
  <firewalls>  <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall></firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

Example request (stop):

POST /api/instances/20112212/stop?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1167

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>STOPPED</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/reboot' method='post' rel='reboot' />
    <link href='http://localhost:3002/api/instances/20112212/stop' method='post' rel='stop' />
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
    <link href='http://localhost:3002/api/images;instance_id=20112212' method='post' rel='create_image' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password></password>
    </login>
  </authentication>
</instance>

Example request (run-on-instance Amazon EC2):

Ɨ Note:

Run-on-instance requests to EC2 instances will fail with 502 Bad Gateway - Execution Expired if the firewall in which the instance was launched does not grant SSH access (tcp, port 22) to the requesting client's IP address. This access may be given using the firewalls collection.

POST /api/instances/i-afde73ce/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Content-Length: 1927
Content-Type: multipart/form-data; boundary=----------------------------332ed6691ab8

------------------------------332ed6691ab8
Content-Disposition: form-data; name="cmd"

uname -a; ls -l
------------------------------332ed6691ab8
Content-Disposition: form-data; name="private_key"

-----BEGIN RSA PRIVATE KEY-----.BTTEpATBAAKDAQEA4t3R/PgUo3KDDuX4
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
3NPbG3aHYPSnwsSxkFSG4Q6ukqYlxT9TPF/+wvdxfAtp3nYw3ZGuSX/DOtToWtQ8
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
9Dabu9BVZrl5BTOKlbAgrKnzsGKvaBST/D2.AB/HB9/GOT36OoBmEr1y9gFwu4Xf
aKw+AXVf9y9TKxVD3TE5uB.oDZG8s4gr2e691xHG9YGzBBBbNzfFh94b3Td5JBGS
zRDTKYBfOgv+Zu5N+WyeaZ0ab50DwK9BXYB5hsRu5zbAqObbTZkwN9qwBOZHzATX
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
qo2VP5WDZeOhRWEUY96./pWN3hNFDkT44vDpeXQUh3rBHyD5DWvWxAze9Ds+UTO/
esuLwP5vXhfoYp6gV9XG.BEBzSVq8kZ2kZtlbWHTR/SGepTkDgYEA9zwHTDhtKR2
KS8/BSFZQ884ZqFkbwT9fTW6s0rgUSBDTUDgYEA9W5HXTOEPGFDnqBhKPLN.xD9D
vZZpZuXFkAA/5X2lFRY2/xsQqbPz9utPOsUoPf9Aajy+.vGRJrO2KAJ9U/JTNDzr
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
F/+GvHTHKDQSB+TeEs1Sa/PFwxpspB+RqHbqOTWPsFOHL+9sZGTqd6D4B.R6DBNh
wVTZU+eTz.39OZPqu4fQwrBN13lDbUoZxlqT9g2+haQBB9sTDzQEZ08QKBgQDJyw
lBBZqQKBgQDz5E2rL59lNS5pBxDO9r6B9rXtBBTZ5tZUWNFRvyNsxY5nJT03.KDw
DAAeVWKU1OyDXfN4v6Zn1nNrhSkdrd+XV0nTLExsfg==.-----END RSA PRIVAT
E KEY-----
------------------------------332ed6691ab8--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 12:56:02 GMT
Content-Length: 497

<instance href='http://localhost:3001/api/instances/i-afde73ce' id='i-afde73ce'>
  <public_address>
    ec2-50-19-59-126.compute-1.amazonaws.com
  </public_address>
  <command>
    uname -a; ls -l
  </command>
  <output>Linux domU-12-31-39-0F-E1-78 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 i686 i386 GNU/Linux
  total 140
  -rw-r--r-- 1 root root 137263 Mar 26  2008 ec2-ami-tools-1.3-19974.noarch.rpm
  -rw-r--r-- 1 root root      0 Mar 26  2008 firstlogin
  </output>
</instance>

Example request (run-on-instance Rackspace Cloudservers):

POST /api/instances/20117112/run?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 275
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------9b05ece66f4d
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="cmd"

uname -a; ifconfig; pwd
------------------------------9b05ece66f4d
Content-Disposition: form-data; name="password"

myserverqB2Uwk21I
------------------------------9b05ece66f4d--

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Mon, 25 Jul 2011 13:02:15 GMT
Content-Length: 1781

<instance href='http://localhost:3002/api/instances/20117112' id='20117112'>
  <public_address>
    50.57.117.249
  </public_address>
  <command>
    uname -a; ifconfig; pwd
  </command>
  <output>Linux myserver 2.6.35.4-rscloud #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
  eth0      Link encap:Ethernet  HWaddr 40:40:B1:7A:52:7E
            inet addr:50.57.117.249  Bcast:50.57.117.255  Mask:255.255.255.0
            inet6 addr: fe80::4240:b1ff:fe7a:527e/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:54 errors:0 dropped:0 overruns:0 frame:0
            TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:5880 (5.7 KiB)  TX bytes:6331 (6.1 KiB)
            Interrupt:24

  eth1      Link encap:Ethernet  HWaddr 40:40:8E:4B:52:23
            inet addr:10.182.131.159  Bcast:10.182.159.255  Mask:255.255.224.0
            inet6 addr: fe80::4240:8eff:fe4b:5223/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:3 errors:0 dropped:0 overruns:0 frame:0
            TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:188 (188.0 b)  TX bytes:720 (720.0 b)
            Interrupt:25

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

  /root</output>
</instance>

Create a new instance

To create a new instance use call POST /api/instances. At least, clients must specify the image from which the virtual machine instance is created. Optionally, a client may also specify a hardware profile and a realm (with default values used otherwise). Clients can also provide a name for the new instance though this is not supported by all back-end cloud providers. You can check whether a given feature is available in the response to the Deltacloud server API entry point. The details of the new instance are returned in response to this operation.

To create an instance in the Amazon EC2 cloud a client can also specify the name of the used EC2 keypair as well as the firewalls (EC2 security groups) that the instance should be launched into. The EC2 keypair is specified with the parameter keyname while firewalls are specified sequentially as firewalls1 ... firewalls2 ... etc.

See the example below. The values for public and private addresses are blank in the server response, because they have not yet been assigned by the cloud provider. Subsequent requests for the instance details will provide these values.

As with other POST operations in the Deltacloud API, clients may specify parameters as multipart/form-data or as x-www-url-form-urlencoded content type, as you can see in examples below.

Client request (AWS EC2):

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 107
Content-Type: application/x-www-form-urlencoded

keyname=eftah&image_id=ami-f51aff9c&realm_id=us-east-1c&hwp_id=c1.medium&
firewalls1=default&firewalls2=test

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 1183

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances/i-cbb861aa' id='i-cbb861aa'>
  <name>ami-f51aff9c</name>
  <owner_id>393485797142</owner_id>
  <image href='http://localhost:3001/api/images/ami-f51aff9c' id='ami-f51aff9c'></image>
  <realm href='http://localhost:3001/api/realms/us-east-1c' id='us-east-1c'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3001/api/hardware_profiles/c1.medium' id='c1.medium'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3001/api/instances/i-cbb861aa/stop' method='post' rel='stop' />
    <link href='http://localhost:3001/api/instances/i-cbb861aa/run;id=i-cbb861aa' method='post' rel='run' />
  </actions>
  <launch_time>2011-07-22T16:09:45.000Z</launch_time>
  <public_addresses></public_addresses>
  <private_addresses></private_addresses>
  <firewalls>
    <firewall href='http://localhost:3001/api/firewalls/test' id='test'></firewall>
    <firewall href='http://localhost:3001/api/firewalls/default' id='default'></firewall>
  </firewalls>
  <authentication type='key'>
    <login>
      <keyname>eftah</keyname>
    </login>
  </authentication>
</instance>

In the following example you can see that the client provides the optional name parameter and that the created instance uses password type of authentication. Furthermore, the client uses a content-type of application/x-www-form-urlencoded. The username and password are returned with the details of the new instance:

Example request: (Rackspace Cloudservers)

POST /api/instances?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3002
Accept: */*
Content-Length: 34
Content-Type: application/x-www-form-urlencoded

image_id=53&hwp_id=1&name=myserver

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 883

<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3002/api/instances/20112212' id='20112212'>
  <name>myserver</name>
  <owner_id>mandreou</owner_id>
  <image href='http://localhost:3002/api/images/53' id='53'></image>
  <realm href='http://localhost:3002/api/realms/us' id='us'></realm>
  <state>PENDING</state>
  <hardware_profile href='http://localhost:3002/api/hardware_profiles/1' id='1'>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3002/api/instances/20112212/run;id=20112212' method='post' rel='run' />
  </actions>
  <public_addresses><address>50.57.116.72</address></public_addresses>
  <private_addresses><address>10.182.143.64</address></private_addresses>
  <authentication type='password'>
    <login>
      <username>root</username>
      <password>myserver4OvKh7Ak3</password>
    </login>
  </authentication>
</instance>
Ɨ

Note:

The Deltacloud does not report potential errors, if you are creating an instance in vSphere. When you launch an instance, Deltacloud does not wait until the task is finished. Instead of that, Deltacloud creates a YAML representation of the instance in vSphere datastore. The YAML instance is in a 'PENDING' state until the 'real' instance is created. If the real instance fails to create, the YAML representation is removed. However, Deltacloud does not send you any error message.

Keys


;T; @ŸI"/libdeltacloud/;T{;{ ;I" Libdeltacloud
;T; I";F; I";F; @„I"/blob-storage/;T{;{ ;I"L] Blob storage


Blob Storage

Blob storage represents a generic key ==> value data store, as implemented for example by Amazon S3 or Openstack swift. In Deltacloud, the organisational unit of blob storage is a bucket. Individual data items - blobs are exposed as a subcollection under each bucket.

A bucket has

  • a name;
  • a size (denotes the number of blobs it contains); and
  • a list of links to each blob.

A blob has:



Get a list of all buckets

To return a list of all buckets belonging to the given cloud provider account use call GET /api/buckets. The response from the Deltacloud server includes the name and URI of each bucket but not the size or the list of blobs which the bucket contains. These details are available when a client requests (GETs) a specific bucket.

Example request:

GET /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 597
<?xml version='1.0' encoding='utf-8' ?>
<buckets>
  <bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
    <name>mybucket1</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket2' id='mybucket2'>
    <name>mybucket2</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket3' id='mybucket3'>
    <name>mybucket3</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket4' id='mybucket4'>
    <name>mybucket4</name>
    <size></size>
  </bucket>
</buckets>

Get the details of a specific bucket

To return details of a specific bucket use call GET /api/buckets/:id. The Deltacloud server response includes the size of the bucket and the URI for each blob object that it contains.

Example request:

GET /api/buckets/mybucket1?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 534
<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
  <name>mybucket1</name>
  <size>4</size>
  <blob href='http://localhost:3001/api/buckets/mybucket1/myfile' id='myfile'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/an_object' id='an_object'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/picture_blob' id='picture_blob'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/some_blob id='some_blob'></blob>
</bucket>

Create a new bucket

To create a new bucket use call POST /api/buckets. You need to specify the name as a parameter. Optionally for Amazon S3 buckets, you can specify a bucket location with the location parameter, as per Regions and Endpoints for Amazon Simple Storage Service. Valid values for S3 bucket location parameter are: "us-west-1", "EU", "ap-southeast-1", "ap-northeast-1" (while not specifying a location default to the "US Standard" region). Note that clients may specify parameters as multipart/form-data or using a content-type of application/x-www-form-urlencoded.

On succesful creation this call will return a 201 HTTP status, specifying the URI of the newly created bucket in the Location header and the newly created bucket object in the response message body. The example request below shows how to create a new bucket in the EU (Ireland) region. If the given back-end cloud does not support locations then the location parameter is ignored.

Example request:

POST /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

name=mybucketeurope&location=EU

Server response:

HTTP/1.1 201 Created
Location: http://localhost:3001/api/buckets/mybucketeurope
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucketeurope' id='mybucketeurope'>
  <name>mybucketeurope</name>
  <size>0</size>
</bucket>

Delete a bucket

To delete the specified bucket use call DELETE /api/buckets/:id. The bucket must be empty (otherwise the call will fail with an error response). A succesful operation will return 204 No Content.

Example request:

DELETE /api/buckets/mybucketeurope?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content

Get the details of a blob

To retrieve the details of a specific blob use call GET /api/buckets/:bucket_id/:blob_id. The blob content is not returned as part of the response but rather a URI is given from which the content may be retrieved as shown below.

Example request:

GET /api/buckets/mariosbucket1/some_more_blob_woo?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 586
<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo' id='some_more_blob_woo'>
  <bucket>mariosbucket1</bucket>
  <content_length>86</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Fri Jan 28 12:23:08 UTC 2011</last_modified>
  <user_metadata>
    <entry key='v'>
      <![CDATA[0.2.0]]>
    </entry>
    <entry key='test'>
      <![CDATA[value]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo/content'></content>
</blob>

Get the actual blob content

To retrieve the actual blob content use call GET /api/buckets/:bucket_id/:blob_id/content. The location of blob content is specified in the content URI returned from the GET /api/buckets/:bucket_id/:blob_id call. The content is streamed through the Deltacloud server as soon as it is received from the back-end cloud provider. The aim is to avoid the creation of a temporary file (especially significant in case of large blobs). The Deltacloud server sets Content-Disposition: attachment; filename=blob_name in the HTTP response headers.

Example request:

GET /api/buckets/mariosanotherbucketohyeah/Im_a_blob_beholdme/content?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=Im_a_blob_beholdme
Content-Type: text/plain
Content-Length: 50

<BLOB DATA HERE>

Create a blob object

To create a blob object and set its content use call PUT /api/buckets/:bucket_id/:blob_id. If the blob already exists then its data and metadata are overwritten with those specified in this call. The request must specify the name of the blob and the name of the bucket in which the blob is to be placed in the call URI. The client must also specify the content_length of the blob data and the blob data itself in the HTTP headers. Optionally the call may also specify a content_type and any number of key:value pairs of user defined metadata. User metadata is defined using 'X-Deltacloud-Blobmeta-' header, e.g. X-Deltacloud-Blobmeta-Version:2.1.

To eliminate the necessity of creating a local file at the Deltacloud server for each blob created, the Deltacloud server starts to stream the blob data to the back-end cloud provider as soon as the request headers are processed. A succesful operation will return the newly created blob object, as shown below.

Example request:

PUT /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
Content-Type: text/plain
Content-Length: 128988
X-Deltacloud-Blobmeta-Version:2.1
X-Deltacloud-Blobmeta-Author:msa

... BLOB DATA ...

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>128988</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Wed Jul 13 13:27:22 UTC 2011</last_modified>
  <user_metadata>
    <entry key='author'>
      <![CDATA[msa]]>
    </entry>
    <entry key='version'>
      <![CDATA[2.1]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

The Deltacloud server also responds to an alternative POST /api/buckets/:bucket_id route for creating or updating a blob object. As with the PUT method for creating/updating a blob, the client must specify the bucket in which the blob is to be created through the call URI (i.e. you POST to the specified bucket). The rest of the required fields, that is, the name of the blob, the blob_data and the content-length are specified by the client as multipart/form-data (i.e. in HTTP POST form fields).

In order to specify the optional user metadata for a given blob the client must set the form field meta_params to specify the number of metadata key/value pairs. The metadata itself is then specified by the client with fields of the form meta_nameN and meta_valueN where N is an integer from 1 up to the number specified by the meta_params field (e.g. meta_name1=author, meta_value1=jrd).

It should be noted that the POST method for creating a blob is non streaming - the Deltacloud server will create a temporary file with the blob data, before the file is transferred to the backend cloud. Thus, it should only be used for blobs with a relatively small content-length and in general the PUT method should be preferred for larger blobs. This POST method is mainly provided for clients that cannot easily invoke a HTTP PUT operation (e.g. web browsers) and can be used for creating/updating a blob through the deltacloud HTML interface (provided for testing purposes).

Example request:

POST /api/buckets/mybucket?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) libcurl/7.20.1 N
Accept: */*
Content-Length: 113582
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------517f5f2df858

------------------------------517f5f2df858
Content-Disposition: form-data; name="blob"

12Jul2011blob
------------------------------517f5f2df858
Content-Disposition: form-data; name="blob_data"; filename="small.txt"
Content-Type: text/plain

<THE_BLOB_DATA_HERE>

------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_params"

2
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name1"

author
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value1"
jjs
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name2"

version
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value2"

2.2
------------------------------517f5f2df858--

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>112766</content_length>
  <content_type>text/plain</content_type>
  <last_modified></last_modified>
  <user_metadata>
    <entry key='x-amz-meta-author'>
      <![CDATA[jjs]]>
    </entry>
    <entry key='x-amz-meta-version'>
      <![CDATA[2.2]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

Delete a blob object

To delete the specified blob object from the back-end cloud use call DELETE /api/buckets/:bucket_id/:blob_id. The names of the blob and the bucket in which this exists are specified the in call URI. After a succesful operation the Deltacloud server responds with a HTTP 204 (No Content) with no message body.

Example request:

DELETE /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Connection: close
Server: thin 1.2.11

Get all metadata fields

To return all user defined metadata fields on a specified blob URI use the HTTP HEAD operation HEAD /api/buckets/:bucket_id/:blob_id. As per RFC 2616 this HEAD operation does not return a message body. Rather, the blob user metadata values are returned in the response X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-version:1.2).

Example request:

HEAD /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-version: 1.21
X-Deltacloud-Blobmeta-author: jrd

Update the user-defined blob metadata

To update the user-defined blob metadata use call POST /api/buckets/:bucket_id/:blob_id on the URI of a blob. This operation will overwrite all previously set user-metadata values (if any) and replace them with those specified in this call. The client must set the user-defined metadata in the X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-Model:2012).

Example request:

POST /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey
;T; I"ŚG

Blob Storage

Blob storage represents a generic key ==> value data store, as implemented for example by Amazon S3 or Openstack swift. In Deltacloud, the organisational unit of blob storage is a bucket. Individual data items - blobs are exposed as a subcollection under each bucket.

A bucket has

A blob has:



Get a list of all buckets

To return a list of all buckets belonging to the given cloud provider account use call GET /api/buckets. The response from the Deltacloud server includes the name and URI of each bucket but not the size or the list of blobs which the bucket contains. These details are available when a client requests (GETs) a specific bucket.

Example request:

GET /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 597
<?xml version='1.0' encoding='utf-8' ?>
<buckets>
  <bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
    <name>mybucket1</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket2' id='mybucket2'>
    <name>mybucket2</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket3' id='mybucket3'>
    <name>mybucket3</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket4' id='mybucket4'>
    <name>mybucket4</name>
    <size></size>
  </bucket>
</buckets>

Get the details of a specific bucket

To return details of a specific bucket use call GET /api/buckets/:id. The Deltacloud server response includes the size of the bucket and the URI for each blob object that it contains.

Example request:

GET /api/buckets/mybucket1?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 534
<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
  <name>mybucket1</name>
  <size>4</size>
  <blob href='http://localhost:3001/api/buckets/mybucket1/myfile' id='myfile'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/an_object' id='an_object'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/picture_blob' id='picture_blob'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/some_blob id='some_blob'></blob>
</bucket>

Create a new bucket

To create a new bucket use call POST /api/buckets. You need to specify the name as a parameter. Optionally for Amazon S3 buckets, you can specify a bucket location with the location parameter, as per Regions and Endpoints for Amazon Simple Storage Service. Valid values for S3 bucket location parameter are: "us-west-1", "EU", "ap-southeast-1", "ap-northeast-1" (while not specifying a location default to the "US Standard" region). Note that clients may specify parameters as multipart/form-data or using a content-type of application/x-www-form-urlencoded.

On succesful creation this call will return a 201 HTTP status, specifying the URI of the newly created bucket in the Location header and the newly created bucket object in the response message body. The example request below shows how to create a new bucket in the EU (Ireland) region. If the given back-end cloud does not support locations then the location parameter is ignored.

Example request:

POST /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

name=mybucketeurope&location=EU

Server response:

HTTP/1.1 201 Created
Location: http://localhost:3001/api/buckets/mybucketeurope
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucketeurope' id='mybucketeurope'>
  <name>mybucketeurope</name>
  <size>0</size>
</bucket>

Delete a bucket

To delete the specified bucket use call DELETE /api/buckets/:id. The bucket must be empty (otherwise the call will fail with an error response). A succesful operation will return 204 No Content.

Example request:

DELETE /api/buckets/mybucketeurope?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content

Get the details of a blob

To retrieve the details of a specific blob use call GET /api/buckets/:bucket_id/:blob_id. The blob content is not returned as part of the response but rather a URI is given from which the content may be retrieved as shown below.

Example request:

GET /api/buckets/mariosbucket1/some_more_blob_woo?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 586
<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo' id='some_more_blob_woo'>
  <bucket>mariosbucket1</bucket>
  <content_length>86</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Fri Jan 28 12:23:08 UTC 2011</last_modified>
  <user_metadata>
    <entry key='v'>
      <![CDATA[0.2.0]]>
    </entry>
    <entry key='test'>
      <![CDATA[value]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo/content'></content>
</blob>

Get the actual blob content

To retrieve the actual blob content use call GET /api/buckets/:bucket_id/:blob_id/content. The location of blob content is specified in the content URI returned from the GET /api/buckets/:bucket_id/:blob_id call. The content is streamed through the Deltacloud server as soon as it is received from the back-end cloud provider. The aim is to avoid the creation of a temporary file (especially significant in case of large blobs). The Deltacloud server sets Content-Disposition: attachment; filename=blob_name in the HTTP response headers.

Example request:

GET /api/buckets/mariosanotherbucketohyeah/Im_a_blob_beholdme/content?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=Im_a_blob_beholdme
Content-Type: text/plain
Content-Length: 50

<BLOB DATA HERE>

Create a blob object

To create a blob object and set its content use call PUT /api/buckets/:bucket_id/:blob_id. If the blob already exists then its data and metadata are overwritten with those specified in this call. The request must specify the name of the blob and the name of the bucket in which the blob is to be placed in the call URI. The client must also specify the content_length of the blob data and the blob data itself in the HTTP headers. Optionally the call may also specify a content_type and any number of key:value pairs of user defined metadata. User metadata is defined using 'X-Deltacloud-Blobmeta-' header, e.g. X-Deltacloud-Blobmeta-Version:2.1.

To eliminate the necessity of creating a local file at the Deltacloud server for each blob created, the Deltacloud server starts to stream the blob data to the back-end cloud provider as soon as the request headers are processed. A succesful operation will return the newly created blob object, as shown below.

Example request:

PUT /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
Content-Type: text/plain
Content-Length: 128988
X-Deltacloud-Blobmeta-Version:2.1
X-Deltacloud-Blobmeta-Author:msa

... BLOB DATA ...

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>128988</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Wed Jul 13 13:27:22 UTC 2011</last_modified>
  <user_metadata>
    <entry key='author'>
      <![CDATA[msa]]>
    </entry>
    <entry key='version'>
      <![CDATA[2.1]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

The Deltacloud server also responds to an alternative POST /api/buckets/:bucket_id route for creating or updating a blob object. As with the PUT method for creating/updating a blob, the client must specify the bucket in which the blob is to be created through the call URI (i.e. you POST to the specified bucket). The rest of the required fields, that is, the name of the blob, the blob_data and the content-length are specified by the client as multipart/form-data (i.e. in HTTP POST form fields).

In order to specify the optional user metadata for a given blob the client must set the form field meta_params to specify the number of metadata key/value pairs. The metadata itself is then specified by the client with fields of the form meta_nameN and meta_valueN where N is an integer from 1 up to the number specified by the meta_params field (e.g. meta_name1=author, meta_value1=jrd).

It should be noted that the POST method for creating a blob is non streaming - the Deltacloud server will create a temporary file with the blob data, before the file is transferred to the backend cloud. Thus, it should only be used for blobs with a relatively small content-length and in general the PUT method should be preferred for larger blobs. This POST method is mainly provided for clients that cannot easily invoke a HTTP PUT operation (e.g. web browsers) and can be used for creating/updating a blob through the deltacloud HTML interface (provided for testing purposes).

Example request:

POST /api/buckets/mybucket?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) libcurl/7.20.1 N
Accept: */*
Content-Length: 113582
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------517f5f2df858

------------------------------517f5f2df858
Content-Disposition: form-data; name="blob"

12Jul2011blob
------------------------------517f5f2df858
Content-Disposition: form-data; name="blob_data"; filename="small.txt"
Content-Type: text/plain

<THE_BLOB_DATA_HERE>

------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_params"

2
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name1"

author
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value1"
jjs
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name2"

version
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value2"

2.2
------------------------------517f5f2df858--

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>112766</content_length>
  <content_type>text/plain</content_type>
  <last_modified></last_modified>
  <user_metadata>
    <entry key='x-amz-meta-author'>
      <![CDATA[jjs]]>
    </entry>
    <entry key='x-amz-meta-version'>
      <![CDATA[2.2]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

Delete a blob object

To delete the specified blob object from the back-end cloud use call DELETE /api/buckets/:bucket_id/:blob_id. The names of the blob and the bucket in which this exists are specified the in call URI. After a succesful operation the Deltacloud server responds with a HTTP 204 (No Content) with no message body.

Example request:

DELETE /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Connection: close
Server: thin 1.2.11

Get all metadata fields

To return all user defined metadata fields on a specified blob URI use the HTTP HEAD operation HEAD /api/buckets/:bucket_id/:blob_id. As per RFC 2616 this HEAD operation does not return a message body. Rather, the blob user metadata values are returned in the response X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-version:1.2).

Example request:

HEAD /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-version: 1.21
X-Deltacloud-Blobmeta-author: jrd

Update the user-defined blob metadata

To update the user-defined blob metadata use call POST /api/buckets/:bucket_id/:blob_id on the URI of a blob. This operation will overwrite all previously set user-metadata values (if any) and replace them with those specified in this call. The client must set the user-defined metadata in the X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-Model:2012).

Example request:

POST /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey
;T; I"ĪG


Blob Storage

Blob storage represents a generic key ==> value data store, as implemented for example by Amazon S3 or Openstack swift. In Deltacloud, the organisational unit of blob storage is a bucket. Individual data items - blobs are exposed as a subcollection under each bucket.

A bucket has

  • a name;
  • a size (denotes the number of blobs it contains); and
  • a list of links to each blob.

A blob has:



Get a list of all buckets

To return a list of all buckets belonging to the given cloud provider account use call GET /api/buckets. The response from the Deltacloud server includes the name and URI of each bucket but not the size or the list of blobs which the bucket contains. These details are available when a client requests (GETs) a specific bucket.

Example request:

GET /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 597
<?xml version='1.0' encoding='utf-8' ?>
<buckets>
  <bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
    <name>mybucket1</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket2' id='mybucket2'>
    <name>mybucket2</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket3' id='mybucket3'>
    <name>mybucket3</name>
    <size></size>
  </bucket>
  <bucket href='http://localhost:3001/api/buckets/mybucket4' id='mybucket4'>
    <name>mybucket4</name>
    <size></size>
  </bucket>
</buckets>

Get the details of a specific bucket

To return details of a specific bucket use call GET /api/buckets/:id. The Deltacloud server response includes the size of the bucket and the URI for each blob object that it contains.

Example request:

GET /api/buckets/mybucket1?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 534
<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucket1' id='mybucket1'>
  <name>mybucket1</name>
  <size>4</size>
  <blob href='http://localhost:3001/api/buckets/mybucket1/myfile' id='myfile'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/an_object' id='an_object'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/picture_blob' id='picture_blob'></blob>
  <blob href='http://localhost:3001/api/buckets/mybucket1/some_blob id='some_blob'></blob>
</bucket>

Create a new bucket

To create a new bucket use call POST /api/buckets. You need to specify the name as a parameter. Optionally for Amazon S3 buckets, you can specify a bucket location with the location parameter, as per Regions and Endpoints for Amazon Simple Storage Service. Valid values for S3 bucket location parameter are: "us-west-1", "EU", "ap-southeast-1", "ap-northeast-1" (while not specifying a location default to the "US Standard" region). Note that clients may specify parameters as multipart/form-data or using a content-type of application/x-www-form-urlencoded.

On succesful creation this call will return a 201 HTTP status, specifying the URI of the newly created bucket in the Location header and the newly created bucket object in the response message body. The example request below shows how to create a new bucket in the EU (Ireland) region. If the given back-end cloud does not support locations then the location parameter is ignored.

Example request:

POST /api/buckets?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

name=mybucketeurope&location=EU

Server response:

HTTP/1.1 201 Created
Location: http://localhost:3001/api/buckets/mybucketeurope
Content-Type: application/xml
Content-Length: 182

<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3001/api/buckets/mybucketeurope' id='mybucketeurope'>
  <name>mybucketeurope</name>
  <size>0</size>
</bucket>

Delete a bucket

To delete the specified bucket use call DELETE /api/buckets/:id. The bucket must be empty (otherwise the call will fail with an error response). A succesful operation will return 204 No Content.

Example request:

DELETE /api/buckets/mybucketeurope?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content

Get the details of a blob

To retrieve the details of a specific blob use call GET /api/buckets/:bucket_id/:blob_id. The blob content is not returned as part of the response but rather a URI is given from which the content may be retrieved as shown below.

Example request:

GET /api/buckets/mariosbucket1/some_more_blob_woo?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 586
<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo' id='some_more_blob_woo'>
  <bucket>mariosbucket1</bucket>
  <content_length>86</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Fri Jan 28 12:23:08 UTC 2011</last_modified>
  <user_metadata>
    <entry key='v'>
      <![CDATA[0.2.0]]>
    </entry>
    <entry key='test'>
      <![CDATA[value]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mariosbucket1/some_more_blob_woo/content'></content>
</blob>

Get the actual blob content

To retrieve the actual blob content use call GET /api/buckets/:bucket_id/:blob_id/content. The location of blob content is specified in the content URI returned from the GET /api/buckets/:bucket_id/:blob_id call. The content is streamed through the Deltacloud server as soon as it is received from the back-end cloud provider. The aim is to avoid the creation of a temporary file (especially significant in case of large blobs). The Deltacloud server sets Content-Disposition: attachment; filename=blob_name in the HTTP response headers.

Example request:

GET /api/buckets/mariosanotherbucketohyeah/Im_a_blob_beholdme/content?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=Im_a_blob_beholdme
Content-Type: text/plain
Content-Length: 50

<BLOB DATA HERE>

Create a blob object

To create a blob object and set its content use call PUT /api/buckets/:bucket_id/:blob_id. If the blob already exists then its data and metadata are overwritten with those specified in this call. The request must specify the name of the blob and the name of the bucket in which the blob is to be placed in the call URI. The client must also specify the content_length of the blob data and the blob data itself in the HTTP headers. Optionally the call may also specify a content_type and any number of key:value pairs of user defined metadata. User metadata is defined using 'X-Deltacloud-Blobmeta-' header, e.g. X-Deltacloud-Blobmeta-Version:2.1.

To eliminate the necessity of creating a local file at the Deltacloud server for each blob created, the Deltacloud server starts to stream the blob data to the back-end cloud provider as soon as the request headers are processed. A succesful operation will return the newly created blob object, as shown below.

Example request:

PUT /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
Content-Type: text/plain
Content-Length: 128988
X-Deltacloud-Blobmeta-Version:2.1
X-Deltacloud-Blobmeta-Author:msa

... BLOB DATA ...

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>128988</content_length>
  <content_type>text/plain</content_type>
  <last_modified>Wed Jul 13 13:27:22 UTC 2011</last_modified>
  <user_metadata>
    <entry key='author'>
      <![CDATA[msa]]>
    </entry>
    <entry key='version'>
      <![CDATA[2.1]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

The Deltacloud server also responds to an alternative POST /api/buckets/:bucket_id route for creating or updating a blob object. As with the PUT method for creating/updating a blob, the client must specify the bucket in which the blob is to be created through the call URI (i.e. you POST to the specified bucket). The rest of the required fields, that is, the name of the blob, the blob_data and the content-length are specified by the client as multipart/form-data (i.e. in HTTP POST form fields).

In order to specify the optional user metadata for a given blob the client must set the form field meta_params to specify the number of metadata key/value pairs. The metadata itself is then specified by the client with fields of the form meta_nameN and meta_valueN where N is an integer from 1 up to the number specified by the meta_params field (e.g. meta_name1=author, meta_value1=jrd).

It should be noted that the POST method for creating a blob is non streaming - the Deltacloud server will create a temporary file with the blob data, before the file is transferred to the backend cloud. Thus, it should only be used for blobs with a relatively small content-length and in general the PUT method should be preferred for larger blobs. This POST method is mainly provided for clients that cannot easily invoke a HTTP PUT operation (e.g. web browsers) and can be used for creating/updating a blob through the deltacloud HTML interface (provided for testing purposes).

Example request:

POST /api/buckets/mybucket?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) libcurl/7.20.1 N
Accept: */*
Content-Length: 113582
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------517f5f2df858

------------------------------517f5f2df858
Content-Disposition: form-data; name="blob"

12Jul2011blob
------------------------------517f5f2df858
Content-Disposition: form-data; name="blob_data"; filename="small.txt"
Content-Type: text/plain

<THE_BLOB_DATA_HERE>

------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_params"

2
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name1"

author
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value1"
jjs
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_name2"

version
------------------------------517f5f2df858
Content-Disposition: form-data; name="meta_value2"

2.2
------------------------------517f5f2df858--

Server response:

<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob' id='12Jul2011blob'>
  <bucket>mybucket</bucket>
  <content_length>112766</content_length>
  <content_type>text/plain</content_type>
  <last_modified></last_modified>
  <user_metadata>
    <entry key='x-amz-meta-author'>
      <![CDATA[jjs]]>
    </entry>
    <entry key='x-amz-meta-version'>
      <![CDATA[2.2]]>
    </entry>
  </user_metadata>
  <content href='http://localhost:3001/api/buckets/mybucket/12Jul2011blob/content'>
  </content>
</blob>

Delete a blob object

To delete the specified blob object from the back-end cloud use call DELETE /api/buckets/:bucket_id/:blob_id. The names of the blob and the bucket in which this exists are specified the in call URI. After a succesful operation the Deltacloud server responds with a HTTP 204 (No Content) with no message body.

Example request:

DELETE /api/buckets/mybucket/12Jul2011blob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Connection: close
Server: thin 1.2.11

Get all metadata fields

To return all user defined metadata fields on a specified blob URI use the HTTP HEAD operation HEAD /api/buckets/:bucket_id/:blob_id. As per RFC 2616 this HEAD operation does not return a message body. Rather, the blob user metadata values are returned in the response X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-version:1.2).

Example request:

HEAD /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-version: 1.21
X-Deltacloud-Blobmeta-author: jrd

Update the user-defined blob metadata

To update the user-defined blob metadata use call POST /api/buckets/:bucket_id/:blob_id on the URI of a blob. This operation will overwrite all previously set user-metadata values (if any) and replace them with those specified in this call. The client must set the user-defined metadata in the X-Deltacloud-Blobmeta- headers (e.g., X-Deltacloud-Blobmeta-Model:2012).

Example request:

POST /api/buckets/mybucket/myblob?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1
Host: localhost:3001
Accept: */*
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey

Server response:

HTTP/1.1 204 No Content
X-Deltacloud-Blobmeta-model: 2012
X-Deltacloud-Blobmeta-paint: Stannite_Grey
;T; @«I"/ruby-client/;T{;{ ;I"˜# The Deltacloud Ruby Client


Working with Deltacloud Ruby Client

Each type of a resource has an associated model. Where resource refers to other resources, natural navigation across the object model is possible. For example:

puts instance.image.name
puts instance.hardware_profile.architecture

Listing realms

Retrieve a complete list of realms available to you:

realm = client.realms

You can access a specific realm by adding its identifier:

realm = client.realm( 'us' )

Listing hardware profiles

Display a complete list of hardware profiles available for launching machines:

hwp = client.hardware_profiles

You can filter hardware profiles by architecture.

hardware_profiles = client.hardware_profiles( :architecture=>'x86_64' )

Retrieve a specific hardware profile by its identifier:

hardware_profile = client.hardware_profile( 'm1-small' )

Listing images

Return a complete list of images:

images = client.images

Retrieve a list of images owned by the currently authenticated user:

images = client.images( :owner_id=>:self )

You can also retrieve a list of images visible to you but owned by a specific user:

images = client.images( :owner_id=>'daryll' )

Access a specific image by its identifier:

image = client.image( 'ami-8675309' )

Listing instances

Get a list of all instances visible to you:

instances = client.instances

Retrieve a list of all running instances:

instances = client.instances( :state =>:running )

Look up the first instance in the list:

instance = client.instances.first

Find a specific instance by its identifier:

instance = client.instance( 'i-90125' )

Launching instances

Launch an instance using an image identifier:

instance = client.create_instance(image_id)

You may specify a hardware profile:

instance = client.create_instance(image_id, :hwp_id => 'm1-small')

To create new instance, you can also use the 'user_name' feature:

instance = client.create_instance(image_id, :name => 'myinst1')

Manipulating instances

Start an instance:

instance.start!

Execute the 'reboot' operation:

instance.reboot!

Destroy an instance:

instance.destroy!


For more details on Deltacloud Ruby client see the full documentation.

Back


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"ē

Working with Deltacloud Ruby Client

Each type of a resource has an associated model. Where resource refers to other resources, natural navigation across the object model is possible. For example:

puts instance.image.name
puts instance.hardware_profile.architecture

Listing realms

Retrieve a complete list of realms available to you:

realm = client.realms

You can access a specific realm by adding its identifier:

realm = client.realm( 'us' )

Listing hardware profiles

Display a complete list of hardware profiles available for launching machines:

hwp = client.hardware_profiles

You can filter hardware profiles by architecture.

hardware_profiles = client.hardware_profiles( :architecture=>'x86_64' )

Retrieve a specific hardware profile by its identifier:

hardware_profile = client.hardware_profile( 'm1-small' )

Listing images

Return a complete list of images:

images = client.images

Retrieve a list of images owned by the currently authenticated user:

images = client.images( :owner_id=>:self )

You can also retrieve a list of images visible to you but owned by a specific user:

images = client.images( :owner_id=>'daryll' )

Access a specific image by its identifier:

image = client.image( 'ami-8675309' )

Listing instances

Get a list of all instances visible to you:

instances = client.instances

Retrieve a list of all running instances:

instances = client.instances( :state =>:running )

Look up the first instance in the list:

instance = client.instances.first

Find a specific instance by its identifier:

instance = client.instance( 'i-90125' )

Launching instances

Launch an instance using an image identifier:

instance = client.create_instance(image_id)

You may specify a hardware profile:

instance = client.create_instance(image_id, :hwp_id => 'm1-small')

To create new instance, you can also use the 'user_name' feature:

instance = client.create_instance(image_id, :name => 'myinst1')

Manipulating instances

Start an instance:

instance.start!

Execute the 'reboot' operation:

instance.reboot!

Destroy an instance:

instance.destroy!

For more details on Deltacloud Ruby client see the full documentation.

Back
;T; I" 


Working with Deltacloud Ruby Client

Each type of a resource has an associated model. Where resource refers to other resources, natural navigation across the object model is possible. For example:

puts instance.image.name
puts instance.hardware_profile.architecture

Listing realms

Retrieve a complete list of realms available to you:

realm = client.realms

You can access a specific realm by adding its identifier:

realm = client.realm( 'us' )

Listing hardware profiles

Display a complete list of hardware profiles available for launching machines:

hwp = client.hardware_profiles

You can filter hardware profiles by architecture.

hardware_profiles = client.hardware_profiles( :architecture=>'x86_64' )

Retrieve a specific hardware profile by its identifier:

hardware_profile = client.hardware_profile( 'm1-small' )

Listing images

Return a complete list of images:

images = client.images

Retrieve a list of images owned by the currently authenticated user:

images = client.images( :owner_id=>:self )

You can also retrieve a list of images visible to you but owned by a specific user:

images = client.images( :owner_id=>'daryll' )

Access a specific image by its identifier:

image = client.image( 'ami-8675309' )

Listing instances

Get a list of all instances visible to you:

instances = client.instances

Retrieve a list of all running instances:

instances = client.instances( :state =>:running )

Look up the first instance in the list:

instance = client.instances.first

Find a specific instance by its identifier:

instance = client.instance( 'i-90125' )

Launching instances

Launch an instance using an image identifier:

instance = client.create_instance(image_id)

You may specify a hardware profile:

instance = client.create_instance(image_id, :hwp_id => 'm1-small')

To create new instance, you can also use the 'user_name' feature:

instance = client.create_instance(image_id, :name => 'myinst1')

Manipulating instances

Start an instance:

instance.start!

Execute the 'reboot' operation:

instance.reboot!

Destroy an instance:

instance.destroy!


For more details on Deltacloud Ruby client see the full documentation.

Back


;T; @±I"/storage-resources/;T{;{ ;I"4O Storage resources


Storage resources

Storage resources are divided into two groups:

  • storage volumes, which can be attached to a running instance (accessible by the instance OS)
  • blob storage, which represents a generic 'key <āˆ’āˆ’> value' based data store, as implemented by Rackspace CloudFiles or Amazon S3

Storage snapshots represent a storage volume, a backup which is created at a particular point of time (a snapshot).

Storage Volumes

A storage volume has

When attached to an instance, a storage volume will also expose a mount element which contains the attributes instance and device, specifying the instance, to which the volume is attached, and the mount point (e.g. /dev/sdh), respectively.



Get a list of all storage volumes

To list all storage volumes use call GET /api/storage_volumes.

Example request:

GET /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:04:09 GMT
Content-Length: 1341

<?xml version='1.0' encoding='utf-8' ?>
<storage_volumes>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
    <created>Thu Jul 28 20:44:18 UTC 2011</created>
    <capacity unit='GB'>10</capacity>
        <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
    <created>Thu Jul 28 20:56:07 UTC 2011</created>
    <capacity unit='GB'>15</capacity>
    <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
</storage_volumes>

Get the details of a storage volume

To retrieve the details for the specified storage volume use call GET /api/storage_volumes/:id.

Example request:

GET /api/storage_volumes/vol-99fbe5f2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:06:39 GMT
Content-Length: 794
<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
  <created>Thu Jul 28 20:56:07 UTC 2011</created>
  <capacity unit='GB'>15</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>IN-USE</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdh'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Create a new storage volume

To create a new storage volume use call POST /api/storage_volumes. A client may specify a snapshot_id from which the storage volume is instantiated though this is optional. The capacity parameter, expressed in Gigabytes, is also optional and its default size is 1 GB. Finally clients may also specify the realm_id, as a storage volume can typically only be attached to instances running within the specified realm. If the realm is not specified it will set it at the first realm returned by the cloud provider. A successful operation will return HTTP 201 Created with the details of the new storage volume.

Ɨ Note:

Fujitsu GCP requires the size to be a multiple of 10, so the specified capacity is rounded up to the nearest multiple of ten, making the default size 10 GB.

As with the other POST operations in the Deltacloud API, clients may choose to specify operation parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

capacity=10&realm_id=us-east-1c

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 20:44:27 GMT
Content-Length: 649

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <created>Thu Jul 28 20:44:18 UTC 2011</created>
  <capacity unit='GB'>10</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>CREATING</state>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Delete a storage volume

To delete the specified storage volume use call DELETE /api/storage_volumes/:id. The operation will return a HTTP 204 No Content after a succesful operation.

Ɨ Note:

The operation will fail if the given storage_volume is currently attached to an instance.

Example request:

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:34:29 GMT

Example request: (error deleting a volume currently attached to an instance)

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:30:07 GMT
Content-Length: 617

<error status='502' url='/api/storage_volumes/vol-0bc0de60?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[Client.VolumeInUse: Volume vol-0bc0de60 is currently attached to i-b100b3d0
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAJATNOR5HKG3FK27Q&Action=DeleteVolume&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-28T22%3A30%3A00.000Z&Version=2010-08-31&VolumeId=vol-0bc0de60&Signature=WnZTd9vFaUZEwfuifyo3%2FWa2HBEG1S7R8Iv%2FHqc%2BmqE%3D
  REQUEST ID=5dff67bb-d63a-4055-b550-f323fa16e185]]></message>
</error>

Attach a storage volume to a running instance

To attach the specified storage volume to a running instance use call POST /api/storage_volumes/:id/attach. Clients must specify the instance_id and the device as parameters. The device parameter is used as the mount point, that is the location at which the storage volume will be exposed to the given instance (e.g. /dev/sdh). The Deltacloud server will respond with a HTTP 202 Accepted after a succesful attach operation with details of the storage volume. In the example below, the state is reported as 'unknown' although the mount element is present. It is because the processing has not yet been completed (hence the 202 status code). Clients may specify the required parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes/vol-0bc0de60/attach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 38
Content-Type: application/x-www-form-urlencoded

instance_id=i-b100b3d0&device=/dev/sdi

Server response:

HTTP/1.1 202 Accepted
Date: Thu, 28 Jul 2011 21:36:17 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Detach a storage volume from an instance

To detach the given storage volume from the instance to which it is currently attached use call POST /api/storage_volumes/:id/detach. A succesful operation will return HTTP 201 Accepted with details of the storage volume. Similarly to attach operation, in the example below, the state is reported as 'unknown' and the mount element is still present as the processing has not been completed yet (hence the 202 status code).

Example request:

POST /api/storage_volumes/vol-0bc0de60/detach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:29:18 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Storage snapshots


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"Ž9

Storage resources

Storage resources are divided into two groups:

  • storage volumes, which can be attached to a running instance (accessible by the instance OS)
  • blob storage, which represents a generic 'key <āˆ’āˆ’> value' based data store, as implemented by Rackspace CloudFiles or Amazon S3

Storage snapshots represent a storage volume, a backup which is created at a particular point of time (a snapshot).

Storage Volumes

A storage volume has

When attached to an instance, a storage volume will also expose a mount element which contains the attributes instance and device, specifying the instance, to which the volume is attached, and the mount point (e.g. /dev/sdh), respectively.



Get a list of all storage volumes

To list all storage volumes use call GET /api/storage_volumes.

Example request:

GET /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:04:09 GMT
Content-Length: 1341

<?xml version='1.0' encoding='utf-8' ?>
<storage_volumes>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
    <created>Thu Jul 28 20:44:18 UTC 2011</created>
    <capacity unit='GB'>10</capacity>
        <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
    <created>Thu Jul 28 20:56:07 UTC 2011</created>
    <capacity unit='GB'>15</capacity>
    <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
</storage_volumes>

Get the details of a storage volume

To retrieve the details for the specified storage volume use call GET /api/storage_volumes/:id.

Example request:

GET /api/storage_volumes/vol-99fbe5f2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:06:39 GMT
Content-Length: 794
<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
  <created>Thu Jul 28 20:56:07 UTC 2011</created>
  <capacity unit='GB'>15</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>IN-USE</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdh'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Create a new storage volume

To create a new storage volume use call POST /api/storage_volumes. A client may specify a snapshot_id from which the storage volume is instantiated though this is optional. The capacity parameter, expressed in Gigabytes, is also optional and its default size is 1 GB. Finally clients may also specify the realm_id, as a storage volume can typically only be attached to instances running within the specified realm. If the realm is not specified it will set it at the first realm returned by the cloud provider. A successful operation will return HTTP 201 Created with the details of the new storage volume.

Ɨ Note:

Fujitsu GCP requires the size to be a multiple of 10, so the specified capacity is rounded up to the nearest multiple of ten, making the default size 10 GB.

As with the other POST operations in the Deltacloud API, clients may choose to specify operation parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

capacity=10&realm_id=us-east-1c

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 20:44:27 GMT
Content-Length: 649

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <created>Thu Jul 28 20:44:18 UTC 2011</created>
  <capacity unit='GB'>10</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>CREATING</state>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Delete a storage volume

To delete the specified storage volume use call DELETE /api/storage_volumes/:id. The operation will return a HTTP 204 No Content after a succesful operation.

Ɨ Note:

The operation will fail if the given storage_volume is currently attached to an instance.

Example request:

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:34:29 GMT

Example request: (error deleting a volume currently attached to an instance)

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:30:07 GMT
Content-Length: 617

<error status='502' url='/api/storage_volumes/vol-0bc0de60?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[Client.VolumeInUse: Volume vol-0bc0de60 is currently attached to i-b100b3d0
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAJATNOR5HKG3FK27Q&Action=DeleteVolume&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-28T22%3A30%3A00.000Z&Version=2010-08-31&VolumeId=vol-0bc0de60&Signature=WnZTd9vFaUZEwfuifyo3%2FWa2HBEG1S7R8Iv%2FHqc%2BmqE%3D
  REQUEST ID=5dff67bb-d63a-4055-b550-f323fa16e185]]></message>
</error>

Attach a storage volume to a running instance

To attach the specified storage volume to a running instance use call POST /api/storage_volumes/:id/attach. Clients must specify the instance_id and the device as parameters. The device parameter is used as the mount point, that is the location at which the storage volume will be exposed to the given instance (e.g. /dev/sdh). The Deltacloud server will respond with a HTTP 202 Accepted after a succesful attach operation with details of the storage volume. In the example below, the state is reported as 'unknown' although the mount element is present. It is because the processing has not yet been completed (hence the 202 status code). Clients may specify the required parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes/vol-0bc0de60/attach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 38
Content-Type: application/x-www-form-urlencoded

instance_id=i-b100b3d0&device=/dev/sdi

Server response:

HTTP/1.1 202 Accepted
Date: Thu, 28 Jul 2011 21:36:17 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Detach a storage volume from an instance

To detach the given storage volume from the instance to which it is currently attached use call POST /api/storage_volumes/:id/detach. A succesful operation will return HTTP 201 Accepted with details of the storage volume. Similarly to attach operation, in the example below, the state is reported as 'unknown' and the mount element is still present as the processing has not been completed yet (hence the 202 status code).

Example request:

POST /api/storage_volumes/vol-0bc0de60/detach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:29:18 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>
Storage snapshots
;T; I"±9


Storage resources

Storage resources are divided into two groups:

  • storage volumes, which can be attached to a running instance (accessible by the instance OS)
  • blob storage, which represents a generic 'key <āˆ’āˆ’> value' based data store, as implemented by Rackspace CloudFiles or Amazon S3

Storage snapshots represent a storage volume, a backup which is created at a particular point of time (a snapshot).

Storage Volumes

A storage volume has

When attached to an instance, a storage volume will also expose a mount element which contains the attributes instance and device, specifying the instance, to which the volume is attached, and the mount point (e.g. /dev/sdh), respectively.



Get a list of all storage volumes

To list all storage volumes use call GET /api/storage_volumes.

Example request:

GET /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:04:09 GMT
Content-Length: 1341

<?xml version='1.0' encoding='utf-8' ?>
<storage_volumes>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
    <created>Thu Jul 28 20:44:18 UTC 2011</created>
    <capacity unit='GB'>10</capacity>
        <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
    <created>Thu Jul 28 20:56:07 UTC 2011</created>
    <capacity unit='GB'>15</capacity>
    <realm_id>us-east-1c</realm_id>
    <state>AVAILABLE</state>
    <actions>
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
      <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
    </actions>
  </storage_volume>
</storage_volumes>

Get the details of a storage volume

To retrieve the details for the specified storage volume use call GET /api/storage_volumes/:id.

Example request:

GET /api/storage_volumes/vol-99fbe5f2?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:06:39 GMT
Content-Length: 794
<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'>
  <created>Thu Jul 28 20:56:07 UTC 2011</created>
  <capacity unit='GB'>15</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>IN-USE</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdh'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Create a new storage volume

To create a new storage volume use call POST /api/storage_volumes. A client may specify a snapshot_id from which the storage volume is instantiated though this is optional. The capacity parameter, expressed in Gigabytes, is also optional and its default size is 1 GB. Finally clients may also specify the realm_id, as a storage volume can typically only be attached to instances running within the specified realm. If the realm is not specified it will set it at the first realm returned by the cloud provider. A successful operation will return HTTP 201 Created with the details of the new storage volume.

Ɨ Note:

Fujitsu GCP requires the size to be a multiple of 10, so the specified capacity is rounded up to the nearest multiple of ten, making the default size 10 GB.

As with the other POST operations in the Deltacloud API, clients may choose to specify operation parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

capacity=10&realm_id=us-east-1c

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 20:44:27 GMT
Content-Length: 649

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <created>Thu Jul 28 20:44:18 UTC 2011</created>
  <capacity unit='GB'>10</capacity>
  <realm_id>us-east-1c</realm_id>
  <state>CREATING</state>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Delete a storage volume

To delete the specified storage volume use call DELETE /api/storage_volumes/:id. The operation will return a HTTP 204 No Content after a succesful operation.

Ɨ Note:

The operation will fail if the given storage_volume is currently attached to an instance.

Example request:

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:34:29 GMT

Example request: (error deleting a volume currently attached to an instance)

DELETE /api/storage_volumes/vol-0bc0de60?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 502 Bad Gateway
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:30:07 GMT
Content-Length: 617

<error status='502' url='/api/storage_volumes/vol-0bc0de60?format=xml'>
  <kind>backend_error</kind>
  <backend driver='ec2'>
    <code>502</code>
  </backend>
  <message><![CDATA[Client.VolumeInUse: Volume vol-0bc0de60 is currently attached to i-b100b3d0
  REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAJATNOR5HKG3FK27Q&Action=DeleteVolume&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-07-28T22%3A30%3A00.000Z&Version=2010-08-31&VolumeId=vol-0bc0de60&Signature=WnZTd9vFaUZEwfuifyo3%2FWa2HBEG1S7R8Iv%2FHqc%2BmqE%3D
  REQUEST ID=5dff67bb-d63a-4055-b550-f323fa16e185]]></message>
</error>

Attach a storage volume to a running instance

To attach the specified storage volume to a running instance use call POST /api/storage_volumes/:id/attach. Clients must specify the instance_id and the device as parameters. The device parameter is used as the mount point, that is the location at which the storage volume will be exposed to the given instance (e.g. /dev/sdh). The Deltacloud server will respond with a HTTP 202 Accepted after a succesful attach operation with details of the storage volume. In the example below, the state is reported as 'unknown' although the mount element is present. It is because the processing has not yet been completed (hence the 202 status code). Clients may specify the required parameters as multipart/form-data or as application/x-www-form-urlencoded data.

Example request:

POST /api/storage_volumes/vol-0bc0de60/attach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 38
Content-Type: application/x-www-form-urlencoded

instance_id=i-b100b3d0&device=/dev/sdi

Server response:

HTTP/1.1 202 Accepted
Date: Thu, 28 Jul 2011 21:36:17 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Detach a storage volume from an instance

To detach the given storage volume from the instance to which it is currently attached use call POST /api/storage_volumes/:id/detach. A succesful operation will return HTTP 201 Accepted with details of the storage volume. Similarly to attach operation, in the example below, the state is reported as 'unknown' and the mount element is still present as the processing has not been completed yet (hence the 202 status code).

Example request:

POST /api/storage_volumes/vol-0bc0de60/detach?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Thu, 28 Jul 2011 21:29:18 GMT
Content-Length: 709

<?xml version='1.0' encoding='utf-8' ?>
<storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'>
  <capacity unit='GB'></capacity>
  <device>/dev/sdi</device>
  <state>unknown</state>
  <mount>
    <instance href='i-b100b3d0' id='i-b100b3d0'></instance>
    <device name='/dev/sdi'></device>
  </mount>
  <actions>
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/attach' method='post' rel='attach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60/detach' method='post' rel='detach' />
    <link href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' method='delete' rel='destroy' />
  </actions>
</storage_volume>

Storage snapshots


;T; @·I"/storage-snapshots/;T{;{ ;I"s1 Storage snapshots


Storage snapshots

A storage snapshot captures the state of a storage volume at the exact moment in time. Each snapshot has

  • a created timestamp; and
  • a storage volume attribute referring to the volume from which the snapshot was made.



Get a list of all storage snapshots

To list all available storage snapshots use call GET /api/storage_snapshots. As concerns Amazon EC2, this list includes any snapshots that are available to the requesting client account, including those that may not have been created by that account. As this list is very long the example below shows only part of the response:

Example request:

GET /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 156897

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshots>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
    <created>Thu Jul 28 21:54:19 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
    <created>Thu Jul 28 21:46:12 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-dda6cebc' id='snap-dda6cebc'>
    <created>Thu Jul 28 21:51:55 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d010f6b9' id='snap-d010f6b9'>
    <created>Mon Oct 20 18:23:59 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-351efb5c' id='vol-351efb5c'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-a310f6ca' id='snap-a310f6ca'>
    <created>Mon Oct 20 18:25:53 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-001efb69' id='vol-001efb69'></storage_volume>
  </storage_snapshot>
  (...)
</storage_snapshots>

Get the details of a storage snaphsot

To get all details for a specified storage snapshot, as shown below, use call GET /api/storage_snapshots/:id.

Example request:

GET /api/storage_snapshots/snap-45b8d024?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
  <created>Thu Jul 28 21:54:19 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
</storage_snapshot>

Create a new storage snapshot

To create a new storage snapshot use call POST /api/storage_snapshots. Clients must specify the storage volume, which the snapshot is created from, by supplying the volume_id parameter. The Deltacloud server responds with HTTP 201 Created after a succesful operation and provides details of the new storage snapshot. Clients may specify operation parameters as multipart/form-data, or as application/x-www-form-urlencoded data:

Example request:

POST /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

volume_id=vol-99fbe5f2

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 21:46:48 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
  <created>Thu Jul 28 21:46:12 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
</storage_snapshot>

Delete a storage snapshot

To delete the specified storagesnapshot use call DELETE /api/storage_snapshots/:id. The operation returns a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/storage_snapshots/snap-dda6cebc?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:26:07 GMT

Blob storage


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"ū

Storage snapshots

A storage snapshot captures the state of a storage volume at the exact moment in time. Each snapshot has

  • a created timestamp; and
  • a storage volume attribute referring to the volume from which the snapshot was made.



Get a list of all storage snapshots

To list all available storage snapshots use call GET /api/storage_snapshots. As concerns Amazon EC2, this list includes any snapshots that are available to the requesting client account, including those that may not have been created by that account. As this list is very long the example below shows only part of the response:

Example request:

GET /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 156897

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshots>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
    <created>Thu Jul 28 21:54:19 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
    <created>Thu Jul 28 21:46:12 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-dda6cebc' id='snap-dda6cebc'>
    <created>Thu Jul 28 21:51:55 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d010f6b9' id='snap-d010f6b9'>
    <created>Mon Oct 20 18:23:59 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-351efb5c' id='vol-351efb5c'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-a310f6ca' id='snap-a310f6ca'>
    <created>Mon Oct 20 18:25:53 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-001efb69' id='vol-001efb69'></storage_volume>
  </storage_snapshot>
  (...)
</storage_snapshots>

Get the details of a storage snaphsot

To get all details for a specified storage snapshot, as shown below, use call GET /api/storage_snapshots/:id.

Example request:

GET /api/storage_snapshots/snap-45b8d024?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
  <created>Thu Jul 28 21:54:19 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
</storage_snapshot>

Create a new storage snapshot

To create a new storage snapshot use call POST /api/storage_snapshots. Clients must specify the storage volume, which the snapshot is created from, by supplying the volume_id parameter. The Deltacloud server responds with HTTP 201 Created after a succesful operation and provides details of the new storage snapshot. Clients may specify operation parameters as multipart/form-data, or as application/x-www-form-urlencoded data:

Example request:

POST /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

volume_id=vol-99fbe5f2

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 21:46:48 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
  <created>Thu Jul 28 21:46:12 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
</storage_snapshot>

Delete a storage snapshot

To delete the specified storagesnapshot use call DELETE /api/storage_snapshots/:id. The operation returns a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/storage_snapshots/snap-dda6cebc?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:26:07 GMT
Blob storage
;T; I"š


Storage snapshots

A storage snapshot captures the state of a storage volume at the exact moment in time. Each snapshot has

  • a created timestamp; and
  • a storage volume attribute referring to the volume from which the snapshot was made.



Get a list of all storage snapshots

To list all available storage snapshots use call GET /api/storage_snapshots. As concerns Amazon EC2, this list includes any snapshots that are available to the requesting client account, including those that may not have been created by that account. As this list is very long the example below shows only part of the response:

Example request:

GET /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 156897

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshots>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
    <created>Thu Jul 28 21:54:19 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
    <created>Thu Jul 28 21:46:12 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-dda6cebc' id='snap-dda6cebc'>
    <created>Thu Jul 28 21:51:55 UTC 2011</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d010f6b9' id='snap-d010f6b9'>
    <created>Mon Oct 20 18:23:59 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-351efb5c' id='vol-351efb5c'></storage_volume>
  </storage_snapshot>
  <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-a310f6ca' id='snap-a310f6ca'>
    <created>Mon Oct 20 18:25:53 UTC 2008</created>
    <storage_volume href='http://localhost:3001/api/storage_volumes/vol-001efb69' id='vol-001efb69'></storage_volume>
  </storage_snapshot>
  (...)
</storage_snapshots>

Get the details of a storage snaphsot

To get all details for a specified storage snapshot, as shown below, use call GET /api/storage_snapshots/:id.

Example request:

GET /api/storage_snapshots/snap-45b8d024?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 28 Jul 2011 22:08:36 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'>
  <created>Thu Jul 28 21:54:19 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume>
</storage_snapshot>

Create a new storage snapshot

To create a new storage snapshot use call POST /api/storage_snapshots. Clients must specify the storage volume, which the snapshot is created from, by supplying the volume_id parameter. The Deltacloud server responds with HTTP 201 Created after a succesful operation and provides details of the new storage snapshot. Clients may specify operation parameters as multipart/form-data, or as application/x-www-form-urlencoded data:

Example request:

POST /api/storage_snapshots?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

volume_id=vol-99fbe5f2

Server response:

HTTP/1.1 201 Created
Date: Thu, 28 Jul 2011 21:46:48 GMT
Content-Length: 329

<?xml version='1.0' encoding='utf-8' ?>
<storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'>
  <created>Thu Jul 28 21:46:12 UTC 2011</created>
  <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume>
</storage_snapshot>

Delete a storage snapshot

To delete the specified storagesnapshot use call DELETE /api/storage_snapshots/:id. The operation returns a HTTP 204 No Content after a succesful operation:

Example request:

DELETE /api/storage_snapshots/snap-dda6cebc?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 204 No Content
Date: Thu, 28 Jul 2011 22:26:07 GMT

Blob storage


;T; @½I" /about/;T{;{ ;I"8 About

About Deltacloud


Deltacloud provides the API server and drivers necessary for connecting to cloud providers.

Deltacloud maintains long-term stability for scripts, tools and applications and backward compatibility across different versions.

Deltacloud enables management of resources in different clouds by the use of one of three supported APIs. The supported APIs are the Deltacloud classic API, the DMTF CIMI API or even the EC2 API.

All of this means you can start an instance on an internal cloud and with the same code start another on EC2 or RHEV-M.


Deltacloud API SOA diagram


How does Deltacloud work?


Deltacloud contains a cloud abstraction API - whether the Deltacloud classic API, the DMTF CIMI API or even the EC2 API. The API works as a wrapper around a large number of clouds, abstracting their differences. For every cloud provider there is a driver "speaking" that cloud provider's native API, freeing you from dealing with the particulars of each cloud's API.

Install Deltacloud and start the deltacloudd daemon server. You can use your favourite HTTP client to talk to the server using the Deltacloud REST API, the DMTF CIMI API or even the EC2 API. Deltacloud even comes with an HTML interface so you can simply use your web browser to control your cloud infrastructure straight out of the box. The HTML interface is written with the jQuery mobile framework, so it is compatible with your mobile or tablet devices.


Deltacloud concept scheme
Get Deltacloud

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"ć

About Deltacloud


Deltacloud provides the API server and drivers necessary for connecting to cloud providers.

Deltacloud maintains long-term stability for scripts, tools and applications and backward compatibility across different versions.

Deltacloud enables management of resources in different clouds by the use of one of three supported APIs. The supported APIs are the Deltacloud classic API, the DMTF CIMI API or even the EC2 API.

All of this means you can start an instance on an internal cloud and with the same code start another on EC2 or RHEV-M.


Deltacloud API SOA diagram


How does Deltacloud work?


Deltacloud contains a cloud abstraction API - whether the Deltacloud classic API, the DMTF CIMI API or even the EC2 API. The API works as a wrapper around a large number of clouds, abstracting their differences. For every cloud provider there is a driver "speaking" that cloud provider's native API, freeing you from dealing with the particulars of each cloud's API.

Install Deltacloud and start the deltacloudd daemon server. You can use your favourite HTTP client to talk to the server using the Deltacloud REST API, the DMTF CIMI API or even the EC2 API. Deltacloud even comes with an HTML interface so you can simply use your web browser to control your cloud infrastructure straight out of the box. The HTML interface is written with the jQuery mobile framework, so it is compatible with your mobile or tablet devices.


Deltacloud concept scheme
Get Deltacloud
;T; I"Į

About Deltacloud


Deltacloud provides the API server and drivers necessary for connecting to cloud providers.

Deltacloud maintains long-term stability for scripts, tools and applications and backward compatibility across different versions.

Deltacloud enables management of resources in different clouds by the use of one of three supported APIs. The supported APIs are the Deltacloud classic API, the DMTF CIMI API or even the EC2 API.

All of this means you can start an instance on an internal cloud and with the same code start another on EC2 or RHEV-M.


Deltacloud API SOA diagram


How does Deltacloud work?


Deltacloud contains a cloud abstraction API - whether the Deltacloud classic API, the DMTF CIMI API or even the EC2 API. The API works as a wrapper around a large number of clouds, abstracting their differences. For every cloud provider there is a driver "speaking" that cloud provider's native API, freeing you from dealing with the particulars of each cloud's API.

Install Deltacloud and start the deltacloudd daemon server. You can use your favourite HTTP client to talk to the server using the Deltacloud REST API, the DMTF CIMI API or even the EC2 API. Deltacloud even comes with an HTML interface so you can simply use your web browser to control your cloud infrastructure straight out of the box. The HTML interface is written with the jQuery mobile framework, so it is compatible with your mobile or tablet devices.


Deltacloud concept scheme
Get Deltacloud
;T; @ĆI"/assets/img/diagram-soa/;T{;{I"/assets/img/logo/;T{;{I"/assets/img/introbg/;T{;{I"/assets/img/asf_logo_wide/;T{;{I"&/assets/img/glyphicons-halflings/;T{;{I"3/assets/img/documentation_files/default-debug/;T{;{;I"7@import url(generic.css); @import url(debug.css); ;T; @Ų; @ŲI"-/assets/img/documentation_files/default/;T{;{;I"8@import url(generic.css); @import url(dcloud.css); ;T; @Ü; @ÜI"3/assets/img/documentation_files/asf_logo_wide/;T{;{I"+/assets/img/documentation_files/piwik/;T{;{;I"lM/* * Piwik - Web Analytics * * JavaScript tracking client * * @link http://piwik.org * @source http://dev.piwik.org/trac/browser/trunk/js/piwik.js * @license http://www.opensource.org/licenses/bsd-license.php Simplified BSD */ if(!this.JSON2){this.JSON2={}}(function(){function d(f){return f<10?"0"+f:f}function l(n,m){var f=Object.prototype.toString.apply(n);if(f==="[object Date]"){return isFinite(n.valueOf())?n.getUTCFullYear()+"-"+d(n.getUTCMonth()+1)+"-"+d(n.getUTCDate())+"T"+d(n.getUTCHours())+":"+d(n.getUTCMinutes())+":"+d(n.getUTCSeconds())+"Z":null}if(f==="[object String]"||f==="[object Number]"||f==="[object Boolean]"){return n.valueOf()}if(f!=="[object Array]"&&typeof n.toJSON==="function"){return n.toJSON(m)}return n}var c=new RegExp("[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),e='\\\\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',i=new RegExp("["+e,"g"),j,b,k={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h; function a(f){i.lastIndex=0;return i.test(f)?'"'+f.replace(i,function(m){var n=k[m];return typeof n==="string"?n:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function g(s,p){var n,m,t,f,q=j,o,r=p[s];if(r&&typeof r==="object"){r=l(r,s)}if(typeof h==="function"){r=h.call(p,s,r)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}j+=b;o=[];if(Object.prototype.toString.apply(r)==="[object Array]"){f=r.length;for(n=0;n>>(32-i))},ac=function(ai){var ah="",ag,W;for(ag=7;ag>=0;ag--){W=(ai>>>(ag*4))&15;ah+=W.toString(16)}return ah},Q,ae,ad,M=[],U=1732584193,S=4023233417,R=2562383102,P=271733878,O=3285377520,aa,Z,Y,X,V,af,L,T=[];ab=o(ab);L=ab.length;for(ae=0;ae>>29);T.push((L<<3)&4294967295);for(Q=0;Q=0){bc=bc.slice(0,bb)}if((bb=bc.lastIndexOf("/"))!==bc.length-1){bc=bc.slice(0,bb+1)}return bc+ba}function aE(bd){var bb,ba,bc;for(bb=0;bb0)&&(bd.slice(bc)===ba)){return true}}}return false}function a9(ba){var bb=new Image(1,1);bb.onload=function(){};bb.src=N+(N.indexOf("?")<0?"?":"&")+ba}function aP(ba){try{var bc=x.XDomainRequest?new x.XDomainRequest():x.XMLHttpRequest?new x.XMLHttpRequest():x.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;bc.open("POST",N,true);bc.onreadystatechange=function(){if(this.readyState===4&&this.status!==200){a9(ba)}};bc.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");bc.send(ba)}catch(bb){a9(ba)}}function an(bc,bb){var ba=new Date();if(!a0){if(aF==="POST"){aP(bc)}else{a9(bc) }f=ba.getTime()+bb}}function aO(ba){return a5+ba+"."+aX+"."+aJ}function P(){var ba=aO("testcookie");if(!r(c.cookieEnabled)){l(ba,"1");return e(ba)==="1"?"1":"0"}return c.cookieEnabled?"1":"0"}function az(){aJ=al((W||aT)+(a6||"/")).slice(0,4)}function Y(){var bb=aO("cvar"),ba=e(bb);if(ba.length){ba=JSON2.parse(ba);if(z(ba)){return ba}}return{}}function M(){if(Q===false){Q=Y()}}function aW(){var ba=new Date();aG=ba.getTime()}function V(be,bb,ba,bd,bc,bf){l(aO("id"),be+"."+bb+"."+ba+"."+bd+"."+bc+"."+bf,aa,a6,W,Z)}function L(){var bb=new Date(),ba=Math.round(bb.getTime()/1000),bd=e(aO("id")),bc;if(bd){bc=bd.split(".");bc.unshift("0")}else{if(!ap){ap=al((c.userAgent||"")+(c.platform||"")+JSON2.stringify(aY)+ba).slice(0,16)}bc=["1",ap,ba,0,ba,"",""]}return bc}function i(){var ba=e(aO("ref"));if(ba.length){try{ba=JSON2.parse(ba);if(z(ba)){return ba}}catch(bb){}}return["","",0,""]}function aj(bc,bA,bB,be){var by,bb=new Date(),bk=Math.round(bb.getTime()/1000),bD,bz,bg,br,bv,bj,bt,bh,bx,bf=1024,bE,bn,bu=Q,bp=aO("id"),bl=aO("ses"),bm=aO("ref"),bF=aO("cvar"),bs=L(),bo=e(bl),bw=i(),bC=ar||a7,bi,ba; if(a0){l(bp,"",-1,a6,W);l(bl,"",-1,a6,W);l(bF,"",-1,a6,W);l(bm,"",-1,a6,W);return""}bD=bs[0];bz=bs[1];br=bs[2];bg=bs[3];bv=bs[4];bj=bs[5];if(!r(bs[6])){bs[6]=""}bt=bs[6];if(!r(be)){be=""}bi=bw[0];ba=bw[1];bh=bw[2];bx=bw[3];if(!bo){bg++;bj=bv;if(!aq||!bi.length){for(by in am){if(Object.prototype.hasOwnProperty.call(am,by)){bi=y(bC,am[by]);if(bi.length){break}}}for(by in ah){if(Object.prototype.hasOwnProperty.call(ah,by)){ba=y(bC,ah[by]);if(ba.length){break}}}}bE=b(aH);bn=bx.length?b(bx):"";if(bE.length&&!aE(bE)&&(!aq||!bn.length||aE(bn))){bx=aH}if(bx.length||bi.length){bh=bk;bw=[bi,ba,bh,a2(bx.slice(0,bf))];l(bm,JSON2.stringify(bw),at,a6,W,Z)}}bc+="&idsite="+aX+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+bb.getHours()+"&m="+bb.getMinutes()+"&s="+bb.getSeconds()+"&url="+h(a2(bC))+(aH.length?"&urlref="+h(a2(aH)):"")+"&_id="+bz+"&_idts="+br+"&_idvc="+bg+"&_idn="+bD+(bi.length?"&_rcn="+h(bi):"")+(ba.length?"&_rck="+h(ba):"")+"&_refts="+bh+"&_viewts="+bj+(String(bt).length?"&_ects="+bt:"")+(String(bx).length?"&_ref="+h(a2(bx.slice(0,bf))):""); var bd=JSON2.stringify(ax);if(bd.length>2){bc+="&cvar="+h(bd)}for(by in aY){if(Object.prototype.hasOwnProperty.call(aY,by)){bc+="&"+by+"="+aY[by]}}if(bA){bc+="&data="+h(JSON2.stringify(bA))}else{if(U){bc+="&data="+h(JSON2.stringify(U))}}if(Q){var bq=JSON2.stringify(Q);if(bq.length>2){bc+="&_cvar="+h(bq)}for(by in bu){if(Object.prototype.hasOwnProperty.call(bu,by)){if(Q[by][0]===""||Q[by][1]===""){delete Q[by]}}}l(bF,JSON2.stringify(Q),ab,a6,W,Z)}V(bz,br,bg,bk,bj,r(be)&&String(be).length?be:bt);l(bl,"*",ab,a6,W,Z);bc+=E(bB);return bc}function aR(bd,bc,bh,be,ba,bk){var bf="idgoal=0",bg,bb=new Date(),bi=[],bj;if(String(bd).length){bf+="&ec_id="+h(bd);bg=Math.round(bb.getTime()/1000)}bf+="&revenue="+bc;if(String(bh).length){bf+="&ec_st="+bh}if(String(be).length){bf+="&ec_tx="+be}if(String(ba).length){bf+="&ec_sh="+ba}if(String(bk).length){bf+="&ec_dt="+bk}if(aN){for(bj in aN){if(Object.prototype.hasOwnProperty.call(aN,bj)){if(!r(aN[bj][1])){aN[bj][1]=""}if(!r(aN[bj][2])){aN[bj][2]=""}if(!r(aN[bj][3])||String(aN[bj][3]).length===0){aN[bj][3]=0 }if(!r(aN[bj][4])||String(aN[bj][4]).length===0){aN[bj][4]=1}bi.push(aN[bj])}}bf+="&ec_items="+h(JSON2.stringify(bi))}bf=aj(bf,U,"ecommerce",bg);an(bf,aC)}function aQ(ba,be,bd,bc,bb,bf){if(String(ba).length&&r(be)){aR(ba,be,bd,bc,bb,bf)}}function a4(ba){if(r(ba)){aR("",ba,"","","","")}}function av(bd,be){var ba=new Date(),bc=aj("action_name="+h(K(bd||ai)),be,"log");an(bc,aC);if(S&&ae&&!aI){aI=true;J(p,"click",aW);J(p,"mouseup",aW);J(p,"mousedown",aW);J(p,"mousemove",aW);J(p,"mousewheel",aW);J(x,"DOMMouseScroll",aW);J(x,"scroll",aW);J(p,"keypress",aW);J(p,"keydown",aW);J(p,"keyup",aW);J(x,"resize",aW);J(x,"focus",aW);J(x,"blur",aW);aG=ba.getTime();setTimeout(function bb(){var bf=new Date(),bg;if((aG+ae)>bf.getTime()){if(S0){ba=r(ba)&&!j(ba)?String(ba):ba;be=r(be)&&!j(be)?String(be):be;bd=[ba.slice(0,a1),be.slice(0,a1)];if(bc==="visit"||bc===2){M();Q[bb]=bd}else{if(bc==="page"||bc===3){ax[bb]=bd}}}},getCustomVariable:function(bb,bc){var ba;if(!r(bc)){bc="visit" }if(bc==="page"||bc===3){ba=ax[bb]}else{if(bc==="visit"||bc===2){M();ba=Q[bb]}}if(!r(ba)||(ba&&ba[0]==="")){return false}return ba},deleteCustomVariable:function(ba,bb){if(this.getCustomVariable(ba,bb)){this.setCustomVariable(ba,"","",bb)}},setLinkTrackingTimer:function(ba){aC=ba},setDownloadExtensions:function(ba){ak=ba},addDownloadExtensions:function(ba){ak+="|"+ba},setDomains:function(ba){aD=j(ba)?[ba]:ba;aD.push(aT)},setIgnoreClasses:function(ba){R=j(ba)?[ba]:ba},setRequestMethod:function(ba){aF=ba||"GET"},setReferrerUrl:function(ba){aH=ba},setCustomUrl:function(ba){ar=aS(a7,ba)},setDocumentTitle:function(ba){ai=ba},setDownloadClasses:function(ba){aw=j(ba)?[ba]:ba},setLinkClasses:function(ba){ac=j(ba)?[ba]:ba},setCampaignNameKey:function(ba){am=j(ba)?[ba]:ba},setCampaignKeywordKey:function(ba){ah=j(ba)?[ba]:ba},discardHashTag:function(ba){T=ba},setCookieNamePrefix:function(ba){a5=ba;Q=Y()},setCookieDomain:function(ba){W=t(ba);az()},setCookiePath:function(ba){a6=ba;az()},setVisitorCookieTimeout:function(ba){aa=ba*1000 },setSessionCookieTimeout:function(ba){ab=ba*1000},setReferralCookieTimeout:function(ba){at=ba*1000},setConversionAttributionFirstReferrer:function(ba){aq=ba},setDoNotTrack:function(bb){var ba=c.doNotTrack||c.msDoNotTrack;a0=bb&&(ba==="yes"||ba==="1")},addListener:function(bb,ba){aL(bb,ba)},enableLinkTracking:function(ba){if(m){au(ba)}else{v.push(function(){au(ba)})}},setHeartBeatTimer:function(bc,bb){var ba=new Date();S=ba.getTime()+bc*1000;ae=bb*1000},killFrame:function(){if(x.location!==x.top.location){x.top.location=x.location}},redirectFile:function(ba){if(x.location.protocol==="file:"){x.location=ba}},setCountPreRendered:function(ba){ao=ba},trackGoal:function(ba,bc,bb){ag(function(){aA(ba,bc,bb)})},trackLink:function(bb,ba,bc){ag(function(){aV(bb,ba,bc)})},trackPageView:function(ba,bb){ag(function(){av(ba,bb)})},setEcommerceView:function(bd,ba,bc,bb){if(!r(bc)||!bc.length){bc=""}else{if(bc instanceof Array){bc=JSON2.stringify(bc)}}ax[5]=["_pkc",bc];if(r(bb)&&String(bb).length){ax[2]=["_pkp",bb] }if((!r(bd)||!bd.length)&&(!r(ba)||!ba.length)){return}if(r(bd)&&bd.length){ax[3]=["_pks",bd]}if(!r(ba)||!ba.length){ba=""}ax[4]=["_pkn",ba]},addEcommerceItem:function(be,ba,bc,bb,bd){if(be.length){aN[be]=[be,ba,bc,bb,bd]}},trackEcommerceOrder:function(ba,be,bd,bc,bb,bf){aQ(ba,be,bd,bc,bb,bf)},trackEcommerceCartUpdate:function(ba){a4(ba)}}}function q(){return{push:G}}J(x,"beforeunload",H,false);k();Date.prototype.getTimeAlias=Date.prototype.getTime;B=new u();for(D=0;D<_paq.length;D++){G(_paq[D])}_paq=new q();return{addPlugin:function(i,L){a[i]=L},getTracker:function(i,L){return new u(i,L)},getAsyncTracker:function(){return B}}}()),piwik_track,piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c) }e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}};;T; @ć; @ćI"/assets/img/documentation/;T{;{;I"/[ Deltacloud - Documentation

Documentation

The Deltacloud documentation is divided into the following parts:





Install Deltacloud

This page lists the libraries and packages that you will need in order to install the Deltacloud server, a "Hello Deltacloud" quick-start guide as well as some information on interacting with the Deltacloud server after a succesful installation.

Installation of Deltacloud itself

Once you've setup all the dependencies listed below, installing Deltacloud is as easy as typing:

$ sudo gem install deltacloud-core
And thats it! The gem install command will automatically fetch and install all other gems that the Deltacloud server needs if you don't already have these. As an alternative you can get the latest releases of Deltacloud from the Apache website.



Installation dependencies

The Deltacloud server relies on a number of external rubygems and other libraries. You must have the following packages installed before trying to install and run the Deltacloud server. Please note that the names of the packages below may differ for your distribution (e.g. 'ruby-devel' vs 'ruby-dev'). In short, you need:

  • ruby and ruby-devel,
  • gem (RubyGems),
  • gcc-c++,
  • libxml2 and libxml2-devel,
  • libxslt and libxslt-devel,
  • rake
More info on getting these follows:

ruby and ruby-devel

You need to install ruby. You can check to see if you already have a ruby installation by typing:

$ ruby -v
If you see something that looks like the following:

ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
then you can skip the ruby installation. Deltacloud requires ruby to be at least version 1.8.7. You also need the development headers (ruby-devel) as Deltacloud relies on some rubygems with C extensions. If you use a package manager such as yum or apt-get:

sudo yum install ruby
sudo yum install ruby-devel
OR

sudo apt-get install ruby
sudo apt-get install ruby-devel

gem (RubyGems)

Deltacloud relies on a number of ruby gems so you also need to install RubyGems. As with ruby, you can check if you already have the gem executable installed by typing gem -v . Again, your package manager can help with the installation:

$ sudo yum install rubygems

gcc-c++, libxml2, libxml2-devel, libxslt, libxslt-devel

These are required to build RubyGems that have C extensions. Again, typically the easiest way to get these is with you package manager:

$ sudo yum install gcc-c++
$ sudo yum install libxml libxml2-devel
$ sudo yum install libxslt libxslt-devel

rake

Rake is Ruby's Make and is itself a ruby gem. Once you have RubyGems installed you can get rake with:

$ sudo gem install rake




"Hello Deltacloud!", quick-start guide

This guide assumes a linux environment. Some of the Deltacloud developers are running recent versions of Fedora. However, as Deltacloud is written in Ruby you should be able to install it on any OS that supports Ruby. If you have succesfully installed Deltacloud or are having any problems doing so, please let us know, we'd love to hear from you!

Running the Deltacloud server

After you succesfully install Deltacloud, you can start the server by typing deltacloudd -i provider_id. The provider_id is the name of the cloud provider that you have an account with, for example 'ec2'. If you don't yet have an account with a cloud provider, you can still try the Deltacloud mock driver:

deltacloudd -i mock
This will start the Deltacloud server on your local machine with the mock driver, accepting connections on port 3001 (the default). From version 0.4.0 of Deltacloud, you can use the '-l' flag to see all available provider_ids that can be used with the deltacloudd executable.

$ deltacloudd -l

Available drivers: * condor * vsphere * opennebula * eucalyptus * rhevm * sbc * azure * gogrid * mock * rackspace * rimuhosting * terremark * ec2
After you start the server, the Deltacloud HTML interface is available at http://localhost:3001/api - open this address in your web browser. If you want to see XML output from the server in the browser, append format=xml to each URL. On Webkit based browsers like Safari, you might need to instruct the server explicitly to return HTML Do this by appending format=html to each URL. Your browser will prompt you for credentials when you invoke an operation that requires authentication.

The '-h' flag will list all available options for deltacloudd. For example, to start the Deltacloud server with the Rackspace driver on port 10000 you can use:

$ deltacloudd -i rackspace -P 10000
You may want to install the server on another machine and make Deltacloud available on your local network. To do this you need to bind the Deltacloud server to an address other than 'localhost' (default). For instance, if you install and start Deltacloud on a machine with the IP address 192.168.10.200 you should start the server with:

$ deltacloudd -i ec2 -P 5000 -r 192.168.10.200
This will make the Deltacloud server available at the address http://192.168.10.200:5000/api.





The Deltacloud ruby client

The Deltacloud project also maintains a ruby client, which you need to install seperately to the Deltacloud API server. The Deltacloud client consists of a ruby library (packaged as a ruby gem) which you can use to programmatically interact with the Deltacloud server and control your cloud infrastructure across cloud providers. For example, assuming the Deltacloud server is running at 192.168.10.244:5000

require 'deltacloud'

api_url = 'http://192.168.10.244:5000/api' api_name = 'TK2PJCAN9R1HKG2FK24Z' api_password = 'aLe27rZlRhlBcVoQbL4JsVtaNga12vEL9d9kS5CA'
client = DeltaCloud.new( api_name, api_password, api_url )
# get a list of currently running instances (virtual machines) client.instances.each do |instance| puts instance.name end
other work with client here
More comprehensive information on using the Deltacloud ruby client in this way can be found in the client documentation. Assuming you already have Ruby and RubyGems setup, you can install the Deltacloud client by simply typing:

$ sudo gem install deltacloud-client
Installing the Deltacloud client also gives you the deltacloudc command line tool. This executable makes use of the Deltacloud client library to speak to the Deltacloud server using the REST API. This allows you to to control your IAAS cloud infrastructure form the command line; even better if you are familiar with linux scripting, you can knock up a bash script in no time to automate your cloud infrastructure tasks. The general usage pattern for deltacloudc is:

$ deltacloudc collection operation [options]
  • collection refers to the Deltacloud object collections, such as Instances, Images, Buckets, Realms etc, as described in greater detail in the REST API
  • operation is collection dependant. All collections respond to 'index' and 'show' operations (retrieve details on all objects in a given collection or on a specific object, respectively); some collections respond to 'create' and 'destroy' operations. The instances collection (realised virtual servers) responds to operations for managing the instance lifecycle, such as 'stop', 'reboot' etc.
  • options are listed by invoking deltacloudc -h One important option is -u, with which you specify the API_URL where the Deltacloud server is running. The API_URL takes the form http://[user]:[password]@[api_url]:[port]/[api] (examples follow). Alternatively, rather than having to supply the API_URL for every invocation of deltacloudc you have the choice of setting the API_URL environment variable (e.g., export API_URL=http://mockuser:mockpassword@localhost:3001/api). A listing of the credentials you need to provide for each back-end cloud provider is available here.
The following examples assume that the Deltacloud server is running on your local machine port 3001 (the deltacloudd server daemon defaults to 'localhost:3001') and was started with the 'mock' provider (i.e. deltacloudd -i mock ). To list all collections available in the current driver:

$ deltacloudc -l -u http://mockuser:mockpassword@localhost:3001/api
To get a list of all images:

$ deltacloudc images index -u http://mockuser:mockpassword@localhost:3001/api
To list all operations for the buckets collection:

$ deltacloudc buckets -l -u http://mockuser:mockpassword@localhost:3001/api
To create a new blob in the bucket called 'bucket1':

$ deltacloudc blob create -i 'my_new_blob' -b 'bucket1' -f /home/marios/file.txt




Other HTTP clients - cURL

As interaction with the Deltacloud server is via HTTP calls, you can use any HTTP client to talk to it using the Deltacloud REST API. One popular command line tool available on most modern linux distributions is cURL. We give some examples here of how you can use cURL to interact with Deltacloud, demonstrating the flexibility and power of the Deltacloud REST API. The following examples assume the Deltacloud server is running on locahost:3001, and was started with the 'ec2' driver (i.e., deltacloudd -i ec2 ). To get a listing of all images available in the back-end cloud:

curl  --user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/images?format=xml"
The cURL --user option is used to specify the username:password credentials for access to the back-end cloud provider (Amazon EC2 in this case). To create a new instance from the image with id 'ami-f51aff9c', in realm 'us-east-1c', with the hardware profile 'c1.medium', in firewall 'default':

curl -X POST -F "keyname=eftah" -F "image_id=ami-f51aff9c"
-F "realm_id=us-east-1c" -F "hwp_id=c1.medium" -F "firewalls1=default"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
"http://localhost:3001/api/instances?format=xml"
To delete a firewall called 'develgroup':

curl -X DELETE
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/firewalls/develgroup?format=xml
To create a blob called 'my_new_blob' within the bucket 'mybucket' from a local file with HTTP PUT specifying its content type and setting some some metadata key:value pairs:

curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:mariosblob'
-H 'X-Deltacloud-Blobmeta-Version:2.1' --upload-file
"/home/marios/Desktop/somefile.html"
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml
To retrieve blob metadata for the blob called 'my_new_blob':

curl -iv -X HEAD
--user "pGbAJ1TsVg5PKs3BK27O:dPs47ralgBlldqYNbLg3scthsg4g8v0L9d6Mb5DK"
http://localhost:3001/api/buckets/mybucket/my_new_blob?format=xml
Note the use of the '-iv' flags here which will ensure that cURL displays the request and response headers (blob metadata is reported in the response headers, with an empty response body).
;T; @ē; @ēI"/assets/img/pattern/;T{;{I"$/assets/img/deltacloud_concept/;T{;{I"/assets/img/asf/;T{;{I",/assets/img/glyphicons-halflings-white/;T{;{I" /assets/js/bootstrap-alert/;T{;{;I"Œ /* ========================================================== * bootstrap-alert.js v2.0.1 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ !function( $ ){ "use strict" /* ALERT CLASS DEFINITION * ====================== */ var dismiss = '[data-dismiss="alert"]' , Alert = function ( el ) { $(el).on('click', dismiss, this.close) } Alert.prototype = { constructor: Alert , close: function ( e ) { var $this = $(this) , selector = $this.attr('data-target') , $parent if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } $parent = $(selector) $parent.trigger('close') e && e.preventDefault() $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) $parent .trigger('close') .removeClass('in') function removeElement() { $parent .trigger('closed') .remove() } $.support.transition && $parent.hasClass('fade') ? $parent.on($.support.transition.end, removeElement) : removeElement() } } /* ALERT PLUGIN DEFINITION * ======================= */ $.fn.alert = function ( option ) { return this.each(function () { var $this = $(this) , data = $this.data('alert') if (!data) $this.data('alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call($this) }) } $.fn.alert.Constructor = Alert /* ALERT DATA-API * ============== */ $(function () { $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) }) }( window.jQuery );;T; @÷; @÷I" /assets/js/bootstrap-modal/;T{;{;I"£/* ========================================================= * bootstrap-modal.js v2.0.1 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================= */ !function( $ ){ "use strict" /* MODAL CLASS DEFINITION * ====================== */ var Modal = function ( content, options ) { this.options = options this.$element = $(content) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) } Modal.prototype = { constructor: Modal , toggle: function () { return this[!this.isShown ? 'show' : 'hide']() } , show: function () { var that = this if (this.isShown) return $('body').addClass('modal-open') this.isShown = true this.$element.trigger('show') escape.call(this) backdrop.call(this, function () { var transition = $.support.transition && that.$element.hasClass('fade') !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position that.$element .show() if (transition) { that.$element[0].offsetWidth // force reflow } that.$element.addClass('in') transition ? that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.trigger('shown') }) } , hide: function ( e ) { e && e.preventDefault() if (!this.isShown) return var that = this this.isShown = false $('body').removeClass('modal-open') escape.call(this) this.$element .trigger('hide') .removeClass('in') $.support.transition && this.$element.hasClass('fade') ? hideWithTransition.call(this) : hideModal.call(this) } } /* MODAL PRIVATE METHODS * ===================== */ function hideWithTransition() { var that = this , timeout = setTimeout(function () { that.$element.off($.support.transition.end) hideModal.call(that) }, 500) this.$element.one($.support.transition.end, function () { clearTimeout(timeout) hideModal.call(that) }) } function hideModal( that ) { this.$element .hide() .trigger('hidden') backdrop.call(this) } function backdrop( callback ) { var that = this , animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { var doAnimate = $.support.transition && animate this.$backdrop = $(' ;T; I"ę

The API entry point

Any part of the official API can be reached through the main entry point, by default http://localhost:3001/api. The entry point lists the resources for the current cloud provider, which the server knows about. For example, for the Amazon EC2 driver these are:

  • instances
  • instance states
  • images
  • realms
  • hardware profiles
  • keys
  • buckets
  • storage volumes
  • storage snapshots
  • load balancers
  • addresses
  • firewalls

Example request:

GET /api?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1439

<api driver='ec2' version='0.3.0'>
  <link href='http://localhost:3001/api/instance_states' rel='instance_states'>
  </link>
  <link href='http://localhost:3001/api/drivers' rel='drivers'>
  </link>
  <link href='http://localhost:3001/api/addresses' rel='addresses'>
  </link>
  <link href='http://localhost:3001/api/hardware_profiles' rel='hardware_profiles'>
  </link>
  <link href='http://localhost:3001/api/firewalls' rel='firewalls'>
  </link>
  <link href='http://localhost:3001/api/storage_volumes' rel='storage_volumes'>
  </link>
  <link href='http://localhost:3001/api/images' rel='images'>
    <feature name='owner_id'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/realms' rel='realms'>
  </link>
  <link href='http://localhost:3001/api/buckets' rel='buckets'>
    <feature name='bucket_location'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/instances' rel='instances'>
    <feature name='user_data'>
    </feature>
    <feature name='authentication_key'>
    </feature>
    <feature name='firewalls'>
    </feature>
    <feature name='instance_count'>
    </feature>
    <feature name='attach_snapshot'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>
  </link>
  <link href='http://localhost:3001/api/keys' rel='keys'>
  </link>
  <link href='http://localhost:3001/api/load_balancers' rel='load_balancers'>
  </link>
</api>

Some implementations for the Apache Deltacloud API may not support all resource types defined by API. For example, a Deltacloud instance pointing at a storage-only service will not expose compute resources like instances and hardware profiles.

Features

The Apache Deltacloud API defines the standard behavior and semantics for each of the resource types as a baseline for any API implementation. It is often desirable to enhance standard API behavior with specific features. The API also defines all features that can be supported by the API implementation - each of them has a fixed predefined meaning. For example, the feature user_name indicates that a user-specified name can be assigned to an instance when it is created. Features are advertised in the top-level entry point as illustrated below:

<api driver='mock' version='0.3.0'>
  ...
  <link href='http://localhost:3001/api/instances' rel='instances'>
    <feature name='hardware_profiles'></feature>
    <feature name='user_name'></feature>
    <feature name='authentication_key'></feature>
  </link>
  ...
</api>

These features are available to each collection in the Deltacloud API:

Feature Collection Operation Description
owner_id Images GET /api/images allows filtering of the image list by owner_id
user_name Instances POST /api/instances accepts a user-defined name on instance creation
user_data Instances POST /api/instances provide user-defined data that is accessible by the running instance
user_iso Instances POST /api/instances provides a base64 encoded gzipped ISO file accessible as CD-ROM drive by the running instnace
user_files Instances POST /api/instances accept files that will be placed into the launched instance
firewalls Instances POST /api/instances put the instance into one or more firewalls on launch
authentication_key Instances POST /api/instances provides the authentication key to access the instance
authentication_password Instances POST /api/instances provides the password to access the running instance
instance_count Instances POST /api/instances specifies the number of instances to launch in one operation
attach_snapshot Instances POST /api/instances attaches a storage snapshot to an instance as a storage volume
sandboxing Instances POST /api/instances launches an instance from a sandbox image (Gogrid specific)
bucket_location Buckets POST /api/buckets specifies a location that the bucket should be created in (e.g. specific cloud-provider datacenter)
Compute resources
;T; I"U


The API entry point

Any part of the official API can be reached through the main entry point, by default http://localhost:3001/api. The entry point lists the resources for the current cloud provider, which the server knows about. For example, for the Amazon EC2 driver these are:

  • instances
  • instance states
  • images
  • realms
  • hardware profiles
  • keys
  • buckets
  • storage volumes
  • storage snapshots
  • load balancers
  • addresses
  • firewalls

Example request:

GET /api?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*

Server response:

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1439

<api driver='ec2' version='0.3.0'>
  <link href='http://localhost:3001/api/instance_states' rel='instance_states'>
  </link>
  <link href='http://localhost:3001/api/drivers' rel='drivers'>
  </link>
  <link href='http://localhost:3001/api/addresses' rel='addresses'>
  </link>
  <link href='http://localhost:3001/api/hardware_profiles' rel='hardware_profiles'>
  </link>
  <link href='http://localhost:3001/api/firewalls' rel='firewalls'>
  </link>
  <link href='http://localhost:3001/api/storage_volumes' rel='storage_volumes'>
  </link>
  <link href='http://localhost:3001/api/images' rel='images'>
    <feature name='owner_id'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/realms' rel='realms'>
  </link>
  <link href='http://localhost:3001/api/buckets' rel='buckets'>
    <feature name='bucket_location'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/instances' rel='instances'>
    <feature name='user_data'>
    </feature>
    <feature name='authentication_key'>
    </feature>
    <feature name='firewalls'>
    </feature>
    <feature name='instance_count'>
    </feature>
    <feature name='attach_snapshot'>
    </feature>
  </link>
  <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>
  </link>
  <link href='http://localhost:3001/api/keys' rel='keys'>
  </link>
  <link href='http://localhost:3001/api/load_balancers' rel='load_balancers'>
  </link>
</api>

Some implementations for the Apache Deltacloud API may not support all resource types defined by API. For example, a Deltacloud instance pointing at a storage-only service will not expose compute resources like instances and hardware profiles.

Features

The Apache Deltacloud API defines the standard behavior and semantics for each of the resource types as a baseline for any API implementation. It is often desirable to enhance standard API behavior with specific features. The API also defines all features that can be supported by the API implementation - each of them has a fixed predefined meaning. For example, the feature user_name indicates that a user-specified name can be assigned to an instance when it is created. Features are advertised in the top-level entry point as illustrated below:

<api driver='mock' version='0.3.0'>
  ...
  <link href='http://localhost:3001/api/instances' rel='instances'>
    <feature name='hardware_profiles'></feature>
    <feature name='user_name'></feature>
    <feature name='authentication_key'></feature>
  </link>
  ...
</api>

These features are available to each collection in the Deltacloud API:

Feature Collection Operation Description
owner_id Images GET /api/images allows filtering of the image list by owner_id
user_name Instances POST /api/instances accepts a user-defined name on instance creation
user_data Instances POST /api/instances provide user-defined data that is accessible by the running instance
user_iso Instances POST /api/instances provides a base64 encoded gzipped ISO file accessible as CD-ROM drive by the running instnace
user_files Instances POST /api/instances accept files that will be placed into the launched instance
firewalls Instances POST /api/instances put the instance into one or more firewalls on launch
authentication_key Instances POST /api/instances provides the authentication key to access the instance
authentication_password Instances POST /api/instances provides the password to access the running instance
instance_count Instances POST /api/instances specifies the number of instances to launch in one operation
attach_snapshot Instances POST /api/instances attaches a storage snapshot to an instance as a storage volume
sandboxing Instances POST /api/instances launches an instance from a sandbox image (Gogrid specific)
bucket_location Buckets POST /api/buckets specifies a location that the bucket should be created in (e.g. specific cloud-provider datacenter)

Compute resources


;T; @ßI"/run-deltacloud-server/;T{;{ ;I"¦% Run the Deltacloud server


Quick-start guide

This guide focuses on a linux environment. Some of the Deltacloud developers are running recent versions of Fedora. However, you should be able to install Deltacloud on any OS that supports Ruby. If you are having any problems with installation, please let us know, we'd love to hear from you!

Running the Deltacloud server

Start the server by typing deltacloudd -i driver_id.

The driver_id is the name of the cloud provider that you have an account with, for example deltacloudd -i ec2.

If you don't yet have an account with a cloud provider, you can still try the Deltacloud mock driver:

deltacloudd -i mock

This will start the Deltacloud server on your local machine with the mock driver, accepting connections on port 3001 (default). From version 0.4.0 of Deltacloud, you can use the '-l' flag to see all available driver_ids that can be used with the deltacloudd executable:

$ deltacloudd -l

Available drivers:
* condor
* vsphere
* opennebula
* eucalyptus
* rhevm
* sbc
* azure
* gogrid
* mock
* rackspace
* rimuhosting
* terremark
* ec2

Deltacloud HTML interface

After you start the server, you are ready to use the Deltacloud HTML interface.

Open the address http://localhost:3001/api in your web browser:

To display the XML output from the server in the browser, append format=xml to each URL. On Webkit based browsers like Safari, you might need to instruct the server explicitly to return HTML. Do this by appending format=html to each URL.

Your browser will prompt you for credentials when you invoke an operation that requires authentication.

The '-h' flag will list all available options for deltacloudd. For example, to start the Deltacloud server with the Rackspace driver on port 10000 you can use:

$ deltacloudd -i rackspace -p 10000

If you want to install the server on another machine and make Deltacloud available on your local network, you need to bind the Deltacloud server to an address other than 'localhost' (default). To start the server use the IP address of a machine where you installed and started Deltacloud. For instance:

$ deltacloudd -i ec2 -p 5000 -r 192.168.10.200

This will make the Deltacloud server available at the address http://192.168.10.200:5000/api. Instead of IP address you can also use the hostname to start the server on another machine.

Using CIMI

To use CIMI, first, go to the direcotry ~/deltacloud/server/bin and start the Deltacloud server in the background:

./deltacloudd -i mock --cimi &

Then go to the directory ~/deltacloud/clients/cimi and start the CIMI client server in the background:

bin/start -u http://localhost:3001/cimi -r <your_server_host_name> &

Use the -r option to make your client accessible from other machines different from the machine on which you are running both servers.

If there are some problems when you start up the servers, you may have missing dependencies. Check the RubyGems list with the list above and make sure you don't have anything missing. If there are no problems with starting the servers, access the application using your browser by following URL:

http://<your_server_host_name>:4001/cimi

The browser will ask for credentials. To log in use mockuser and mockpassword as user ID and password.

Use Deltacloud


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"

Quick-start guide

This guide focuses on a linux environment. Some of the Deltacloud developers are running recent versions of Fedora. However, you should be able to install Deltacloud on any OS that supports Ruby. If you are having any problems with installation, please let us know, we'd love to hear from you!

Running the Deltacloud server

Start the server by typing deltacloudd -i driver_id.

The driver_id is the name of the cloud provider that you have an account with, for example deltacloudd -i ec2.

If you don't yet have an account with a cloud provider, you can still try the Deltacloud mock driver:

deltacloudd -i mock

This will start the Deltacloud server on your local machine with the mock driver, accepting connections on port 3001 (default). From version 0.4.0 of Deltacloud, you can use the '-l' flag to see all available driver_ids that can be used with the deltacloudd executable:

$ deltacloudd -l

Available drivers:
* condor
* vsphere
* opennebula
* eucalyptus
* rhevm
* sbc
* azure
* gogrid
* mock
* rackspace
* rimuhosting
* terremark
* ec2

Deltacloud HTML interface

After you start the server, you are ready to use the Deltacloud HTML interface.

Open the address http://localhost:3001/api in your web browser:

To display the XML output from the server in the browser, append format=xml to each URL. On Webkit based browsers like Safari, you might need to instruct the server explicitly to return HTML. Do this by appending format=html to each URL.

Your browser will prompt you for credentials when you invoke an operation that requires authentication.

The '-h' flag will list all available options for deltacloudd. For example, to start the Deltacloud server with the Rackspace driver on port 10000 you can use:

$ deltacloudd -i rackspace -p 10000

If you want to install the server on another machine and make Deltacloud available on your local network, you need to bind the Deltacloud server to an address other than 'localhost' (default). To start the server use the IP address of a machine where you installed and started Deltacloud. For instance:

$ deltacloudd -i ec2 -p 5000 -r 192.168.10.200

This will make the Deltacloud server available at the address http://192.168.10.200:5000/api. Instead of IP address you can also use the hostname to start the server on another machine.

Using CIMI

To use CIMI, first, go to the direcotry ~/deltacloud/server/bin and start the Deltacloud server in the background:

./deltacloudd -i mock --cimi &

Then go to the directory ~/deltacloud/clients/cimi and start the CIMI client server in the background:

bin/start -u http://localhost:3001/cimi -r <your_server_host_name> &

Use the -r option to make your client accessible from other machines different from the machine on which you are running both servers.

If there are some problems when you start up the servers, you may have missing dependencies. Check the RubyGems list with the list above and make sure you don't have anything missing. If there are no problems with starting the servers, access the application using your browser by following URL:

http://<your_server_host_name>:4001/cimi

The browser will ask for credentials. To log in use mockuser and mockpassword as user ID and password.

Use Deltacloud
;T; I"


Quick-start guide

This guide focuses on a linux environment. Some of the Deltacloud developers are running recent versions of Fedora. However, you should be able to install Deltacloud on any OS that supports Ruby. If you are having any problems with installation, please let us know, we'd love to hear from you!

Running the Deltacloud server

Start the server by typing deltacloudd -i driver_id.

The driver_id is the name of the cloud provider that you have an account with, for example deltacloudd -i ec2.

If you don't yet have an account with a cloud provider, you can still try the Deltacloud mock driver:

deltacloudd -i mock

This will start the Deltacloud server on your local machine with the mock driver, accepting connections on port 3001 (default). From version 0.4.0 of Deltacloud, you can use the '-l' flag to see all available driver_ids that can be used with the deltacloudd executable:

$ deltacloudd -l

Available drivers:
* condor
* vsphere
* opennebula
* eucalyptus
* rhevm
* sbc
* azure
* gogrid
* mock
* rackspace
* rimuhosting
* terremark
* ec2

Deltacloud HTML interface

After you start the server, you are ready to use the Deltacloud HTML interface.

Open the address http://localhost:3001/api in your web browser:

To display the XML output from the server in the browser, append format=xml to each URL. On Webkit based browsers like Safari, you might need to instruct the server explicitly to return HTML. Do this by appending format=html to each URL.

Your browser will prompt you for credentials when you invoke an operation that requires authentication.

The '-h' flag will list all available options for deltacloudd. For example, to start the Deltacloud server with the Rackspace driver on port 10000 you can use:

$ deltacloudd -i rackspace -p 10000

If you want to install the server on another machine and make Deltacloud available on your local network, you need to bind the Deltacloud server to an address other than 'localhost' (default). To start the server use the IP address of a machine where you installed and started Deltacloud. For instance:

$ deltacloudd -i ec2 -p 5000 -r 192.168.10.200

This will make the Deltacloud server available at the address http://192.168.10.200:5000/api. Instead of IP address you can also use the hostname to start the server on another machine.

Using CIMI

To use CIMI, first, go to the direcotry ~/deltacloud/server/bin and start the Deltacloud server in the background:

./deltacloudd -i mock --cimi &

Then go to the directory ~/deltacloud/clients/cimi and start the CIMI client server in the background:

bin/start -u http://localhost:3001/cimi -r <your_server_host_name> &

Use the -r option to make your client accessible from other machines different from the machine on which you are running both servers.

If there are some problems when you start up the servers, you may have missing dependencies. Check the RubyGems list with the list above and make sure you don't have anything missing. If there are no problems with starting the servers, access the application using your browser by following URL:

http://<your_server_host_name>:4001/cimi

The browser will ask for credentials. To log in use mockuser and mockpassword as user ID and password.

Use Deltacloud


;T; @åI"/cimi-rest/;T{;{ ;I"ŗ! CIMI REST Examples


The CIMI REST API

Apache Deltacloud exposes the DMTF Cloud Infrastructure Management Interface (CIMI) as an alternative to the native Deltacloud API. This means that clients can 'speak' the CIMI API to a Deltacloud server on the frontend, managing resources in any of the backend cloud providers supported by Deltacloud.

Note:

This is NOT a definitive guide to the DMTF CIMI specification. The full CIMI spec is available from the DMTF Cloud Management Initiative (DSP0263).

This page shows examples of interactions with the CIMI interface exposed by a Deltacloud server. The examples here cover the CIMI resources and collections that are currently supported in Deltacloud; we are constantly improving our CIMI implementation. If you come across any bugs or inconsistencies we'd be very happy to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Starting Deltacloud with the CIMI interface

The ā€“frontends (-f) flag is used to specify which frontends a deltacloud server should expose:


[user@name ~]$ deltacloudd -i ec2 -f cimi
Starting Deltacloud API :: ec2 :: http://localhost:3001/cimi/cloudEntryPoint

>> Thin web server (v1.5.0 codename Knife)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3001, CTRL+C to stop


The example above shows the deltacloud server with the CIMI interface and the EC2 driver. You can even expose both the deltacloud and the CIMI frontends with a single server, e.g. -f cimi,deltacloud .

As can be seen above, starting deltacloud in this way will expose the CIMI cloud entry point at localhost:3001/cimi/cloudEntryPoint.

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"

The CIMI REST API

Apache Deltacloud exposes the DMTF Cloud Infrastructure Management Interface (CIMI) as an alternative to the native Deltacloud API. This means that clients can 'speak' the CIMI API to a Deltacloud server on the frontend, managing resources in any of the backend cloud providers supported by Deltacloud.

Note:

This is NOT a definitive guide to the DMTF CIMI specification. The full CIMI spec is available from the DMTF Cloud Management Initiative (DSP0263).

This page shows examples of interactions with the CIMI interface exposed by a Deltacloud server. The examples here cover the CIMI resources and collections that are currently supported in Deltacloud; we are constantly improving our CIMI implementation. If you come across any bugs or inconsistencies we'd be very happy to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Starting Deltacloud with the CIMI interface

The --frontends (-f) flag is used to specify which frontends a deltacloud server should expose:


[user@name ~]$ deltacloudd -i ec2 -f cimi
Starting Deltacloud API :: ec2 :: http://localhost:3001/cimi/cloudEntryPoint

>> Thin web server (v1.5.0 codename Knife)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3001, CTRL+C to stop


The example above shows the deltacloud server with the CIMI interface and the EC2 driver. You can even expose both the deltacloud and the CIMI frontends with a single server, e.g. -f cimi,deltacloud . As can be seen above, starting deltacloud in this way will expose the CIMI cloud entry point at localhost:3001/cimi/cloudEntryPoint.;T; I"6


The CIMI REST API

Apache Deltacloud exposes the DMTF Cloud Infrastructure Management Interface (CIMI) as an alternative to the native Deltacloud API. This means that clients can 'speak' the CIMI API to a Deltacloud server on the frontend, managing resources in any of the backend cloud providers supported by Deltacloud.

Note:

This is NOT a definitive guide to the DMTF CIMI specification. The full CIMI spec is available from the DMTF Cloud Management Initiative (DSP0263).

This page shows examples of interactions with the CIMI interface exposed by a Deltacloud server. The examples here cover the CIMI resources and collections that are currently supported in Deltacloud; we are constantly improving our CIMI implementation. If you come across any bugs or inconsistencies we'd be very happy to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Starting Deltacloud with the CIMI interface

The ā€“frontends (-f) flag is used to specify which frontends a deltacloud server should expose:


[user@name ~]$ deltacloudd -i ec2 -f cimi
Starting Deltacloud API :: ec2 :: http://localhost:3001/cimi/cloudEntryPoint

>> Thin web server (v1.5.0 codename Knife)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3001, CTRL+C to stop


The example above shows the deltacloud server with the CIMI interface and the EC2 driver. You can even expose both the deltacloud and the CIMI frontends with a single server, e.g. -f cimi,deltacloud .

As can be seen above, starting deltacloud in this way will expose the CIMI cloud entry point at localhost:3001/cimi/cloudEntryPoint.

;T; @ėI"/assets/img/logo_black/;T{;{I"/assets/img/logo2/;T{;{I"/assets/img/logo_old/;T{;{I"/cimi-rest-entry-point/;T{;{ ;I"L# CIMI Cloud Entry Point


The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I" 

The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>
;T; I"


The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>
;T; @śI"/cimi-rest-collections/;T{;{ ;I"Œ? CIMI Resource Collections - Machine


CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"i*

CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I"P*


CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).


Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @I"/cimi-rest-machine-images/;T{;{ ;I"L4 CIMI Resource Collections - Machine Image


Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I""

Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I" 


Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @I"/cimi-curl/;T{;{ ;I"Õ CIMI cURL Examples


Working with cURL against the Deltacloud CIMI frontend

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against the Deltacloud CIMI frontend. All the examples on this page assume the Deltacloud server is running at localhost:3001:

  • Credentials are specified with --user "name:password"
  • Request headers are specified with -H "header: value" .
  • HTTP verbs are specified with -X VERB
  • The -i flag will show you the response headers and the -v flag will show you request and response headers as well as info about cURL activity:
curl -v -X DELETE --user "username:password" -H "Accept: application/xml" http://localhost:3001/cimi/machine_images/my_image
      

Select a CIMI resource from the right-hand navigation bar to see cURL examples for that resource.

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"f

Working with cURL against the Deltacloud CIMI frontend

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against the Deltacloud CIMI frontend. All the examples on this page assume the Deltacloud server is running at localhost:3001:

  • Credentials are specified with --user "name:password"
  • Request headers are specified with -H "header: value" .
  • HTTP verbs are specified with -X VERB
  • The -i flag will show you the response headers and the -v flag will show you request and response headers as well as info about cURL activity:
curl -v -X DELETE --user "username:password" -H "Accept: application/xml" http://localhost:3001/cimi/machine_images/my_image
      

Select a CIMI resource from the right-hand navigation bar to see cURL examples for that resource.

;T; I"Q


Working with cURL against the Deltacloud CIMI frontend

The cURL documentation is pretty comprehensive, but the following are some general points to remember for using cURL against the Deltacloud CIMI frontend. All the examples on this page assume the Deltacloud server is running at localhost:3001:

  • Credentials are specified with --user "name:password"
  • Request headers are specified with -H "header: value" .
  • HTTP verbs are specified with -X VERB
  • The -i flag will show you the response headers and the -v flag will show you request and response headers as well as info about cURL activity:
curl -v -X DELETE --user "username:password" -H "Accept: application/xml" http://localhost:3001/cimi/machine_images/my_image
      

Select a CIMI resource from the right-hand navigation bar to see cURL examples for that resource.

;T; @ I" /cimi-rest-machine-configs/;T{;{ ;I"j+ CIMI Resource Collections - Machine Configuration


Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"=

Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


;T; I" 


Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


;T; @I""/cimi-rest-machine-templates/;T{;{ ;I"Z6 CIMI Resource Collections - Machine Template


Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"0!

Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I"!


Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @I"*/cimi-rest/cimi-rest-machine-configs/;T{;{ ;I", CIMI Resource Collections - Machine Configuration


Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"ā

Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


;T; I"w


Machine Configuration

The Machine Configuration resource represents the set of configuration values that define the (virtual) hardware resources of a to-be-realized Machine Instance. Machine Configurations are created by Providers and may, at the Providers discretion, be created by Consumers. A Machine Configuration Collection resource represents the collection of Machine Configuration resources within a Provider


Retrieve the Machine Configuration Collection

Example request:

GET /cimi/machine_configurations 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: 1504
ETag: 69348a8afa58a1c35b6cfad7c4066a9e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:12:23 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/MachineConfigurationCollection">
  <id>http://localhost:3001/cimi/machine_configurations</id>
  <count>3</count>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-small</id>
    <name>m1-small</name>
    <description>Machine Configuration with 1782579 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disk>
      <capacity>167772160</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
    <name>m1-large</name>
    <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>1</cpu>
    <memory>10485760</memory>
    <disk>
      <capacity>891289600</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
  <MachineConfiguration>
    <id>http://localhost:3001/cimi/machine_configurations/m1-xlarge</id>
    <name>m1-xlarge</name>
    <description>Machine Configuration with 12582912 KiB of memory and 4 CPU</description>
    <created>2013-01-02T16:12:23+02:00</created>
    <cpu>4</cpu>
    <memory>12582912</memory>
    <disk>
      <capacity>1073741824</capacity>
      <format>unknown</format>
    </disk>
  </MachineConfiguration>
</Collection>

Retrieve a single Machine Configuration

Example request:

GET /cimi/machine_configurations/m1-large 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: 508
ETag: 33c094bbcec51437860280fd053f1023
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 02 Jan 2013 14:20:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineConfiguration">
  <id>http://localhost:3001/cimi/machine_configurations/m1-large</id>
  <name>m1-large</name>
  <description>Machine Configuration with 10485760 KiB of memory and 1 CPU</description>
  <created>2013-01-02T16:20:52+02:00</created>
  <cpu>1</cpu>
  <memory>10485760</memory>
  <disk>
    <capacity>891289600</capacity>
    <format>unknown</format>
  </disk>
</MachineConfiguration>


;T; @I")/cimi-rest/cimi-rest-machine-images/;T{;{ ;I"½6 CIMI Resource Collections - Machine Image


Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"”!

Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I""!


Machine Image

This resource represents the information necessary for hardware virtualized resources to create a Machine Instance; it contains configuration data such as startup instructions, including possible combinations of the following items, depending on the 'type' of Machine Image created: the software image, installation software, both a disk image and a set of software and parameters.

A Machine Image Collection resource represents the collection of Machine Image resources within a Provider.


Retrieve the Machine Image Collection

Note the 'add' URI of the Machine Image Collection resource in the example response below. This is the URI that is used for creating a new Machine Image (adding to the Machine Image Collection). This URI is also returned when dereferencing a Machine resource, as the href attribute of the 'capture' operation (when this is possible for the given Machine on the particular Cloud Provider).

Example request:

GET /cimi/machine_images 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: 1195
ETag: e2f73ed48eb2abeae77322eea56dfc5d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:23:35 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/MachineImageCollection">
  <id>http://localhost:3001/cimi/machine_images</id>
  <count>3</count>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img1</id>
    <name>img1</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img1</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img2</id>
    <name>img2</name>
    <description>Fedora 10</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img2</imageLocation>
  </MachineImage>
  <MachineImage>
    <id>http://localhost:3001/cimi/machine_images/img3</id>
    <name>img3</name>
    <description>JBoss</description>
    <created>2012-12-28T16:23:35+02:00</created>
    <state>AVAILABLE</state>
    <type>IMAGE</type>
    <imageLocation>mock://img3</imageLocation>
  </MachineImage>
  <operation rel="add" href="http://localhost:3001/cimi/machine_images" />
</Collection>

Retrieve a single Machine Image

Example request:

GET /cimi/machine_images/img1 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: 385
ETag: 130f8e9592138afc544d65d73039e540
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 14:55:42 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/img1</id>
  <name>img1</name>
  <description>Fedora 10</description>
  <created>2012-12-28T16:55:42+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://img1</imageLocation>
</MachineImage>

Create a new Machine Image

The example below shows the creation of a new Machine Image resource from an existing Machine resource. When supported by the Machine and the given Cloud Provider, the href attribute of the serialized Machine resource's 'capture' operation provides the URI to which the request body should be sent with HTTP POST in order to create the new Machine Image. The message body is the representation of the to be created Machine Image resource, with the 'imageLocation' attribute referring to the Machine resource from which the Machine Image is to be created, as shown in the example below:

Example request:

POST /cimi/machine_images 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: 188
<MachineImage>
  <name>some_name</name>
  <description>my new machine_image</description>
  <type>IMAGE</type>
  <imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_images/some_name
CIMI-Specification-Version: 1.0.1
Content-Length: 411
ETag: c929191a65da6564f9f69301d38eb6fc
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 15:10:12 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineImage xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineImage">
  <id>http://localhost:3001/cimi/machine_images/some_name</id>
  <name>some_name</name>
  <description>my new machine image</description>
  <created>2012-12-28T17:10:12+02:00</created>
  <state>AVAILABLE</state>
  <type>IMAGE</type>
  <imageLocation>mock://some_name</imageLocation>
</MachineImage>


Delete a Machine Image

Example request:

DELETE /cimi/machine_images/some_name 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, 28 Dec 2012 15:21:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @$I"&/cimi-rest/cimi-rest-entry-point/;T{;{ ;I"ī$ CIMI Cloud Entry Point


The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"•

The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>
;T; I"f


The CIMI Cloud Entry Point

The Cloud Entry Point represents the entry point into the cloud defined by the CIMI Model. The Cloud Entry Point implements a catalog of resources, such as Systems, System Templates, Machines, Machine Templates, etc., that can be queried and browsed by the Consumer.

A deltacloud server exposes the CIMI Cloud Entry Point at /cimi/cloudEntryPoint. When dereferencing this URI, the resources listed in the response include only those that are supported by the current deltacloud driver - whether the 'default' driver the server was started with, or that specified with the X-Deltacloud-Driver header.

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1754
ETag: 503bc06f24d1a51eddc62b33b870c70f
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 27 Dec 2012 15:23:23 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<CloudEntryPoint xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/CloudEntryPoint">
  <id>http://localhost:3001/cimi/cloudEntryPoint</id>
  <name>mock</name>
  <description>Cloud Entry Point for the Deltacloud mock driver</description>
  <created>2012-12-27T17:23:23+02:00</created>
  <baseURI>http://localhost:3001/cimi/</baseURI>
  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata" />
  <machines href="http://localhost:3001/cimi/machines" />
  <machineTemplates href="http://localhost:3001/cimi/machine_templates" />
  <machineImages href="http://localhost:3001/cimi/machine_images" />
  <credentials href="http://localhost:3001/cimi/credentials" />
  <volumes href="http://localhost:3001/cimi/volumes" />
  <volumeImages href="http://localhost:3001/cimi/volume_images" />
  <networks href="http://localhost:3001/cimi/networks" />
  <networkTemplates href="http://localhost:3001/cimi/network_templates" />
  <networkPorts href="http://localhost:3001/cimi/network_ports" />
  <networkPortTemplates href="http://localhost:3001/cimi/network_port_templates" />
  <addresses href="http://localhost:3001/cimi/addresses" />
  <addressTemplates href="http://localhost:3001/cimi/address_templates" />
  <forwardingGroups href="http://localhost:3001/cimi/forwarding_groups" />
  <forwardingGroupTemplates href="http://localhost:3001/cimi/forwarding_group_templates" />
  <volumeConfigs href="http://localhost:3001/cimi/volume_configurations" />
  <machineConfigs href="http://localhost:3001/cimi/machine_configurations" />
  <networkConfigs href="http://localhost:3001/cimi/network_configurations" />
  <networkPortConfigs href="http://localhost:3001/cimi/network_port_configurations" />
</CloudEntryPoint>
;T; @*I"&/cimi-rest/cimi-rest-collections/;T{;{ ;I"?S CIMI Resource Collections - Machine


CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).




Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

Work with Machine Volumes

Retrieve the MachineVolume Collection

Example request:

GET /cimi/machines/inst1/volumes 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: 747
ETag: 8e2d333a3747634c04942b7d219a8d59
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:50:26 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>1</count>
  <MachineVolume>
    <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
    <name>vol3</name>
    <description>MachineVolume vol3 for Machine inst1</description>
    <created>2009-07-30T14:35:11Z</created>
    <initialLocation>/dev/sda1</initialLocation>
    <volume href="http://localhost:3001/cimi/volumes/vol3" />
    <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
  </MachineVolume>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>
  


Attach a Volume to a Machine - aka add a new MachineVolume to the MachineVolumeCollection of a specific Machine resource

Example request:


POST /cimi/machines/inst1/volume_attach 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: 186

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <initialLocation> /dev/sdf </initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3"/>
</MachineVolume>
  

Server response:


HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst1/volumes/vol3
CIMI-Specification-Version: 1.0.1
Content-Length: 522
ETag: cba6ca3186fa1ca3b7caf6b19e857139
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:56:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
  <name>vol3</name>
  <description>MachineVolume vol3 for Machine inst1</description>
  <created>2009-07-30T14:35:11Z</created>
  <initialLocation>/dev/sdf</initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3" />
  <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
</MachineVolume>

  


Detach a Volume from a Machine - aka remove a MachineVolume from the MachineVolumeCollection of a specific Machine resource

Example request:

DELETE /cimi/machines/inst1/volumes/vol3 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: 304
ETag: 011fb5daa52162644aeb170c86dc08ce
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 17:11:02 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>0</count>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>

  

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"+>

CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).




Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

Work with Machine Volumes

Retrieve the MachineVolume Collection

Example request:

GET /cimi/machines/inst1/volumes 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: 747
ETag: 8e2d333a3747634c04942b7d219a8d59
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:50:26 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>1</count>
  <MachineVolume>
    <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
    <name>vol3</name>
    <description>MachineVolume vol3 for Machine inst1</description>
    <created>2009-07-30T14:35:11Z</created>
    <initialLocation>/dev/sda1</initialLocation>
    <volume href="http://localhost:3001/cimi/volumes/vol3" />
    <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
  </MachineVolume>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>
  


Attach a Volume to a Machine - aka add a new MachineVolume to the MachineVolumeCollection of a specific Machine resource

Example request:


POST /cimi/machines/inst1/volume_attach 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: 186

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <initialLocation> /dev/sdf </initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3"/>
</MachineVolume>
  

Server response:


HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst1/volumes/vol3
CIMI-Specification-Version: 1.0.1
Content-Length: 522
ETag: cba6ca3186fa1ca3b7caf6b19e857139
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:56:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
  <name>vol3</name>
  <description>MachineVolume vol3 for Machine inst1</description>
  <created>2009-07-30T14:35:11Z</created>
  <initialLocation>/dev/sdf</initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3" />
  <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
</MachineVolume>

  


Detach a Volume from a Machine - aka remove a MachineVolume from the MachineVolumeCollection of a specific Machine resource

Example request:

DELETE /cimi/machines/inst1/volumes/vol3 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: 304
ETag: 011fb5daa52162644aeb170c86dc08ce
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 17:11:02 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>0</count>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>

  
;T; I"Ŗ=


CIMI Resources and Collections

We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to hear about them.

In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF Cloud Management Initiative (DSP0263).




Machine

An instantiated compute resource that encapsulates both CPU and Memory. A Machine Collection resource represents the collection of Machine resources within a Provider


Retrieve the Machine Collection

Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection).

Example request:

GET /cimi/machines 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: 2293
ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:08:27 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/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst0/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst0/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2012-12-28T13:08:27+02:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
        href="http://localhost:3001/cimi/machines/inst1/restart" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
        href="http://localhost:3001/cimi/machines/inst1/stop" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
        href="http://localhost:3001/cimi/machine_images" />
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>


Retrieve a single Machine

Example request:

GET /cimi/machines/inst0 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: 1092
ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:20:28 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst0</id>
  <name>Mock Instance With Profile Change</name>
  <description>No description set for Machine Mock Instance With Profile Change</description>
  <created>2012-12-28T13:20:28+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>12582912</memory>
  <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst0/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst0/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Create a new Machine

The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource.

Example request:

POST /cimi/machines 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: 370

<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1">
  <name> myMachine1 </name>
  <description> my machine description </description>
  <machineTemplate>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small">
    </machineConfig>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1">
    </machineImage>
  </machineTemplate>
</MachineCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst3
CIMI-Specification-Version: 1.0.1
Content-Length: 1030
ETag: 360992481f1450f9d475f439e5105f9d
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 28 Dec 2012 11:47:58 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
  <id>http://localhost:3001/cimi/machines/inst3</id>
  <name> myMachine1 </name>
  <description> my machine description </description>
  <created>2012-12-28T13:47:58+02:00</created>
  <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
  <property key="credential">http://localhost:3001/cimi/credentials</property>
  <state>STARTED</state>
  <cpu>1</cpu>
  <memory>1782579</memory>
  <disks href="http://localhost:3001/cimi/machines/inst3/disks" />
  <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/restart"
          href="http://localhost:3001/cimi/machines/inst3/restart" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"
          href="http://localhost:3001/cimi/machines/inst3/stop" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
          href="http://localhost:3001/cimi/machine_images" />
</Machine>


Perform a Machine Operation

The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action.

Example request:

POST /cimi/machines/inst3/stop 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: 125

<Action xmlns="http://schemas.dmtf.org/cimi/1">
  <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action>
</Action>

Server response:

HTTP/1.1 202 Accepted
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Fri, 28 Dec 2012 14:01:43 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

Work with Machine Volumes

Retrieve the MachineVolume Collection

Example request:

GET /cimi/machines/inst1/volumes 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: 747
ETag: 8e2d333a3747634c04942b7d219a8d59
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:50:26 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>1</count>
  <MachineVolume>
    <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
    <name>vol3</name>
    <description>MachineVolume vol3 for Machine inst1</description>
    <created>2009-07-30T14:35:11Z</created>
    <initialLocation>/dev/sda1</initialLocation>
    <volume href="http://localhost:3001/cimi/volumes/vol3" />
    <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
  </MachineVolume>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>
  


Attach a Volume to a Machine - aka add a new MachineVolume to the MachineVolumeCollection of a specific Machine resource

Example request:


POST /cimi/machines/inst1/volume_attach 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: 186

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <initialLocation> /dev/sdf </initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3"/>
</MachineVolume>
  

Server response:


HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machines/inst1/volumes/vol3
CIMI-Specification-Version: 1.0.1
Content-Length: 522
ETag: cba6ca3186fa1ca3b7caf6b19e857139
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 14:56:52 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineVolume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineVolume">
  <id>http://localhost:3001/cimi/machines/inst1/volumes/vol3</id>
  <name>vol3</name>
  <description>MachineVolume vol3 for Machine inst1</description>
  <created>2009-07-30T14:35:11Z</created>
  <initialLocation>/dev/sdf</initialLocation>
  <volume href="http://localhost:3001/cimi/volumes/vol3" />
  <operation rel="delete" href="http://localhost:3001/cimi/machines/inst1/volumes/vol3" />
</MachineVolume>

  


Detach a Volume from a Machine - aka remove a MachineVolume from the MachineVolumeCollection of a specific Machine resource

Example request:

DELETE /cimi/machines/inst1/volumes/vol3 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: 304
ETag: 011fb5daa52162644aeb170c86dc08ce
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 18 Jan 2013 17:11:02 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/MachineVolumeCollection">
  <id>http://localhost:3001/cimi/machines/inst1/volumes</id>
  <count>0</count>
  <operation rel="add" href="http://localhost:3001/cimi/machines/inst1/volume_attach" />
</Collection>

  
;T; @0I",/cimi-rest/cimi-rest-machine-templates/;T{;{ ;I"7 CIMI Resource Collections - Machine Template


Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require the use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"ć!

Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require the use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I"p!


Machine Template

A Machine Template represents the set of metadata and instructions used in the creation of a Machine. A Machine Template Collection resource represents the collection of Machine Template resources within a Provider.

The CIMI specification follows a distinctive pattern with respect to creation of new resources - the machine template is a good example of this:

machineConfiguration + machineImage = machineTemplate ===> machine

A CIMI client (a consumer in CIMI terminology) uses a Machine Template to create a new Machine; a Machine Template consists of (amongst other attributes) a Machine Configuration and a Machine Image. Generally speaking - many CIMI resources require the use of a template for their creation and a template will typically consist of an image plus a configuration resource.


Retrieve the Machine Template Collection

Example request:

GET /cimi/machine_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: 1275
ETag: fba471ae32eca2b58fa02644b81b73aa
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:04:26 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/MachineTemplateCollection">
  <id>http://localhost:3001/cimi/machine_templates</id>
  <count>2</count>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/1</id>
    <name>myXmlTestMachineTemplate1</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/1" />
  </MachineTemplate>
  <MachineTemplate>
    <id>http://localhost:3001/cimi/machine_templates/2</id>
    <name>my_template_2</name>
    <description>Description of my MachineTemplate</description>
    <property key="test">value</property>
    <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
  </MachineTemplate>
</Collection>

Retrieve a single Machine Template

Example request:

GET /cimi/machine_templates/2 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: 607
ETag: 8f720ffacb6439a6920a5f5b0ec7bbfc
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 15:06:14 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/2</id>
  <name>my_template_2</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/machine_templates/2" />
</MachineTemplate>

Create a new Machine Template

Example request:

POST /cimi/machine_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: 334

<MachineTemplateCreate>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/>
  <machineImage href="http://localhost:3001/cimi/machine_images/img3"/>
</MachineTemplateCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/machine_templates/1
CIMI-Specification-Version: 1.0.1
Content-Length: 620
ETag: e848e33fa0886e6c3d2df3cb674485d7
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 03 Jan 2013 14:48:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<MachineTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineTemplate">
  <id>http://localhost:3001/cimi/machine_templates/1</id>
  <name>myXmlTestMachineTemplate1</name>
  <description>Description of my MachineTemplate</description>
  <property key="test">value</property>
  <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge" />
  <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete" href="http://localhost:3001/cimi/machine_templates/1" />
</MachineTemplate>

Delete a Machine Template

Example request:

DELETE /cimi/machine_templates/2 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: Thu, 03 Jan 2013 15:06:38 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @6I""/cimi-rest/cimi-rest-volumes/;T{;{ ;I"%< CIMI Resource Collections - Volume


Volume

A Volume represents storage at either the block or the file-system level. Volumes can be connected to Machines. Once connected, Volumes can be accessed by processes on that Machine.
A Volume Collection resource represents the collection of Volumes within a Provider.


Retrieve the Volume Collection

Example request:

GET /cimi/volumes 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: 1521
ETag: 5e589664c1b03a34ad42ffe606bd61f1
Cache-Control: max-age=0, private, must-revalidate
 Date: Fri, 04 Jan 2013 16:43:27 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/VolumeCollection">
  <id>http://localhost:3001/cimi/volumes</id>
  <count>3</count>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol3</id>
    <name>vol3</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>IN-USE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol3" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol2</id>
    <name>vol2</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol2" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol1</id>
    <name>vol1</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
  </Volume>
  <operation rel="add" href="http://localhost:3001/cimi/volumes" />
</Collection>

Retrieve a single Volume

Example request:

GET /cimi/volumes/vol1 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: 490
ETag: a4be42f0743b1a6efbd2ed431667e7d4
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 13:57:46 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/vol1</id>
  <name>vol1</name>
  <description>Description of Volume</description>
  <created>2009-07-30T14:35:11Z</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1048576</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
</Volume>


Create a Volume

Using VolumeTemplate with VolumeConfiguration by reference - Example request:

POST //cimi/volumes 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: 224

<VolumeCreate>
  <name> marios_new_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig
      href="http://localhost:3001/cimi/volume_configurations/2">
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567397
CIMI-Specification-Version: 1.0.1
Content-Length: 523
ETag: 56c05e34776373022cefda3c3c4467cb
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:03:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567397</id>
  <name>marios_new_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:03:17+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>2097152</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567397" />
</Volume>

Using VolumeTemplate with VolumeConfiguration by value - Example request:

POST /cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Accept:application/xml
Content-Type: application/xml
Content-Length: 239

<VolumeCreate>
  <name> marios_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig>
      <type>http://schemas.dmtf.org/cimi/1/mapped</type>
      <capacity> 1024 </capacity>
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567628
CIMI-Specification-Version: 1.0.1
Content-Length: 516
ETag: d82624fda83c895cbeaebb08fff005c6
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:07:08 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567628</id>
  <name>marios_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:07:08+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1024</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567628" />
</Volume>

Retrieve the Volume Collection

Example request:

DELETE /cimi/volumes/Volume1357567628 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Mon, 07 Jan 2013 14:16:21 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"’&

Volume

A Volume represents storage at either the block or the file-system level. Volumes can be connected to Machines. Once connected, Volumes can be accessed by processes on that Machine.
A Volume Collection resource represents the collection of Volumes within a Provider.


Retrieve the Volume Collection

Example request:

GET /cimi/volumes 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: 1521
ETag: 5e589664c1b03a34ad42ffe606bd61f1
Cache-Control: max-age=0, private, must-revalidate
 Date: Fri, 04 Jan 2013 16:43:27 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/VolumeCollection">
  <id>http://localhost:3001/cimi/volumes</id>
  <count>3</count>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol3</id>
    <name>vol3</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>IN-USE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol3" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol2</id>
    <name>vol2</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol2" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol1</id>
    <name>vol1</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
  </Volume>
  <operation rel="add" href="http://localhost:3001/cimi/volumes" />
</Collection>

Retrieve a single Volume

Example request:

GET /cimi/volumes/vol1 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: 490
ETag: a4be42f0743b1a6efbd2ed431667e7d4
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 13:57:46 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/vol1</id>
  <name>vol1</name>
  <description>Description of Volume</description>
  <created>2009-07-30T14:35:11Z</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1048576</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
</Volume>


Create a Volume

Using VolumeTemplate with VolumeConfiguration by reference - Example request:

POST //cimi/volumes 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: 224

<VolumeCreate>
  <name> marios_new_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig
      href="http://localhost:3001/cimi/volume_configurations/2">
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567397
CIMI-Specification-Version: 1.0.1
Content-Length: 523
ETag: 56c05e34776373022cefda3c3c4467cb
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:03:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567397</id>
  <name>marios_new_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:03:17+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>2097152</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567397" />
</Volume>

Using VolumeTemplate with VolumeConfiguration by value - Example request:

POST /cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Accept:application/xml
Content-Type: application/xml
Content-Length: 239

<VolumeCreate>
  <name> marios_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig>
      <type>http://schemas.dmtf.org/cimi/1/mapped</type>
      <capacity> 1024 </capacity>
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567628
CIMI-Specification-Version: 1.0.1
Content-Length: 516
ETag: d82624fda83c895cbeaebb08fff005c6
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:07:08 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567628</id>
  <name>marios_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:07:08+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1024</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567628" />
</Volume>

Retrieve the Volume Collection

Example request:

DELETE /cimi/volumes/Volume1357567628 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Mon, 07 Jan 2013 14:16:21 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

;T; I"‘&


Volume

A Volume represents storage at either the block or the file-system level. Volumes can be connected to Machines. Once connected, Volumes can be accessed by processes on that Machine.
A Volume Collection resource represents the collection of Volumes within a Provider.


Retrieve the Volume Collection

Example request:

GET /cimi/volumes 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: 1521
ETag: 5e589664c1b03a34ad42ffe606bd61f1
Cache-Control: max-age=0, private, must-revalidate
 Date: Fri, 04 Jan 2013 16:43:27 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/VolumeCollection">
  <id>http://localhost:3001/cimi/volumes</id>
  <count>3</count>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol3</id>
    <name>vol3</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>IN-USE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol3" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol2</id>
    <name>vol2</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol2" />
  </Volume>
  <Volume>
    <id>http://localhost:3001/cimi/volumes/vol1</id>
    <name>vol1</name>
    <description>Description of Volume</description>
    <created>2009-07-30T14:35:11Z</created>
    <state>AVAILABLE</state>
    <type>http://schemas.dmtf.org/cimi/1/mapped</type>
    <capacity>1048576</capacity>
    <bootable>false</bootable>
    <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
  </Volume>
  <operation rel="add" href="http://localhost:3001/cimi/volumes" />
</Collection>

Retrieve a single Volume

Example request:

GET /cimi/volumes/vol1 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: 490
ETag: a4be42f0743b1a6efbd2ed431667e7d4
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 13:57:46 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/vol1</id>
  <name>vol1</name>
  <description>Description of Volume</description>
  <created>2009-07-30T14:35:11Z</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1048576</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
</Volume>


Create a Volume

Using VolumeTemplate with VolumeConfiguration by reference - Example request:

POST //cimi/volumes 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: 224

<VolumeCreate>
  <name> marios_new_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig
      href="http://localhost:3001/cimi/volume_configurations/2">
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567397
CIMI-Specification-Version: 1.0.1
Content-Length: 523
ETag: 56c05e34776373022cefda3c3c4467cb
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:03:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567397</id>
  <name>marios_new_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:03:17+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>2097152</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567397" />
</Volume>

Using VolumeTemplate with VolumeConfiguration by value - Example request:

POST /cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Accept:application/xml
Content-Type: application/xml
Content-Length: 239

<VolumeCreate>
  <name> marios_volume </name>
  <description> a new volume </description>
  <volumeTemplate>
    <volumeConfig>
      <type>http://schemas.dmtf.org/cimi/1/mapped</type>
      <capacity> 1024 </capacity>
    </volumeConfig>
  </volumeTemplate>
</VolumeCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567628
CIMI-Specification-Version: 1.0.1
Content-Length: 516
ETag: d82624fda83c895cbeaebb08fff005c6
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:07:08 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
  <id>http://localhost:3001/cimi/volumes/Volume1357567628</id>
  <name>marios_volume</name>
  <description>a new volume</description>
  <created>2013-01-07T16:07:08+02:00</created>
  <state>AVAILABLE</state>
  <type>http://schemas.dmtf.org/cimi/1/mapped</type>
  <capacity>1024</capacity>
  <bootable>false</bootable>
  <operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567628" />
</Volume>

Retrieve the Volume Collection

Example request:

DELETE /cimi/volumes/Volume1357567628 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Mon, 07 Jan 2013 14:16:21 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

;T; @<I"(/cimi-rest/cimi-rest-volume-images/;T{;{ ;I"3 CIMI Resource Collections - Volume Image


Volume Image

This resource represents an image that could be placed on a pre-loaded volume.

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


Retrieve the Volume Image Collection

Example request:

GET /cimi/volume_images 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: 1095
ETag: ae3be87f858bb7c9b1000e5409c497f9
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 15:18:00 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/VolumeImageCollection">
  <id>http://localhost:3001/cimi/volume_images</id>
  <count>3</count>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap1</id>
    <name>snap1</name>
    <description>snap1</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap3</id>
    <name>snap3</name>
    <description>snap3</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap2</id>
    <name>snap2</name>
    <description>snap2</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
</Collection>

Retrieve a single Volume Image

Example request:

GET /cimi/volume_images/snap2 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 377
ETag: 134b5cae11297fd59b2a783a0ee430ed
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 13:40:54 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/snap1</id>
  <name>snap1</name>
  <description>snap1</description>
  <created>2009-07-29T18:15:24Z</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Create a Volume Image

A new Volume Image can be created from an existing Volume, by referencing the Volume resource with the imageLocation attribute in the message body. This is illustrated in the example below.

Example request:

POST /cimi/volume_images HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Content-Type: application/xml
Accept: application/xml
Content-Length: 210

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1">
  <name> my_vol_image </name>
  <description> marios first volume image </description>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1"/>
</VolumeImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_images/store_snapshot_1357663577
CIMI-Specification-Version: 1.0.1
Content-Length: 429
ETag: 5d4bdca8ed98295d1c463012bb8ff427
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 16:46:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/store_snapshot_1357663577</id>
  <name>my_vol_image</name>
  <description>marios first volume image</description>
  <created>2013-01-08T18:46:17+02:00</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Delete a Volume Image

Example request:

DELETE /cimi/volume_images/snap1 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Wed, 09 Jan 2013 15:45:32 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"å

Volume Image

This resource represents an image that could be placed on a pre-loaded volume.

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


Retrieve the Volume Image Collection

Example request:

GET /cimi/volume_images 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: 1095
ETag: ae3be87f858bb7c9b1000e5409c497f9
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 15:18:00 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/VolumeImageCollection">
  <id>http://localhost:3001/cimi/volume_images</id>
  <count>3</count>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap1</id>
    <name>snap1</name>
    <description>snap1</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap3</id>
    <name>snap3</name>
    <description>snap3</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap2</id>
    <name>snap2</name>
    <description>snap2</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
</Collection>

Retrieve a single Volume Image

Example request:

GET /cimi/volume_images/snap2 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 377
ETag: 134b5cae11297fd59b2a783a0ee430ed
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 13:40:54 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/snap1</id>
  <name>snap1</name>
  <description>snap1</description>
  <created>2009-07-29T18:15:24Z</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Create a Volume Image

A new Volume Image can be created from an existing Volume, by referencing the Volume resource with the imageLocation attribute in the message body. This is illustrated in the example below.

Example request:

POST /cimi/volume_images HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Content-Type: application/xml
Accept: application/xml
Content-Length: 210

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1">
  <name> my_vol_image </name>
  <description> marios first volume image </description>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1"/>
</VolumeImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_images/store_snapshot_1357663577
CIMI-Specification-Version: 1.0.1
Content-Length: 429
ETag: 5d4bdca8ed98295d1c463012bb8ff427
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 16:46:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/store_snapshot_1357663577</id>
  <name>my_vol_image</name>
  <description>marios first volume image</description>
  <created>2013-01-08T18:46:17+02:00</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Delete a Volume Image

Example request:

DELETE /cimi/volume_images/snap1 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Wed, 09 Jan 2013 15:45:32 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I"w


Volume Image

This resource represents an image that could be placed on a pre-loaded volume.

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


Retrieve the Volume Image Collection

Example request:

GET /cimi/volume_images 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: 1095
ETag: ae3be87f858bb7c9b1000e5409c497f9
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 15:18:00 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/VolumeImageCollection">
  <id>http://localhost:3001/cimi/volume_images</id>
  <count>3</count>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap1</id>
    <name>snap1</name>
    <description>snap1</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap3</id>
    <name>snap3</name>
    <description>snap3</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
  <VolumeImage>
    <id>http://localhost:3001/cimi/volume_images/snap2</id>
    <name>snap2</name>
    <description>snap2</description>
    <created>2009-07-29T18:15:24Z</created>
    <imageLocation href="http://localhost:3001/cimi/volumes/vol2" />
    <bootable>false</bootable>
  </VolumeImage>
</Collection>

Retrieve a single Volume Image

Example request:

GET /cimi/volume_images/snap2 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 377
ETag: 134b5cae11297fd59b2a783a0ee430ed
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 13:40:54 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/snap1</id>
  <name>snap1</name>
  <description>snap1</description>
  <created>2009-07-29T18:15:24Z</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Create a Volume Image

A new Volume Image can be created from an existing Volume, by referencing the Volume resource with the imageLocation attribute in the message body. This is illustrated in the example below.

Example request:

POST /cimi/volume_images HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Content-Type: application/xml
Accept: application/xml
Content-Length: 210

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1">
  <name> my_vol_image </name>
  <description> marios first volume image </description>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1"/>
</VolumeImage>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_images/store_snapshot_1357663577
CIMI-Specification-Version: 1.0.1
Content-Length: 429
ETag: 5d4bdca8ed98295d1c463012bb8ff427
Cache-Control: max-age=0, private, must-revalidate
Date: Tue, 08 Jan 2013 16:46:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/VolumeImage">
  <id>http://localhost:3001/cimi/volume_images/store_snapshot_1357663577</id>
  <name>my_vol_image</name>
  <description>marios first volume image</description>
  <created>2013-01-08T18:46:17+02:00</created>
  <imageLocation href="http://localhost:3001/cimi/volumes/vol1" />
  <bootable>false</bootable>
</VolumeImage>

Delete a Volume Image

Example request:

DELETE /cimi/volume_images/snap1 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: Wed, 09 Jan 2013 15:45:32 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @BI")/cimi-rest/cimi-rest-volume-configs/;T{;{ ;I"œ2 CIMI Resource Collections - Volume Configuration


Volume Configuration

The Volume Configuration resource represents the set of configuration values needed to create a Volume with certain characteristics. Volume Configurations are created by Providers and may, at the Providers discretion, be created by Consumers.

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


Retrieve the Volume Configuration Collection

Example request:

GET /cimi/volume_configurations 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: 1112
ETag: 5aee339b405efd86f41f33105c62623e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 09 Jan 2013 16:08:51 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/VolumeConfigurationCollection">
  <id>http://localhost:3001/cimi/volume_configurations</id>
  <count>2</count>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/6</id>
    <name>marios_volume_config</name>
    <description>a volume configuration</description>
    <format>qcow2</format>
    <capacity>10485760</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
  </VolumeConfiguration>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/7</id>
    <name>YAVC</name>
    <description> yet another volume configuration</description>
    <format>ext3</format>
    <capacity>1073741824</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/7" />
  </VolumeConfiguration>
  <operation rel="add" href="http://localhost:3001/cimi/volume_configurations" />
</Collection>

Retrieve a single Volume Configuration

Example request:

GET /cimi/volume_configurations/2 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: 386
ETag: 72e733ff826d0a3e486df8de3fe8c57c
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 10 Jan 2013 08:51:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/2</id>
  <name>volume-2</name>
  <description>Volume configuration with 2097152 kibibytes</description>
  <created>2013-01-10T10:51:03+02:00</created>
  <capacity>2097152</capacity>
</VolumeConfiguration>

Create a Volume Configuration

Example request:

POST /cimi/volume_configurations 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: 183

<VolumeConfigurationCreate>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10</capacity>
</VolumeConfigurationCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_configurations/6
CIMI-Specification-Version: 1.0.1
Content-Length: 481
ETag: 536caa3e459fc2aa9a0796f317317369
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:25:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/6</id>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10485760</capacity>
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
</VolumeConfiguration>

Delete a Volume Configuration

Example request:

DELETE /cimi/volume_configurations/7 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:27:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"i

Volume Configuration

The Volume Configuration resource represents the set of configuration values needed to create a Volume with certain characteristics. Volume Configurations are created by Providers and may, at the Providers discretion, be created by Consumers.

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


Retrieve the Volume Configuration Collection

Example request:

GET /cimi/volume_configurations 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: 1112
ETag: 5aee339b405efd86f41f33105c62623e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 09 Jan 2013 16:08:51 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/VolumeConfigurationCollection">
  <id>http://localhost:3001/cimi/volume_configurations</id>
  <count>2</count>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/6</id>
    <name>marios_volume_config</name>
    <description>a volume configuration</description>
    <format>qcow2</format>
    <capacity>10485760</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
  </VolumeConfiguration>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/7</id>
    <name>YAVC</name>
    <description> yet another volume configuration</description>
    <format>ext3</format>
    <capacity>1073741824</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/7" />
  </VolumeConfiguration>
  <operation rel="add" href="http://localhost:3001/cimi/volume_configurations" />
</Collection>

Retrieve a single Volume Configuration

Example request:

GET /cimi/volume_configurations/2 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: 386
ETag: 72e733ff826d0a3e486df8de3fe8c57c
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 10 Jan 2013 08:51:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/2</id>
  <name>volume-2</name>
  <description>Volume configuration with 2097152 kibibytes</description>
  <created>2013-01-10T10:51:03+02:00</created>
  <capacity>2097152</capacity>
</VolumeConfiguration>

Create a Volume Configuration

Example request:

POST /cimi/volume_configurations 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: 183

<VolumeConfigurationCreate>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10</capacity>
</VolumeConfigurationCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_configurations/6
CIMI-Specification-Version: 1.0.1
Content-Length: 481
ETag: 536caa3e459fc2aa9a0796f317317369
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:25:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/6</id>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10485760</capacity>
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
</VolumeConfiguration>

Delete a Volume Configuration

Example request:

DELETE /cimi/volume_configurations/7 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:27:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; I"ś


Volume Configuration

The Volume Configuration resource represents the set of configuration values needed to create a Volume with certain characteristics. Volume Configurations are created by Providers and may, at the Providers discretion, be created by Consumers.

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


Retrieve the Volume Configuration Collection

Example request:

GET /cimi/volume_configurations 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: 1112
ETag: 5aee339b405efd86f41f33105c62623e
Cache-Control: max-age=0, private, must-revalidate
Date: Wed, 09 Jan 2013 16:08:51 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/VolumeConfigurationCollection">
  <id>http://localhost:3001/cimi/volume_configurations</id>
  <count>2</count>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/6</id>
    <name>marios_volume_config</name>
    <description>a volume configuration</description>
    <format>qcow2</format>
    <capacity>10485760</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
  </VolumeConfiguration>
  <VolumeConfiguration>
    <id>http://localhost:3001/cimi/volume_configurations/7</id>
    <name>YAVC</name>
    <description> yet another volume configuration</description>
    <format>ext3</format>
    <capacity>1073741824</capacity>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/7" />
  </VolumeConfiguration>
  <operation rel="add" href="http://localhost:3001/cimi/volume_configurations" />
</Collection>

Retrieve a single Volume Configuration

Example request:

GET /cimi/volume_configurations/2 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: 386
ETag: 72e733ff826d0a3e486df8de3fe8c57c
Cache-Control: max-age=0, private, must-revalidate
Date: Thu, 10 Jan 2013 08:51:03 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/2</id>
  <name>volume-2</name>
  <description>Volume configuration with 2097152 kibibytes</description>
  <created>2013-01-10T10:51:03+02:00</created>
  <capacity>2097152</capacity>
</VolumeConfiguration>

Create a Volume Configuration

Example request:

POST /cimi/volume_configurations 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: 183

<VolumeConfigurationCreate>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10</capacity>
</VolumeConfigurationCreate>

Server response:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volume_configurations/6
CIMI-Specification-Version: 1.0.1
Content-Length: 481
ETag: 536caa3e459fc2aa9a0796f317317369
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 13:25:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife

<VolumeConfiguration xmlns="http://schemas.dmtf.org/cimi/1"
          resourceURI="http://schemas.dmtf.org/cimi/1/VolumeConfiguration">
  <id>http://localhost:3001/cimi/volume_configurations/6</id>
  <name>marios_volume_config</name>
  <description>a volume configuration</description>
  <format>qcow2</format>
  <capacity>10485760</capacity>
  <operation rel="http://schemas.dmtf.org/cimi/1/action/delete"
          href="http://localhost:3001/cimi/volume_configurations/6" />
</VolumeConfiguration>

Delete a Volume Configuration

Example request:

DELETE /cimi/volume_configurations/7 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:27:35 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
;T; @HI"+/cimi-rest/cimi-rest-volume-templates/;T{;{ ;I"A3 CIMI Resource Collections - Volume Template


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

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"

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
;T; I"¤


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
;T; @NI",/cimi-rest/cimi-rest-resource-metadata/;T{;{ ;I"ßI CIMI Resource Collections - Resource Metadata


Resource Metadata

ResourceMetadata may be used to:

  • Express constraints on the existing CIMI defined resource attributes (e.g., express a maximum for the 'cpu' attribute of the MachineConfiguration resource)
  • Introduce new attributes for CIMI defined resources together with any constraints governing these (e.g., a new 'location' attribute for the Volume resource that takes values from a defined set of strings)
  • Introduce new operations for any of the CIMI defined resources (e.g., define a new 'compress' operation for the Volume resource)
  • Express any Provider specific capabilities or features (e.g., the length of time that a Job resource will be retained after Job completion and before this is deleted)
Implementations of this specification should allow for Consumers to discover the metadata associated with each supported resource. Doing so allows for the discovery of Provider defined constraints on the CIMI defined attributes as well as discovery of any new extension attributes or operations that the Provider may have defined. ResourceMetadata can also be used to express any Provider specific capabilities or features. The mechanism by which this metadata is made available will be protocol specific.

Retrieve the ResourceMetadata Collection

Example request:

GET /cimi/resource_metadata HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 1675
ETag: 97a131617573093b156505f77202bf57
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 15:29:14 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/ResourceMetadataCollection">
  <id>http://localhost:3001/cimi/resource_metadata</id>
  <count>2</count>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/cloud_entry_point</id>
    <name>CloudEntryPoint</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/CloudEntryPoint</typeUri>
    <attribute name="driver" namespace="http://deltacloud.org/cimi/CloudEntryPoint/driver"
          type="text" required="true" />
    <attribute name="provider" namespace="http://deltacloud.org/cimi/CloudEntryPoint/provider"
          type="text" required="true" />
  </ResourceMetadata>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/machine</id>
    <name>Machine</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/Machine</typeUri>
    <attribute name="realm" namespace="http://deltacloud.org/cimi/Machine/realm"
           type="text" required="false">
      <constraint>
        <value>us</value>
      </constraint>
      <constraint>
        <value>eu</value>
      </constraint>
    </attribute>
    <attribute name="machine_image"
          namespace="http://deltacloud.org/cimi/Machine/machine_image" type="URI"
          required="false" />
    <capability name="DefaultInitialState"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"
          description="Indicates what the default initial state of a new Machine ">
          STARTED
    </capability>
    <capability name="InitialStates"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/InitialStates"
          description="Indicates the list of allowable initial states">
          STARTED,STOPPED
    </capability>
  </ResourceMetadata>
</Collection>

ResourceMetadata Capabilities


The following table describes the capability URIs defined by this specification. Providers may define new URIs and it is recommended that these URIs be dereferencable such that Consumers can discover the details of the new capability. The "Resource Name" column contains the name of the resource that may contain the specified capability within its ResourceMetadata. The "Capability Name" column contains the name of the specified capability and shall be unique within the scope of the corresponding resource. Each capability's URI shall be constructed by appending the "Resource Name", a slash(/), and the "Capability Name" to "http://schemas.dmtf.org/cimi/1/capability/". For example, the Machine's "InitialState" capability would have a URI of:

 http://schemas.dmtf.org/cimi/1/capability/Machine/InitialState 
Note that capabilities that apply to the Provider in general, and are not specific to any one resource, are associated with the Cloud Entry Point resource (in case a capability would apply only to the CloudEntryPoint resource itself, its definition would say so).


Resource Name Capability Name Description
CloudEntryPoint ExpandParameter Indicated whether the $expand query parameter is supported by the Provider.
CloudEntryPoint FilterParameter Indicates whether the $filter query parameter is supported by the Provider.
CloudEntryPoint firstParameter Indicates whether the $first and $last query parameters are supported by the Provider. Note that either both shall be supported or neither shall be supported.
CloudEntryPoint SelectParameter Indicated whether the $select query parameter is supported by the Provider.
System SystemComponentTemplateByValue Indicates that the Provider supports specifying Component Templates by-value in SystemTemplates.
Machine DefaultInitialState Indicates what the default initial state of a new Machine will be unless explicitly set by the "initialState" attribute
Machine InitialStates Indicates the list of allowable initial states that Consumer may choose from when creating a new Machine.
Machine MachineConfigByValue Indicates that the Provider supports specifying Machine Configurations by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineCredentialByValue Indicates that the Provider supports specifying Credential by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineImageByValue Indicates that the Provider supports specifying Machine Images by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineVolumeTemplatesByValue Indicates that the Provider supports specifying VolumeTemplates by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineStopForce Indicates that the Provider supports specifying the "force" option on the stop and restart operations.
Machine MachineStopForceDefault Indicates the default way in which the Provider will stop/restart a Machine. When set to "true", the Provider will forcefully stop the Machine, as opposed to a value of "false," which indicates that the Provider will attempt to gracefully stop the Machine.
Machine RestoreFromImage Indicates that the Provider supports restoring Machines from Machine Images that are not SNAPSHOT Machine Images.
Machine UserData Indicates which userData injection method will be used. See 5.14.1 for more information.
Credential CredentialTemplateByValue Indicates that the Provider supports specifying Credential Templates by-value in Credential create operations.
Volume SharedVolumeSupport Indicates that the Provider supports the sharing of volume resources across Machines. The value specified is of type "boolean."
Volume VolumeConfigByValue Indicates that the Provider supports specifying Volume Configurations by-value in the Volume create operation. If true, the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeImageByValue Indicates that the Provider supports specifying Volume Images by-value in the Volume create operation. If true the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeSnapshot Indicates that the Provider supports creating a new VolumeImage by referencing an existing Volume.
Volume VolumeTemplateByValue Indicates that the Provider supports specifying Volume Templates by-value in Volume create operations.
Network NetworkConfigByValue Indicates that the Provider supports specifying Network Configurations by-value in the Network create operation.
Network NetworkTemplateByValue Indicates that the Provider supports specifying Network Templates by-value in the Network create operation.
NetworkPort NetworkPortConfigByValue Indicates that the Provider supports specifying NetworkPort Configurations by-value in the NetworkPort create operation.
NetworkPort NetworkPortTemplateByValue Indicates that the Provider supports specifying NetworkPort Templates by-value in the NetworkPort create operation.
ForwardingGroup MixedNetwork Indicates whether ForwardingGroups can support both private and public connection at the same time.
Job JobRetention If the Provider supports Job resources as specified in this document, this capability indicates in minutes how long a job will live in the system before its deleted. In this case, the value attribute provides the number of minutes (e.g., 30 min). The value specified is of type "integer."
Meter MeterConfigByValue Indicates that the Provider supports specifying MeterConfigurations by-value in the Meter create operation.
Meter MeterTemplateByValue Indicates that the Provider supports specifying Meter Templates by-value in the Meter create operation.
EventLog Linked Indicates that the Provider shall delete EventLogs that are associated with resources when the resource is deleted.

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"Ā5

Resource Metadata

ResourceMetadata may be used to:

  • Express constraints on the existing CIMI defined resource attributes (e.g., express a maximum for the 'cpu' attribute of the MachineConfiguration resource)
  • Introduce new attributes for CIMI defined resources together with any constraints governing these (e.g., a new 'location' attribute for the Volume resource that takes values from a defined set of strings)
  • Introduce new operations for any of the CIMI defined resources (e.g., define a new 'compress' operation for the Volume resource)
  • Express any Provider specific capabilities or features (e.g., the length of time that a Job resource will be retained after Job completion and before this is deleted)
Implementations of this specification should allow for Consumers to discover the metadata associated with each supported resource. Doing so allows for the discovery of Provider defined constraints on the CIMI defined attributes as well as discovery of any new extension attributes or operations that the Provider may have defined. ResourceMetadata can also be used to express any Provider specific capabilities or features. The mechanism by which this metadata is made available will be protocol specific.

Retrieve the ResourceMetadata Collection

Example request:

GET /cimi/resource_metadata HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 1675
ETag: 97a131617573093b156505f77202bf57
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 15:29:14 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/ResourceMetadataCollection">
  <id>http://localhost:3001/cimi/resource_metadata</id>
  <count>2</count>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/cloud_entry_point</id>
    <name>CloudEntryPoint</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/CloudEntryPoint</typeUri>
    <attribute name="driver" namespace="http://deltacloud.org/cimi/CloudEntryPoint/driver"
          type="text" required="true" />
    <attribute name="provider" namespace="http://deltacloud.org/cimi/CloudEntryPoint/provider"
          type="text" required="true" />
  </ResourceMetadata>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/machine</id>
    <name>Machine</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/Machine</typeUri>
    <attribute name="realm" namespace="http://deltacloud.org/cimi/Machine/realm"
           type="text" required="false">
      <constraint>
        <value>us</value>
      </constraint>
      <constraint>
        <value>eu</value>
      </constraint>
    </attribute>
    <attribute name="machine_image"
          namespace="http://deltacloud.org/cimi/Machine/machine_image" type="URI"
          required="false" />
    <capability name="DefaultInitialState"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"
          description="Indicates what the default initial state of a new Machine ">
          STARTED
    </capability>
    <capability name="InitialStates"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/InitialStates"
          description="Indicates the list of allowable initial states">
          STARTED,STOPPED
    </capability>
  </ResourceMetadata>
</Collection>

ResourceMetadata Capabilities


The following table describes the capability URIs defined by this specification. Providers may define new URIs and it is recommended that these URIs be dereferencable such that Consumers can discover the details of the new capability. The "Resource Name" column contains the name of the resource that may contain the specified capability within its ResourceMetadata. The "Capability Name" column contains the name of the specified capability and shall be unique within the scope of the corresponding resource. Each capability's URI shall be constructed by appending the "Resource Name", a slash(/), and the "Capability Name" to "http://schemas.dmtf.org/cimi/1/capability/". For example, the Machine's "InitialState" capability would have a URI of:

 http://schemas.dmtf.org/cimi/1/capability/Machine/InitialState 
Note that capabilities that apply to the Provider in general, and are not specific to any one resource, are associated with the Cloud Entry Point resource (in case a capability would apply only to the CloudEntryPoint resource itself, its definition would say so).


Resource Name Capability Name Description
CloudEntryPoint ExpandParameter Indicated whether the $expand query parameter is supported by the Provider.
CloudEntryPoint FilterParameter Indicates whether the $filter query parameter is supported by the Provider.
CloudEntryPoint firstParameter Indicates whether the $first and $last query parameters are supported by the Provider. Note that either both shall be supported or neither shall be supported.
CloudEntryPoint SelectParameter Indicated whether the $select query parameter is supported by the Provider.
System SystemComponentTemplateByValue Indicates that the Provider supports specifying Component Templates by-value in SystemTemplates.
Machine DefaultInitialState Indicates what the default initial state of a new Machine will be unless explicitly set by the "initialState" attribute
Machine InitialStates Indicates the list of allowable initial states that Consumer may choose from when creating a new Machine.
Machine MachineConfigByValue Indicates that the Provider supports specifying Machine Configurations by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineCredentialByValue Indicates that the Provider supports specifying Credential by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineImageByValue Indicates that the Provider supports specifying Machine Images by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineVolumeTemplatesByValue Indicates that the Provider supports specifying VolumeTemplates by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineStopForce Indicates that the Provider supports specifying the "force" option on the stop and restart operations.
Machine MachineStopForceDefault Indicates the default way in which the Provider will stop/restart a Machine. When set to "true", the Provider will forcefully stop the Machine, as opposed to a value of "false," which indicates that the Provider will attempt to gracefully stop the Machine.
Machine RestoreFromImage Indicates that the Provider supports restoring Machines from Machine Images that are not SNAPSHOT Machine Images.
Machine UserData Indicates which userData injection method will be used. See 5.14.1 for more information.
Credential CredentialTemplateByValue Indicates that the Provider supports specifying Credential Templates by-value in Credential create operations.
Volume SharedVolumeSupport Indicates that the Provider supports the sharing of volume resources across Machines. The value specified is of type "boolean."
Volume VolumeConfigByValue Indicates that the Provider supports specifying Volume Configurations by-value in the Volume create operation. If true, the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeImageByValue Indicates that the Provider supports specifying Volume Images by-value in the Volume create operation. If true the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeSnapshot Indicates that the Provider supports creating a new VolumeImage by referencing an existing Volume.
Volume VolumeTemplateByValue Indicates that the Provider supports specifying Volume Templates by-value in Volume create operations.
Network NetworkConfigByValue Indicates that the Provider supports specifying Network Configurations by-value in the Network create operation.
Network NetworkTemplateByValue Indicates that the Provider supports specifying Network Templates by-value in the Network create operation.
NetworkPort NetworkPortConfigByValue Indicates that the Provider supports specifying NetworkPort Configurations by-value in the NetworkPort create operation.
NetworkPort NetworkPortTemplateByValue Indicates that the Provider supports specifying NetworkPort Templates by-value in the NetworkPort create operation.
ForwardingGroup MixedNetwork Indicates whether ForwardingGroups can support both private and public connection at the same time.
Job JobRetention If the Provider supports Job resources as specified in this document, this capability indicates in minutes how long a job will live in the system before its deleted. In this case, the value attribute provides the number of minutes (e.g., 30 min). The value specified is of type "integer."
Meter MeterConfigByValue Indicates that the Provider supports specifying MeterConfigurations by-value in the Meter create operation.
Meter MeterTemplateByValue Indicates that the Provider supports specifying Meter Templates by-value in the Meter create operation.
EventLog Linked Indicates that the Provider shall delete EventLogs that are associated with resources when the resource is deleted.
;T; I"@4


Resource Metadata

ResourceMetadata may be used to:

  • Express constraints on the existing CIMI defined resource attributes (e.g., express a maximum for the 'cpu' attribute of the MachineConfiguration resource)
  • Introduce new attributes for CIMI defined resources together with any constraints governing these (e.g., a new 'location' attribute for the Volume resource that takes values from a defined set of strings)
  • Introduce new operations for any of the CIMI defined resources (e.g., define a new 'compress' operation for the Volume resource)
  • Express any Provider specific capabilities or features (e.g., the length of time that a Job resource will be retained after Job completion and before this is deleted)
Implementations of this specification should allow for Consumers to discover the metadata associated with each supported resource. Doing so allows for the discovery of Provider defined constraints on the CIMI defined attributes as well as discovery of any new extension attributes or operations that the Provider may have defined. ResourceMetadata can also be used to express any Provider specific capabilities or features. The mechanism by which this metadata is made available will be protocol specific.

Retrieve the ResourceMetadata Collection

Example request:

GET /cimi/resource_metadata HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
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: 1675
ETag: 97a131617573093b156505f77202bf57
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 11 Jan 2013 15:29:14 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/ResourceMetadataCollection">
  <id>http://localhost:3001/cimi/resource_metadata</id>
  <count>2</count>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/cloud_entry_point</id>
    <name>CloudEntryPoint</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/CloudEntryPoint</typeUri>
    <attribute name="driver" namespace="http://deltacloud.org/cimi/CloudEntryPoint/driver"
          type="text" required="true" />
    <attribute name="provider" namespace="http://deltacloud.org/cimi/CloudEntryPoint/provider"
          type="text" required="true" />
  </ResourceMetadata>
  <ResourceMetadata>
    <id>http://localhost:3001/cimi/resource_metadata/machine</id>
    <name>Machine</name>
    <typeUri>http://schemas.dmtf.org/cimi/1/Machine</typeUri>
    <attribute name="realm" namespace="http://deltacloud.org/cimi/Machine/realm"
           type="text" required="false">
      <constraint>
        <value>us</value>
      </constraint>
      <constraint>
        <value>eu</value>
      </constraint>
    </attribute>
    <attribute name="machine_image"
          namespace="http://deltacloud.org/cimi/Machine/machine_image" type="URI"
          required="false" />
    <capability name="DefaultInitialState"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"
          description="Indicates what the default initial state of a new Machine ">
          STARTED
    </capability>
    <capability name="InitialStates"
          uri="http://schemas.dmtf.org/cimi/1/capability/Machine/InitialStates"
          description="Indicates the list of allowable initial states">
          STARTED,STOPPED
    </capability>
  </ResourceMetadata>
</Collection>

ResourceMetadata Capabilities


The following table describes the capability URIs defined by this specification. Providers may define new URIs and it is recommended that these URIs be dereferencable such that Consumers can discover the details of the new capability. The "Resource Name" column contains the name of the resource that may contain the specified capability within its ResourceMetadata. The "Capability Name" column contains the name of the specified capability and shall be unique within the scope of the corresponding resource. Each capability's URI shall be constructed by appending the "Resource Name", a slash(/), and the "Capability Name" to "http://schemas.dmtf.org/cimi/1/capability/". For example, the Machine's "InitialState" capability would have a URI of:

 http://schemas.dmtf.org/cimi/1/capability/Machine/InitialState 
Note that capabilities that apply to the Provider in general, and are not specific to any one resource, are associated with the Cloud Entry Point resource (in case a capability would apply only to the CloudEntryPoint resource itself, its definition would say so).


Resource Name Capability Name Description
CloudEntryPoint ExpandParameter Indicated whether the $expand query parameter is supported by the Provider.
CloudEntryPoint FilterParameter Indicates whether the $filter query parameter is supported by the Provider.
CloudEntryPoint firstParameter Indicates whether the $first and $last query parameters are supported by the Provider. Note that either both shall be supported or neither shall be supported.
CloudEntryPoint SelectParameter Indicated whether the $select query parameter is supported by the Provider.
System SystemComponentTemplateByValue Indicates that the Provider supports specifying Component Templates by-value in SystemTemplates.
Machine DefaultInitialState Indicates what the default initial state of a new Machine will be unless explicitly set by the "initialState" attribute
Machine InitialStates Indicates the list of allowable initial states that Consumer may choose from when creating a new Machine.
Machine MachineConfigByValue Indicates that the Provider supports specifying Machine Configurations by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineCredentialByValue Indicates that the Provider supports specifying Credential by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineImageByValue Indicates that the Provider supports specifying Machine Images by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineVolumeTemplatesByValue Indicates that the Provider supports specifying VolumeTemplates by-value in Machine create operations. If true the MachineTemplateByValue capability shall also be specified with a value of true.
Machine MachineStopForce Indicates that the Provider supports specifying the "force" option on the stop and restart operations.
Machine MachineStopForceDefault Indicates the default way in which the Provider will stop/restart a Machine. When set to "true", the Provider will forcefully stop the Machine, as opposed to a value of "false," which indicates that the Provider will attempt to gracefully stop the Machine.
Machine RestoreFromImage Indicates that the Provider supports restoring Machines from Machine Images that are not SNAPSHOT Machine Images.
Machine UserData Indicates which userData injection method will be used. See 5.14.1 for more information.
Credential CredentialTemplateByValue Indicates that the Provider supports specifying Credential Templates by-value in Credential create operations.
Volume SharedVolumeSupport Indicates that the Provider supports the sharing of volume resources across Machines. The value specified is of type "boolean."
Volume VolumeConfigByValue Indicates that the Provider supports specifying Volume Configurations by-value in the Volume create operation. If true, the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeImageByValue Indicates that the Provider supports specifying Volume Images by-value in the Volume create operation. If true the VolumeTemplateByValue capability shall also be specified with a value of true.
Volume VolumeSnapshot Indicates that the Provider supports creating a new VolumeImage by referencing an existing Volume.
Volume VolumeTemplateByValue Indicates that the Provider supports specifying Volume Templates by-value in Volume create operations.
Network NetworkConfigByValue Indicates that the Provider supports specifying Network Configurations by-value in the Network create operation.
Network NetworkTemplateByValue Indicates that the Provider supports specifying Network Templates by-value in the Network create operation.
NetworkPort NetworkPortConfigByValue Indicates that the Provider supports specifying NetworkPort Configurations by-value in the NetworkPort create operation.
NetworkPort NetworkPortTemplateByValue Indicates that the Provider supports specifying NetworkPort Templates by-value in the NetworkPort create operation.
ForwardingGroup MixedNetwork Indicates whether ForwardingGroups can support both private and public connection at the same time.
Job JobRetention If the Provider supports Job resources as specified in this document, this capability indicates in minutes how long a job will live in the system before its deleted. In this case, the value attribute provides the number of minutes (e.g., 30 min). The value specified is of type "integer."
Meter MeterConfigByValue Indicates that the Provider supports specifying MeterConfigurations by-value in the Meter create operation.
Meter MeterTemplateByValue Indicates that the Provider supports specifying Meter Templates by-value in the Meter create operation.
EventLog Linked Indicates that the Provider shall delete EventLogs that are associated with resources when the resource is deleted.
;T; @TI"#/cimi-curl/cimi-curl-machines/;T{;{ ;I"¹5 CIMI cURL Examples - Machine Resources



Working with Machines

Retrieve the Machine Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machines 

Create a new Machine with the message body in XML format:

curl -v --user "mockuser:mockpassword" -X POST -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1"> <name> myMachine1 </name> <description> my machine description </description> <machineTemplate> <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small"> </machineConfig> <machineImage href="http://localhost:3001/cimi/machine_images/img1"> </machineImage> </machineTemplate> </MachineCreate>'

Alternatively, specifying the message body in JSON:

 curl -v --user "user:password" -X POST -H "Content-Type: application/json" -H "Accept: application/xml" -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineCreate", "name": "myMachine3", "description": "My very first json machine", "machineTemplate": { "machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1.small" }, "machineImage": { "href": "http://localhost:3001/cimi/machine_images/ami-48aa4921" } } }' http://localhost:3001/cimi/machines

Perform a Machine operation - stop - with the message body in XML format:

curl -v -X POST --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<Action xmlns="http://schemas.dmtf.org/cimi/1"><action> http://http://schemas.dmtf.org/cimi/1/action/stop </action> </Action>'  http://localhost:3001/cimi/machines/inst3/stop

Alternatively, specifying the message body in JSON:

 curl -v -X POST --user "user:password" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"resourceURI": "http://www.dmtf.org/cimi/1/Action", "action":"http://www.dmtf.org/cimi/action/stop"}' http://localhost:3001/cimi/machines/i-5feb7c20/stop


Working with Machine Images

Retrieve the Machine Image Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_images

Create a new Machine Image from an existing Machine, with message body in JSON:

curl --user "mockuser:mockpassword" -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineImage", "name":"new_image","description":"my new machine image","type":"IMAGE", "imageLocation":"http://localhost:3001/cimi/machines/inst1"}' http://localhost:3001/cimi/machine_images

Alternatively, specifying the message body in XML:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d "<MachineImage><name>some_name</name><description>my new machine image</description><type>IMAGE</type><imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation></MachineImage>" http://localhost:3001/cimi/machine_images

Delete a Machine Image:

curl -X DELETE --user "user:pass" http://localhost:3001/cimi/machine_images/my_image 


Working with Machine Configurations

Retrieve the Machine Configuration Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations

Retrieve a specific Machine Configuration:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations/m1-large

Working with Machine Templates

Retrieve the Machine Template Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Retrieve a specific Machine Template:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates/m1-large

Create a Machine Template with XML body:

curl -v --user "mockuser:mockpassword" -X POST -d '<MachineTemplateCreate><name>myXmlTestMachineTemplate1</name><description>Description of my MachineTemplate</description><property key="test">value</property><machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/><machineImage href="http://localhost:3001/cimi/machine_images/img3"/></MachineTemplateCreate>' -H "Content-Type: application/xml"  -H "Accept: application/xml" http://localhost:3001/cimi/machine_templates

Create a Machine Template with JSON body:

curl -v --user "mockuser:mockpassword" -X POST -d '{"resourceURI": "http://schemas.dmtf.org/cimi/1/MachineTemplateCreate","name": "myMachineDemoTemplate","description": "My very loved machine template","machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1-xlarge" },"machineImage": { "href": "http://localhost:3001/cimi/machine_images/img3" },"properties": { "foo": "bar","life": "is life"}}' -H "Content-Type: application/json"  -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Delete a Machine Template:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machine_templates/2

Working with Machine Volumes

Retrieve the Machine Volume Collection of a given Machine resource:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/machines/inst1/volumes

Attach a Volume to a Machine, with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d ' /dev/sdf '  http://localhost:3001/cimi/machines/inst1/volume_attach

Attach a Volume to a Machine, with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineVolume", "initialLocation": "/dev/sdf", "volume": {"href":"http://localhost:3001/cimi/volumes/vol2"}}' http://localhost:3001/cimi/machines/inst1/volume_attach

Detach a Volume from a Machine:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machines/inst1/volumes/vol2

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"J

Working with Machines

Retrieve the Machine Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machines 

Create a new Machine with the message body in XML format:

curl -v --user "mockuser:mockpassword" -X POST -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1"> <name> myMachine1 </name> <description> my machine description </description> <machineTemplate> <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small"> </machineConfig> <machineImage href="http://localhost:3001/cimi/machine_images/img1"> </machineImage> </machineTemplate> </MachineCreate>'

Alternatively, specifying the message body in JSON:

 curl -v --user "user:password" -X POST -H "Content-Type: application/json" -H "Accept: application/xml" -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineCreate", "name": "myMachine3", "description": "My very first json machine", "machineTemplate": { "machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1.small" }, "machineImage": { "href": "http://localhost:3001/cimi/machine_images/ami-48aa4921" } } }' http://localhost:3001/cimi/machines

Perform a Machine operation - stop - with the message body in XML format:

curl -v -X POST --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<Action xmlns="http://schemas.dmtf.org/cimi/1"><action> http://http://schemas.dmtf.org/cimi/1/action/stop </action> </Action>'  http://localhost:3001/cimi/machines/inst3/stop

Alternatively, specifying the message body in JSON:

 curl -v -X POST --user "user:password" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"resourceURI": "http://www.dmtf.org/cimi/1/Action", "action":"http://www.dmtf.org/cimi/action/stop"}' http://localhost:3001/cimi/machines/i-5feb7c20/stop


Working with Machine Images

Retrieve the Machine Image Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_images

Create a new Machine Image from an existing Machine, with message body in JSON:

curl --user "mockuser:mockpassword" -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineImage", "name":"new_image","description":"my new machine image","type":"IMAGE", "imageLocation":"http://localhost:3001/cimi/machines/inst1"}' http://localhost:3001/cimi/machine_images

Alternatively, specifying the message body in XML:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d "<MachineImage><name>some_name</name><description>my new machine image</description><type>IMAGE</type><imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation></MachineImage>" http://localhost:3001/cimi/machine_images

Delete a Machine Image:

curl -X DELETE --user "user:pass" http://localhost:3001/cimi/machine_images/my_image 


Working with Machine Configurations

Retrieve the Machine Configuration Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations

Retrieve a specific Machine Configuration:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations/m1-large

Working with Machine Templates

Retrieve the Machine Template Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Retrieve a specific Machine Template:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates/m1-large

Create a Machine Template with XML body:

curl -v --user "mockuser:mockpassword" -X POST -d '<MachineTemplateCreate><name>myXmlTestMachineTemplate1</name><description>Description of my MachineTemplate</description><property key="test">value</property><machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/><machineImage href="http://localhost:3001/cimi/machine_images/img3"/></MachineTemplateCreate>' -H "Content-Type: application/xml"  -H "Accept: application/xml" http://localhost:3001/cimi/machine_templates

Create a Machine Template with JSON body:

curl -v --user "mockuser:mockpassword" -X POST -d '{"resourceURI": "http://schemas.dmtf.org/cimi/1/MachineTemplateCreate","name": "myMachineDemoTemplate","description": "My very loved machine template","machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1-xlarge" },"machineImage": { "href": "http://localhost:3001/cimi/machine_images/img3" },"properties": { "foo": "bar","life": "is life"}}' -H "Content-Type: application/json"  -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Delete a Machine Template:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machine_templates/2

Working with Machine Volumes

Retrieve the Machine Volume Collection of a given Machine resource:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/machines/inst1/volumes

Attach a Volume to a Machine, with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d ' /dev/sdf  '  http://localhost:3001/cimi/machines/inst1/volume_attach

Attach a Volume to a Machine, with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineVolume", "initialLocation": "/dev/sdf", "volume": {"href":"http://localhost:3001/cimi/volumes/vol2"}}' http://localhost:3001/cimi/machines/inst1/volume_attach

Detach a Volume from a Machine:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machines/inst1/volumes/vol2
;T; I"!



Working with Machines

Retrieve the Machine Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machines 

Create a new Machine with the message body in XML format:

curl -v --user "mockuser:mockpassword" -X POST -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<MachineCreate xmlns="http://schemas.dmtf.org/cimi/1"> <name> myMachine1 </name> <description> my machine description </description> <machineTemplate> <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small"> </machineConfig> <machineImage href="http://localhost:3001/cimi/machine_images/img1"> </machineImage> </machineTemplate> </MachineCreate>'

Alternatively, specifying the message body in JSON:

 curl -v --user "user:password" -X POST -H "Content-Type: application/json" -H "Accept: application/xml" -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineCreate", "name": "myMachine3", "description": "My very first json machine", "machineTemplate": { "machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1.small" }, "machineImage": { "href": "http://localhost:3001/cimi/machine_images/ami-48aa4921" } } }' http://localhost:3001/cimi/machines

Perform a Machine operation - stop - with the message body in XML format:

curl -v -X POST --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -d '<Action xmlns="http://schemas.dmtf.org/cimi/1"><action> http://http://schemas.dmtf.org/cimi/1/action/stop </action> </Action>'  http://localhost:3001/cimi/machines/inst3/stop

Alternatively, specifying the message body in JSON:

 curl -v -X POST --user "user:password" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"resourceURI": "http://www.dmtf.org/cimi/1/Action", "action":"http://www.dmtf.org/cimi/action/stop"}' http://localhost:3001/cimi/machines/i-5feb7c20/stop


Working with Machine Images

Retrieve the Machine Image Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_images

Create a new Machine Image from an existing Machine, with message body in JSON:

curl --user "mockuser:mockpassword" -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineImage", "name":"new_image","description":"my new machine image","type":"IMAGE", "imageLocation":"http://localhost:3001/cimi/machines/inst1"}' http://localhost:3001/cimi/machine_images

Alternatively, specifying the message body in XML:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d "<MachineImage><name>some_name</name><description>my new machine image</description><type>IMAGE</type><imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation></MachineImage>" http://localhost:3001/cimi/machine_images

Delete a Machine Image:

curl -X DELETE --user "user:pass" http://localhost:3001/cimi/machine_images/my_image 


Working with Machine Configurations

Retrieve the Machine Configuration Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations

Retrieve a specific Machine Configuration:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_configurations/m1-large

Working with Machine Templates

Retrieve the Machine Template Collection:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Retrieve a specific Machine Template:

curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/machine_templates/m1-large

Create a Machine Template with XML body:

curl -v --user "mockuser:mockpassword" -X POST -d '<MachineTemplateCreate><name>myXmlTestMachineTemplate1</name><description>Description of my MachineTemplate</description><property key="test">value</property><machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/><machineImage href="http://localhost:3001/cimi/machine_images/img3"/></MachineTemplateCreate>' -H "Content-Type: application/xml"  -H "Accept: application/xml" http://localhost:3001/cimi/machine_templates

Create a Machine Template with JSON body:

curl -v --user "mockuser:mockpassword" -X POST -d '{"resourceURI": "http://schemas.dmtf.org/cimi/1/MachineTemplateCreate","name": "myMachineDemoTemplate","description": "My very loved machine template","machineConfig": { "href": "http://localhost:3001/cimi/machine_configurations/m1-xlarge" },"machineImage": { "href": "http://localhost:3001/cimi/machine_images/img3" },"properties": { "foo": "bar","life": "is life"}}' -H "Content-Type: application/json"  -H "Accept: application/json" http://localhost:3001/cimi/machine_templates

Delete a Machine Template:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machine_templates/2

Working with Machine Volumes

Retrieve the Machine Volume Collection of a given Machine resource:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/machines/inst1/volumes

Attach a Volume to a Machine, with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d ' /dev/sdf '  http://localhost:3001/cimi/machines/inst1/volume_attach

Attach a Volume to a Machine, with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineVolume", "initialLocation": "/dev/sdf", "volume": {"href":"http://localhost:3001/cimi/volumes/vol2"}}' http://localhost:3001/cimi/machines/inst1/volume_attach

Detach a Volume from a Machine:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/machines/inst1/volumes/vol2
;T; @ZI""/cimi-curl/cimi-curl-volumes/;T{;{ ;I"¼5 CIMI cURL Examples - Volume Resources



Working with Volumes

Retrieve the Volume Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volumes 

Retrieve a specific Volume in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volumes/volume1 

Create Volume - with VolumeConfiguration by reference, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_new_volume </name> <description> a new volume </description><volumeTemplate><volumeConfig href="http://localhost:3001/cimi/volume_configurations/2"> </volumeConfig></volumeTemplate></VolumeCreate>' http://localhost:3001//cimi/volumes
     

Create Volume - with VolumeConfiguration by reference, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"href":"http://localhost:3001/cimi/volume_configurations/2" }}}' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_volume </name><description> a new volume </description> <volumeTemplate><volumeConfig><type>http://schemas.dmtf.org/cimi/1/mapped</type><capacity> 1024 </capacity></volumeConfig></volumeTemplate> </VolumeCreate>' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml"  -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"type":"http://schemas.dmtf.org/cimi/1/mapped", "capacity": 1024 }}}'   http://localhost:3001/cimi/volumes
    

Delete a Volume

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/volumes/volume94275
    

Working with Volume Images

Retrieve the Volume Image Collection in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_images

Retrieve a specific Volume Image in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_images/vol_image1 

Create a Volume Image from an existing Volume, XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1"><name> my_vol_image </name><description> marios first volume image </description><imageLocation href="http://localhost:3001/cimi/volumes/vol1"/></VolumeImage>' http://localhost:3001/cimi/volume_images
    

Create a Volume Image from an existing Volume, JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d  '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeImage","name": "some_name", "description": "marios first volume image", "imageLocation": { "href": "http://localhost:3001/cimi/volumes/vol1"}}' http://localhost:3001/cimi/volume_images

Delete a Volume Image:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_images/store_snapshot_1358516615

Working with Volume Configurations

Retrieve the Volume Configuration Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_configurations 

Retrieve a specific Volume Configuration in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_configurations/volume_config1 

Create a new Volume Configuration with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeConfigurationCreate><name>marios_volume_config</name><description>a volume configuration</description><format>qcow2</format><type>http://schemas.dmtf.org/cimi/1/mapped</type> <capacity>10</capacity></VolumeConfigurationCreate>' http://localhost:3001/cimi/volume_configurations
    

Create a new Volume Configuration with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeConfiguration","name": "marios_volume_config", "description": "a volume configuration", "type": "http://schemas.dmtf.org/cimi/1/mapped", "format": "ext3", "capacity": 11}' http://localhost:3001/cimi/volume_configurations

Delete a Volume Configuration:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_configurations/4 

Working with Volume Templates

Retrieve the Volume Template Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_templates 

Retrieve a specific Volume Template in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_templates/vol_template123

Create a Volume Template with XML body:

curl --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1"> <name> marios_vol_template </name> <description> my first volume template </description> <volumeConfig href="http://localhost:3001/cimi/volume_configs/1"> </volumeConfig> </VolumeTemplate>' http://localhost:3001/cimi/volume_templates

Create a Volume Template with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeTemplate","name": "marios_vol_template", "description": "my first volume template", "volumeConfig": { "href": "http://localhost:3001/cimi/volume_configs/1"} }' http://localhost:3001/cimi/volume_templates 

Delete a Volume Template:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_templates/vol_template123

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"h

Working with Volumes

Retrieve the Volume Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volumes 

Retrieve a specific Volume in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volumes/volume1 

Create Volume - with VolumeConfiguration by reference, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_new_volume </name> <description> a new volume </description><volumeTemplate><volumeConfig href="http://localhost:3001/cimi/volume_configurations/2"> </volumeConfig></volumeTemplate></VolumeCreate>' http://localhost:3001//cimi/volumes
     

Create Volume - with VolumeConfiguration by reference, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"href":"http://localhost:3001/cimi/volume_configurations/2" }}}' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_volume </name><description> a new volume </description> <volumeTemplate><volumeConfig><type>http://schemas.dmtf.org/cimi/1/mapped</type><capacity> 1024 </capacity></volumeConfig></volumeTemplate> </VolumeCreate>' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml"  -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"type":"http://schemas.dmtf.org/cimi/1/mapped", "capacity": 1024 }}}'   http://localhost:3001/cimi/volumes
    

Delete a Volume

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/volumes/volume94275
    

Working with Volume Images

Retrieve the Volume Image Collection in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_images

Retrieve a specific Volume Image in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_images/vol_image1 

Create a Volume Image from an existing Volume, XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1"><name> my_vol_image </name><description> marios first volume image </description><imageLocation href="http://localhost:3001/cimi/volumes/vol1"/></VolumeImage>' http://localhost:3001/cimi/volume_images
    

Create a Volume Image from an existing Volume, JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d  '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeImage","name": "some_name", "description": "marios first volume image", "imageLocation": { "href": "http://localhost:3001/cimi/volumes/vol1"}}' http://localhost:3001/cimi/volume_images

Delete a Volume Image:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_images/store_snapshot_1358516615

Working with Volume Configurations

Retrieve the Volume Configuration Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_configurations 

Retrieve a specific Volume Configuration in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_configurations/volume_config1 

Create a new Volume Configuration with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeConfigurationCreate><name>marios_volume_config</name><description>a volume configuration</description><format>qcow2</format><type>http://schemas.dmtf.org/cimi/1/mapped</type> <capacity>10</capacity></VolumeConfigurationCreate>' http://localhost:3001/cimi/volume_configurations
    

Create a new Volume Configuration with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeConfiguration","name": "marios_volume_config", "description": "a volume configuration", "type": "http://schemas.dmtf.org/cimi/1/mapped", "format": "ext3", "capacity": 11}' http://localhost:3001/cimi/volume_configurations

Delete a Volume Configuration:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_configurations/4 

Working with Volume Templates

Retrieve the Volume Template Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_templates 

Retrieve a specific Volume Template in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_templates/vol_template123

Create a Volume Template with XML body:

curl --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1"> <name> marios_vol_template </name> <description> my first volume template </description> <volumeConfig href="http://localhost:3001/cimi/volume_configs/1"> </volumeConfig> </VolumeTemplate>' http://localhost:3001/cimi/volume_templates

Create a Volume Template with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeTemplate","name": "marios_vol_template", "description": "my first volume template", "volumeConfig": { "href": "http://localhost:3001/cimi/volume_configs/1"} }' http://localhost:3001/cimi/volume_templates 

Delete a Volume Template:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_templates/vol_template123
;T; I"%



Working with Volumes

Retrieve the Volume Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volumes 

Retrieve a specific Volume in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volumes/volume1 

Create Volume - with VolumeConfiguration by reference, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_new_volume </name> <description> a new volume </description><volumeTemplate><volumeConfig href="http://localhost:3001/cimi/volume_configurations/2"> </volumeConfig></volumeTemplate></VolumeCreate>' http://localhost:3001//cimi/volumes
     

Create Volume - with VolumeConfiguration by reference, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"href":"http://localhost:3001/cimi/volume_configurations/2" }}}' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, XML body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml" -X POST -d '<VolumeCreate><name> marios_volume </name><description> a new volume </description> <volumeTemplate><volumeConfig><type>http://schemas.dmtf.org/cimi/1/mapped</type><capacity> 1024 </capacity></volumeConfig></volumeTemplate> </VolumeCreate>' http://localhost:3001//cimi/volumes
    

Create Volume - with VolumeConfiguration by value, JSON body:

curl -v --user "mockuser:mockpassword" -H "Accept:application/xml"  -X POST -d '{"name": "marios_new_volume", "description": "a new volume", "volumeTemplate": { "volumeConfig": {"type":"http://schemas.dmtf.org/cimi/1/mapped", "capacity": 1024 }}}'   http://localhost:3001/cimi/volumes
    

Delete a Volume

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" -X DELETE http://localhost:3001/cimi/volumes/volume94275
    

Working with Volume Images

Retrieve the Volume Image Collection in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_images

Retrieve a specific Volume Image in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_images/vol_image1 

Create a Volume Image from an existing Volume, XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeImage xmlns="http://schemas.dmtf.org/cimi/1"><name> my_vol_image </name><description> marios first volume image </description><imageLocation href="http://localhost:3001/cimi/volumes/vol1"/></VolumeImage>' http://localhost:3001/cimi/volume_images
    

Create a Volume Image from an existing Volume, JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d  '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeImage","name": "some_name", "description": "marios first volume image", "imageLocation": { "href": "http://localhost:3001/cimi/volumes/vol1"}}' http://localhost:3001/cimi/volume_images

Delete a Volume Image:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_images/store_snapshot_1358516615

Working with Volume Configurations

Retrieve the Volume Configuration Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_configurations 

Retrieve a specific Volume Configuration in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_configurations/volume_config1 

Create a new Volume Configuration with XML body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeConfigurationCreate><name>marios_volume_config</name><description>a volume configuration</description><format>qcow2</format><type>http://schemas.dmtf.org/cimi/1/mapped</type> <capacity>10</capacity></VolumeConfigurationCreate>' http://localhost:3001/cimi/volume_configurations
    

Create a new Volume Configuration with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeConfiguration","name": "marios_volume_config", "description": "a volume configuration", "type": "http://schemas.dmtf.org/cimi/1/mapped", "format": "ext3", "capacity": 11}' http://localhost:3001/cimi/volume_configurations

Delete a Volume Configuration:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_configurations/4 

Working with Volume Templates

Retrieve the Volume Template Collection in json format:

 curl --user "user:pass" -H "Accept: application/json" http://localhost:3001/cimi/volume_templates 

Retrieve a specific Volume Template in xml format:

 curl --user "user:pass" -H "Accept: application/xml" http://localhost:3001/cimi/volume_templates/vol_template123

Create a Volume Template with XML body:

curl --user "mockuser:mockpassword" -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST -d '<VolumeTemplate xmlns="http://schemas.dmtf.org/cimi/1"> <name> marios_vol_template </name> <description> my first volume template </description> <volumeConfig href="http://localhost:3001/cimi/volume_configs/1"> </volumeConfig> </VolumeTemplate>' http://localhost:3001/cimi/volume_templates

Create a Volume Template with JSON body:

curl -v --user "mockuser:mockpassword" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeTemplate","name": "marios_vol_template", "description": "my first volume template", "volumeConfig": { "href": "http://localhost:3001/cimi/volume_configs/1"} }' http://localhost:3001/cimi/volume_templates 

Delete a Volume Template:

curl -v -X DELETE --user "mockuser:mockpassword" http://localhost:3001/cimi/volume_templates/vol_template123
;T; @`I",/cimi-curl/cimi-curl-resource_metadata/;T{;{ ;I"† CIMI cURL Examples - Resource Metadata Resources


cURL examples for CIMI Resource Metadata resources

Retrieve the Resource Metadata collection in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata

Retrieve the Resource Metadata as it corresponding to the Cloud Entry Point resource, in json format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/json" http://localhost:3001/cimi/resource_metadata/cloud_entry_point 

Retrieve the Resource Metadata as it corresponding to the Machine resource, in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata/machine 

 Back to top

Apache Software Foundation
Apache Deltacloud is a top-level project at the Apache Software Foundation, having graduated from the ASF Incubator in October 2011. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users.
;T; I"

cURL examples for CIMI Resource Metadata resources

Retrieve the Resource Metadata collection in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata

Retrieve the Resource Metadata as it corresponding to the Cloud Entry Point resource, in json format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/json" http://localhost:3001/cimi/resource_metadata/cloud_entry_point 

Retrieve the Resource Metadata as it corresponding to the Machine resource, in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata/machine 
;T; I"ä


cURL examples for CIMI Resource Metadata resources

Retrieve the Resource Metadata collection in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata

Retrieve the Resource Metadata as it corresponding to the Cloud Entry Point resource, in json format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/json" http://localhost:3001/cimi/resource_metadata/cloud_entry_point 

Retrieve the Resource Metadata as it corresponding to the Machine resource, in xml format:

curl -v --user "mockuser:mockpassword" -H "Accept: application/xml" http://localhost:3001/cimi/resource_metadata/machine 
;T; @fI"/assets/img/API_Diagram/;T{;{: versioni