Fix oslo.config.cfg.NoSuchOptError when running individual tests

We need to import cinder.common.config wherever we are using an olso
configuration option from this module. Otherwise it is not necessarily
the case that olso knows about the option and it complains.

cinder.tests imports this configuration module but it not the case that
this module has been imported when you you are running individual tests.

Change-Id: I8f2c966848f55c80213d2ecd2dbf75b777627e6b
Fixes: bug #1203737
This commit is contained in:
Michael Kerrin 2013-07-22 13:35:37 +00:00
parent fd8c67944f
commit 546ed2dc49
2 changed files with 4 additions and 6 deletions

View File

@ -17,11 +17,10 @@
# collisions with use of 'from cinder.backup import <foo>' elsewhere.
from oslo.config import cfg
from cinder.common import config
import cinder.openstack.common.importutils
CONF = cfg.CONF
CONF = config.CONF
API = cinder.openstack.common.importutils.import_class(CONF.backup_api_class)

View File

@ -20,11 +20,10 @@
# collisions with use of 'from cinder.volume import <foo>' elsewhere.
from oslo.config import cfg
from cinder.common import config
import cinder.openstack.common.importutils as import_utils
CONF = cfg.CONF
CONF = config.CONF
API = import_utils.import_class(CONF.volume_api_class)