We have created a new virtual machine image in some way (created a "golden image" or snapshotted/backed up an existing image) and we wish to do two things:
Store the disk image data in Glance
Store metadata about this image in Glance
We can do the above two activities in a single call to the
Glance API. Assuming, like in the examples above, that a Glance
API server is running at glance.example.com
,
we issue a POST
request to add an image to
Glance:
POST http://glance.example.com/images/
The metadata about the image is sent to Glance in HTTP headers. The body of the HTTP request to the Glance API will be the MIME-encoded disk image data.