summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glanceclient/v1/images.py6
-rw-r--r--tests/v1/test_images.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/glanceclient/v1/images.py b/glanceclient/v1/images.py
index c77d280..a4b759a 100644
--- a/glanceclient/v1/images.py
+++ b/glanceclient/v1/images.py
@@ -24,7 +24,11 @@ from glanceclient.common import utils
UPDATE_PARAMS = ('name', 'disk_format', 'container_format', 'min_disk',
'min_ram', 'owner', 'size', 'is_public', 'protected',
- 'location', 'checksum', 'copy_from', 'properties')
+ 'location', 'checksum', 'copy_from', 'properties',
+ #NOTE(bcwaldon: an attempt to update 'deleted' will be
+ # ignored, but we need to support it for backwards-
+ # compatibility with the legacy client library
+ 'deleted')
CREATE_PARAMS = UPDATE_PARAMS + ('id',)
diff --git a/tests/v1/test_images.py b/tests/v1/test_images.py
index 6478303..6f258e6 100644
--- a/tests/v1/test_images.py
+++ b/tests/v1/test_images.py
@@ -362,6 +362,7 @@ class ImageManagerTest(unittest.TestCase):
'min_disk': 10,
'copy_from': 'http://example.com',
'properties': {'a': 'b', 'c': 'd'},
+ 'deleted': False,
}
image = self.mgr.update('1', **fields)
expect_hdrs = {
@@ -375,6 +376,7 @@ class ImageManagerTest(unittest.TestCase):
'x-glance-api-copy-from': 'http://example.com',
'x-image-meta-property-a': 'b',
'x-image-meta-property-c': 'd',
+ 'x-image-meta-deleted': 'False',
}
expect = [('PUT', '/v1/images/1', expect_hdrs, None)]
self.assertEqual(self.api.calls, expect)