The server image creation operation is quite simple, all you need to do is send a POST request to /servers/id/action. The id is the numeric ID of the server that you want to preserve.
The JSON payload that accompanies the createImage command must include the name of the server image and optional metadata. That metadata is independent of the server metadata.
{
"createImage": {
"name": "tornado-app-server",
"metadata": {
"version": "1.0.0",
"creator": "joe"
}
}
}
If you want to use curl, the server image creation request would look like this:
$ curl -s -X POST -H "X-Auth-Token:999888777666" -d '{"createImage": {"name": "tornado-app-server", "metadata": {"version": "1.0.0", "creator": "joe"}}}' http://localhost:8774/v1.1/openstack/servers/3/action
