site_name: Deltacloud API title: CIMI Resource Collections - Machine

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).

<Action xmlns=“http://schemas.dmtf.org/cimi/1”> <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action> </Action>

<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>

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>

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>