diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2015-05-29 11:03:02 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2015-06-09 11:40:48 +0100 |
commit | 9fc47e63466f7e7e0e60edaca22e4118bf6a83af (patch) | |
tree | 88d7e819f8fda12f1a9054a92ab26d7e81f44467 /nova/tests/unit/test_utils.py | |
parent | 9491f8be8294029032200e75b59793a7c1ad0318 (diff) | |
download | nova-9fc47e63466f7e7e0e60edaca22e4118bf6a83af.tar.gz |
compute: only use non_inheritable_image_properties if snapshotting
The CONF.non_inheritable_image_properties parameter lists a set of
image metadata properties that should be discarded when uploading
an image to glance during the snapshotting process.
This property is currently applied in the nova.utils method
get_image_from_system_metadata(), which causes the properties in
question to be discarded in a wide variety of non-snapshotting
related operations.
This is a regression caused by two commits:
commit 8e575be75c80ea71a6ad8fb73e6ace1ed708938f
Author: Xavier Queralt <xqueralt@redhat.com>
Date: Mon Aug 26 22:53:03 2013 +0200
Add methods to get image metadata from instance
commit 4389f2292a0177c8eedc0a398ceb3c5535a9ef82
Author: Xavier Queralt <xqueralt@redhat.com>
Date: Mon Aug 26 22:55:46 2013 +0200
Avoid errors on some actions when image not usable
Which moved handling of CONF.non_inheritable_image_properties out
of the compute API _create_image() method, and into nova.utils.
Fix this by moving the handing back into the compute API in its
original location.
Closes-bug: #1459760
Change-Id: Id630fe68678c4aa469ddbfdb3c757b264519e918
Diffstat (limited to 'nova/tests/unit/test_utils.py')
-rw-r--r-- | nova/tests/unit/test_utils.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/nova/tests/unit/test_utils.py b/nova/tests/unit/test_utils.py index 008a5592a0..c3a07501e6 100644 --- a/nova/tests/unit/test_utils.py +++ b/nova/tests/unit/test_utils.py @@ -900,17 +900,6 @@ class GetImageFromSystemMetadataTestCase(test.NoDBTestCase): for key in utils.SM_INHERITABLE_KEYS: self.assertNotIn(key, image) - def test_non_inheritable_image_properties(self): - sys_meta = self.get_system_metadata() - sys_meta["%soo1" % utils.SM_IMAGE_PROP_PREFIX] = "bar" - - self.flags(non_inheritable_image_properties=["foo1"]) - - image = utils.get_image_from_system_metadata(sys_meta) - - # Verify that the foo1 key has not been inherited - self.assertNotIn("foo1", image) - class VersionTestCase(test.NoDBTestCase): def test_convert_version_to_int(self): |