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

For more information, please explore the Attic.



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