Skip to content

Commit

Permalink
Fix oslo.config.cfg.NoSuchOptError when running individual tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Michael Kerrin committed Jul 23, 2013
1 parent fd8c679 commit 546ed2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions cinder/backup/__init__.py
Expand Up @@ -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)
5 changes: 2 additions & 3 deletions cinder/volume/__init__.py
Expand Up @@ -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)

0 comments on commit 546ed2d

Please sign in to comment.