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.
Reviewed: https:/ /review. openstack. org/168477 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=181be53a2b0 a54f7b4cd33dacb aa560e124e9421
Committed: https:/
Submitter: Jenkins
Branch: master
commit 181be53a2b0a54f 7b4cd33dacbaa56 0e124e9421
Author: Tomoki Sekiyama <email address hidden>
Date: Fri Mar 27 15:35:05 2015 -0400
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: I39a12a31fbfbd3 a9824c67391096f 74406d8a749
Closes-Bug: #1437477