glance/glance/tests/unit/v2
David Koo 0cbe012602 Restore image status on duplicate image upload
Glance should not allow already uploaded images to be modified by
another upload. Currently, when configured with the local filesystem
backend, Glance prevents duplicate upload of an already uploaded image
BUT it changes the image status to "saving".

This commit adds a status transition state machine to the domain.Image
class and modifies the domain.Image.status setter function to verify
status transitions based on this state machine - only target states that
can be reached from the image's current state are permitted.

Tests have also been agumented to verify that the original image (meta)
data does not change in case of a conflicting upload.

Closes-Bug: #1241379

Change-Id: I62c5acae4c29abf0691d8279b51c59008f9c0047
2014-01-22 10:05:43 +08:00
..
__init__.py Adding versioned namespaces in test dir 2012-03-25 13:28:45 -07:00
test_image_data_resource.py Restore image status on duplicate image upload 2014-01-22 10:05:43 +08:00
test_image_members_resource.py Migrate json to glance.openstack.common.jsonutils 2014-01-05 14:38:07 +00:00
test_image_tags_resource.py Add config option to limit image tags 2013-12-03 16:05:49 +00:00
test_images_resource.py Decouple the config dependence on glance domain 2014-01-13 10:26:01 +08:00
test_registry_api.py Remove vim header 2014-01-14 16:03:28 +00:00
test_registry_client.py Remove vim header 2014-01-14 16:03:28 +00:00
test_schemas_resource.py Fix up trivial License mismatches 2013-08-27 22:50:16 +02:00
test_tasks_resource.py Merge "Bump hacking to 0.8 and get python 3.x compatibility" 2014-01-16 01:44:54 +00:00