--- a/components/openstack/glance/patches/14-launchpad-1471080.patch Wed Sep 07 14:48:41 2016 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-commit 356e66c2397a4a1ae3dd1fca2870958f5969aceb
-Author: wangxiyuan <[email protected]>
-Date: Fri Jul 3 11:45:57 2015 +0800
-
- Fix wrong check when create image without data.
-
- The default value of 'locations' is [].So there is a wrong check in
- db/sqlalchemy/api.py.
- When create an image without data, The function '_image_locations_set'
- should not be executed.
-
- Change-Id: Ie4cb29ab0d714d3ce67f717d5eaf641424efa5b7
- Closes-bug:#1471080
-
---- glance-2015.1.2/glance/db/sqlalchemy/api.py.~1~ 2015-10-13 09:38:23.000000000 -0700
-+++ glance-2015.1.2/glance/db/sqlalchemy/api.py 2016-03-04 01:02:00.749647525 -0800
-@@ -790,7 +790,7 @@ def _image_update(context, values, image
- _set_properties_for_image(context, image_ref, properties, purge_props,
- session)
-
-- if location_data is not None:
-+ if location_data:
- _image_locations_set(context, image_ref.id, location_data,
- session=session)
-
---- glance-2015.1.2/glance/tests/functional/db/base.py.~1~ 2015-10-13 09:38:23.000000000 -0700
-+++ glance-2015.1.2/glance/tests/functional/db/base.py 2016-03-04 01:02:00.751553768 -0800
-@@ -191,6 +191,12 @@ class DriverTests(object):
- for l in image['locations']]
- self.assertEqual(locations, actual)
-
-+ def test_image_create_without_locations(self):
-+ locations = []
-+ fixture = {'status': 'queued',
-+ 'locations': locations}
-+ self.db_api.image_create(self.context, fixture)
-+
- def test_image_create_with_location_data(self):
- location_data = [{'url': 'a', 'metadata': {'key': 'value'},
- 'status': 'active'},