]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix dynamic import of CONF.volume_api_class
authorCory Stone <corystone@gmail.com>
Mon, 8 Feb 2016 17:22:59 +0000 (11:22 -0600)
committerCory Stone <corystone@gmail.com>
Fri, 12 Feb 2016 16:50:31 +0000 (10:50 -0600)
commit010d4a23b7f25cfa9786cecc35939f667a6812ba
treedc54decd749893133699a4a64b13486ba21e0812
parentbd70ce6f4dd58ba904a7c941700cdce54e5a705e
Fix dynamic import of CONF.volume_api_class

Modifies the import to actually happen when API() is called instead of
when the module is loaded.

This is necessary because CONF.volume_api_class is always evaluated as
the default value since the config file hadn't been parsed yet when the
module is loaded.

Nova fixed this problem a while ago for the compute driver in
https://review.openstack.org/#/c/14353/.

Change-Id: I4c3d6b4300298ad0ac4e40a7a1a815cbf88bb151
Closes-Bug: #1543219
cinder/tests/unit/api/contrib/test_backups.py
cinder/tests/unit/api/contrib/test_volume_actions.py
cinder/tests/unit/api/contrib/test_volume_host_attribute.py
cinder/tests/unit/api/contrib/test_volume_image_metadata.py
cinder/tests/unit/api/contrib/test_volume_migration_status_attribute.py
cinder/tests/unit/api/contrib/test_volume_tenant_attribute.py
cinder/tests/unit/api/v1/test_snapshot_metadata.py
cinder/tests/unit/api/v1/test_volume_metadata.py
cinder/tests/unit/api/v2/test_snapshot_metadata.py
cinder/tests/unit/api/v2/test_volume_metadata.py
cinder/volume/__init__.py