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
(cherry picked from commit 181be53a2b0a54f7b4cd33dacbaa560e124e9421)
Reviewed: https:/ /review. openstack. org/221743 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=5d86fcb7634 85cb6d38434f7ad 5632c5e4724bcd
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 5d86fcb763485cb 6d38434f7ad5632 c5e4724bcd
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 7b4cd33dacbaa56 0e124e9421)
Closes-Bug: #1437477
(cherry picked from commit 181be53a2b0a54f