Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
CIMI Frontend
Mock driver
Deltacloud commit version: 897e054424c6304d2d455b6913bf47dc188e41cd
Description
Note that in the example below, even though the initialState is passed as 'STOPPED', the machine is created with a "STARTED' state.
curl -v -X POST -H "Content-Type:application/xml" -d '<Machine><name> myMachine2 </name><machineTemplate><initialState> STOPPED </initialState><machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small"></machineConfig><machineImage href="http://localhost:3001/cimi/machine_images/img2"></machineImage></machineTemplate></Machine>' --user "un:pw" "http://localhost:3001/cimi/machines"
....
< HTTP/1.1 201 Created
< Content-Type: application/json
< Location: http://localhost:3001/cimi/machines/inst4
< CIMI-Specification-Version: 1.0.1
< Content-Length: 974
< ETag: 0b17c4b65ab5a750732a34731ae63a36
< Cache-Control: max-age=0, private, must-revalidate
< Date: Wed, 30 Jan 2013 17:24:22 GMT
< Connection: keep-alive
< Server: thin 1.5.0 codename Knife
<
- Connection #0 to host localhost left intact
Unknown macro: {"id"}
* Closing connection #0
... from GET /cimi/machines
<Machine>
<id>http://localhost:3001/cimi/machines/inst4</id>
<name> myMachine2 </name>
<description>No description set for Machine myMachine2 </description>
<created>2013-01-30T12:25:44-05:00</created>
<property key="machine_image">http://localhost:3001/cimi/machine_images/img2</property>
<property key="credential">http://localhost:3001/cimi/credentials</property>
<realm>us</realm>
<machineImage href="http://localhost:3001/cimi/machine_images/img2" />
<state>STARTED</state>
<cpu>1</cpu>
<memory>1782579</memory>
<disks href="http://localhost:3001/cimi/machines/inst4/disks" />
<volumes href="http://localhost:3001/cimi/machines/inst4/volumes" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/restart" href="http://localhost:3001/cimi/machines/inst4/restart" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/stop" href="http://localhost:3001/cimi/machines/inst4/stop" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/capture" href="http://localhost:3001/cimi/machine_images" />
</Machine>
<Machine>