Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
Deltacloud 1.0.5
mock driver
cimi
Description
Stop a running machine:
[rlandy@localhost ~]$ curl -v -X POST --user "un:pw" -d '<Action><action>http://www.dmtf.org/cimi/action/stop></action></Action>' "http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32/stop?format=xml"
- About to connect() to cloud-qe-11.idm.lab.bos.redhat.com port 3001 (#0)
- Trying 10.16.96.104... connected
- Connected to cloud-qe-11.idm.lab.bos.redhat.com (10.16.96.104) port 3001 (#0)
- Server auth using Basic with user 'mockuser'
> POST /cimi/machines/inst32/stop?format=xml HTTP/1.1
> Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
> User-Agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.1.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
> Host: cloud-qe-11.idm.lab.bos.redhat.com:3001
> Accept: /
> Content-Length: 71
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< X-Frame-Options: sameorigin
< CIMI-Specification-Version: 1.0.1
< X-XSS-Protection: 1; mode=block
< Date: Mon, 26 Nov 2012 15:18:05 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 0
< Connection: keep-alive
< Server: thin 1.5.0 codename Knife
< - Connection #0 to host cloud-qe-11.idm.lab.bos.redhat.com left intact
- Closing connection #0
Notice 200 code above - so seems successful. Now get the machine and check state:
[rlandy@localhost ~]$ curl -X GET --user "un:pw" "http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32?format=xml"<Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine">
<id>http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32</id>
<name>cimi_machine_xml</name>
<description>Instance cimi_machine_xml</description>
<created>2012-11-26T10:18:12-05:00</created>
<property key="credential">http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/credentials</property>
<property key="machine_image">http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machine_images/img2</property>
<state>STARTED</state>
<cpu>1</cpu>
<memory>1781760</memory>
<disks href="http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32/disks" />
<volumes href="http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32/volumes" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/restart" href="http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32/restart" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/stop" href="http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machines/inst32/stop" />
<operation rel="http://schemas.dmtf.org/cimi/1/action/capture" href="http://cloud-qe-11.idm.lab.bos.redhat.com:3001/cimi/machine_images" />
</Machine>
[rlandy@localhost ~]$
Note machine is still started.