-
Committer:
Tarmac
-
Author(s):
jaypipes at gmail
-
Date:
2011-03-25 19:17:35 UTC
-
mfrom:
(75.3.13 checksum)
-
Revision ID:
tarmac-20110325191735-rk1wy065cloviubu
Adds checksumming to Glance.
When adding an image (or uploading an image during PUT operations),
you may now supply an optional X-Image-Meta-Checksum header. When
storing the uploaded image, the backend image stores now are required
to return a checksum of the data they just stored. The optional
X-Image-Meta-Checksum header is compared against this generated checksum
and returns a 409 Bad Request if there is a mismatch.
The ETag header is now properly set to the image's checksum now
for all GET /images/<ID>, HEAD /images/<ID>, POST /images and
PUT /images/<ID> operations.
Adds unit tests verifying the checksumming behaviour in the API, and
in the Swift and Filesystem backend stores.
Includes migration script.
NOTE: This does not include the DB migration script. Separate bug will be filed for that.