We already (correctly) advertise the 'create image' operation on Machines:
...
<operation rel="http://schemas.dmtf.org/cimi/1/action/capture"
href="http://localhost:3001/cimi/machine_images" />
...
This patch adds the ability to do the actual image creation from a
running machine - as per CIMI we do a POST to machine image collection,
with the imageLocation attribute referencing the Machine resource:
XML:
curl --user "mockuser:mockpassword" -H "Content-Type: application/xml"
-H "Accept: application/xml" -d "<MachineImage><name>some_name</name>
<description>my new machine image</description><type>IMAGE</type>
<imageLocation>http://localhost:3001/cimi/machines/inst1</imageLocation>
</MachineImage>" http://localhost:3001/cimi/machine_images
JSON:
curl --user "mockuser:mockpassword" -H "Content-Type: application/json"
-H "Accept: application/json" -d
'{"resourceURI":"http://schemas.dmtf.org/cimi/1/MachineImage",
"name":"new_image","description":"my new machine image","type":"IMAGE",
"imageLocation":"http://localhost:3001/cimi/machines/inst1"}'
http://localhost:3001/cimi/machine_images
tracked at http://tracker.deltacloud.org/set/216
marios