]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix volume creation from image with allowed_direct_url_schemes
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Fri, 27 Mar 2015 19:35:05 +0000 (15:35 -0400)
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>
Mon, 27 Apr 2015 16:58:52 +0000 (12:58 -0400)
commit181be53a2b0a54f7b4cd33dacbaa560e124e9421
tree008edc7ae15939fe645b04db378cf24e7ef98a33
parentfac178fd58f06c146d96711e454c9397a574d15f
Fix volume creation from image with allowed_direct_url_schemes

When CONF.allowed_direct_url_schemes is set to ['file'] and
Glance image has direct_url or locations metadata with 'file:///'
scheme, cinder tries to directly read the image data from the
local file. However, currently the code is broken because return
value from get_location() has been changed to a tuple.
This fixes the code so that it can handle the metadata correctly.

Change-Id: I39a12a31fbfbd3a9824c67391096f74406d8a749
Closes-Bug: #1437477
cinder/image/glance.py
cinder/tests/unit/image/test_glance.py