Ronelle Landy created DTACLOUD-447:
--------------------------------------
Summary: RFE: InitialStates capability is advertised but adding an
initialState value to a machine create op has no effect
Key: DTACLOUD-447
URL: https://issues.apache.org/jira/browse/DTACLOUD-447
Project: DeltaCloud
Issue Type: Improvement
Components: CIMI/Frontend
Environment: CIMI Frontend
Mock driver
Deltacloud commit version: 897e054424c6304d2d455b6913bf47dc188e41cd
Reporter: Ronelle Landy
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
{"id":"http://localhost:3001/cimi/machines/inst4","name":" myMachine2
","description":"No description set for Machine myMachine2
","created":"2013-01-30T12:24:22-05:00","properties":{"machine_image":"http://localhost:3001/cimi/machine_images/img2","credential":"http://localhost:3001/cimi/credentials"},"realm":"us","machineImage":{"href":"http://localhost:3001/cimi/machine_images/img2"},"state":"STARTED","cpu":"1","memory":1782579,"disks":{"href":"http://localhost:3001/cimi/machines/inst4/disks"},"volumes":{"href":"http://localhost:3001/cimi/machines/inst4/volumes"},"operations":[{"rel":"http://schemas.dmtf.org/cimi/1/action/restart","href":"http://localhost:3001/cimi/machines/inst4/restart"},{"rel":"http://schemas.dmtf.org/cimi/1/action/stop","href":"http://localhost:3001/cimi/machines/inst4/stop"},{"rel":"http://schemas.dmtf.org/cimi/1/action/capture","href":"http://localhost:3001/cimi/machine_images"}],"resourceURI":"http://schemas.dmtf.org/cimi/1/Machine"}*
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>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira