summaryrefslogtreecommitdiff
path: root/nova/image
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-17 22:50:17 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-20 00:00:21 +0000
commit94d87bce212f91c54370784a5544f1a07625938a (patch)
treecfc91dedd5f26f53b3824603763bc63878607d1e /nova/image
parente60d593b5ec254bb74fca39db7164f57db90be47 (diff)
downloadnova-94d87bce212f91c54370784a5544f1a07625938a.tar.gz
Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
Diffstat (limited to 'nova/image')
-rw-r--r--nova/image/glance.py3
-rw-r--r--nova/image/s3.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py
index 6e0a577738..d2f69d12e8 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -31,13 +31,14 @@ import glanceclient.exc
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
def _parse_image_ref(image_href):
diff --git a/nova/image/s3.py b/nova/image/s3.py
index e6ab8bb156..0d93383fbb 100644
--- a/nova/image/s3.py
+++ b/nova/image/s3.py
@@ -60,7 +60,7 @@ s3_opts = [
'when downloading from s3'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(s3_opts)