From: Mark McLoughlin Date: Fri, 22 Feb 2013 17:25:07 +0000 (+0000) Subject: Remove compat cfg wrapper X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=778141a382ca44e02a3781226c02571b657adae9;p=openstack-build%2Fcinder-build.git Remove compat cfg wrapper This wrapper was there to allow oslo-config changes through the gate while keystoneclient hadn't been updated. Change-Id: I3d48673af58ae379e8e4d2c7fb4b4d81f3ed67dd --- diff --git a/cinder/backup/services/swift.py b/cinder/backup/services/swift.py index 8e39b9ea8..259cb8e85 100644 --- a/cinder/backup/services/swift.py +++ b/cinder/backup/services/swift.py @@ -30,17 +30,18 @@ None (to disable), zlib and bz2 (default: zlib) """ -import eventlet import hashlib import httplib import json import os import StringIO +import eventlet +from oslo.config import cfg + from cinder.db import base from cinder import exception from cinder import flags -from cinder.openstack.common import cfg from cinder.openstack.common import log as logging from cinder.openstack.common import timeutils from swiftclient import client as swift diff --git a/cinder/openstack/common/cfg.py b/cinder/openstack/common/cfg.py deleted file mode 100644 index c35dcb845..000000000 --- a/cinder/openstack/common/cfg.py +++ /dev/null @@ -1,17 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from oslo.config.cfg import * diff --git a/cinder/tests/api/v1/test_snapshot_metadata.py b/cinder/tests/api/v1/test_snapshot_metadata.py index 3376589a1..5720e88dc 100644 --- a/cinder/tests/api/v1/test_snapshot_metadata.py +++ b/cinder/tests/api/v1/test_snapshot_metadata.py @@ -17,6 +17,7 @@ import uuid +from oslo.config import cfg import webob from cinder.api import extensions @@ -24,7 +25,6 @@ from cinder.api.v1 import snapshot_metadata from cinder.api.v1 import snapshots import cinder.db from cinder import exception -from cinder.openstack.common import cfg from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/v2/test_snapshot_metadata.py b/cinder/tests/api/v2/test_snapshot_metadata.py index 51bf9dcbc..ae0333283 100644 --- a/cinder/tests/api/v2/test_snapshot_metadata.py +++ b/cinder/tests/api/v2/test_snapshot_metadata.py @@ -17,6 +17,7 @@ import uuid +from oslo.config import cfg import webob from cinder.api import extensions @@ -24,7 +25,6 @@ from cinder.api.v2 import snapshot_metadata from cinder.api.v2 import snapshots import cinder.db from cinder import exception -from cinder.openstack.common import cfg from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/test_volume_configuration.py b/cinder/tests/test_volume_configuration.py index af57fd237..d2751c1d9 100644 --- a/cinder/tests/test_volume_configuration.py +++ b/cinder/tests/test_volume_configuration.py @@ -18,8 +18,9 @@ """Tests for the configuration wrapper in volume drivers.""" +from oslo.config import cfg + from cinder import flags -from cinder.openstack.common import cfg from cinder.openstack.common import log as logging from cinder import test from cinder.volume import configuration diff --git a/cinder/tests/test_xenapi_sm.py b/cinder/tests/test_xenapi_sm.py index 9a07aba0e..2d82c00c1 100644 --- a/cinder/tests/test_xenapi_sm.py +++ b/cinder/tests/test_xenapi_sm.py @@ -16,19 +16,21 @@ # License for the specific language governing permissions and limitations # under the License. +import contextlib +import StringIO +import unittest + +import mock +import mox +from oslo.config import cfg + from cinder.db import api as db_api from cinder import exception -from cinder.openstack.common import cfg from cinder.volume import configuration as conf from cinder.volume import driver as parent_driver from cinder.volume.drivers.xenapi import lib from cinder.volume.drivers.xenapi import sm as driver from cinder.volume.drivers.xenapi import tools -import contextlib -import mock -import mox -import StringIO -import unittest class MockContext(object): diff --git a/cinder/volume/configuration.py b/cinder/volume/configuration.py index fa5d34a05..13935be67 100644 --- a/cinder/volume/configuration.py +++ b/cinder/volume/configuration.py @@ -42,8 +42,9 @@ option group. This is due to the way cfg works. All cfg options must be defined and registered in the group in which they are used. """ +from oslo.config import cfg + from cinder import flags -from cinder.openstack.common import cfg from cinder.openstack.common import log as logging diff --git a/cinder/volume/drivers/huawei/huawei_iscsi.py b/cinder/volume/drivers/huawei/huawei_iscsi.py index 4667925f3..f5d732ce1 100644 --- a/cinder/volume/drivers/huawei/huawei_iscsi.py +++ b/cinder/volume/drivers/huawei/huawei_iscsi.py @@ -21,11 +21,12 @@ Volume driver for HUAWEI T series and Dorado storage systems. import re import socket import time + +from oslo.config import cfg from xml.etree import ElementTree as ET from cinder import exception from cinder import flags -from cinder.openstack.common import cfg from cinder.openstack.common import excutils from cinder.openstack.common import log as logging from cinder import utils diff --git a/cinder/volume/drivers/san/hp/hp_3par_fc.py b/cinder/volume/drivers/san/hp/hp_3par_fc.py index d9d0334c4..9e5b97cc9 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_fc.py +++ b/cinder/volume/drivers/san/hp/hp_3par_fc.py @@ -27,10 +27,10 @@ volume_driver=cinder.volume.drivers.san.hp.hp_3par_fc.HP3PARFCDriver from hp3parclient import client from hp3parclient import exceptions as hpexceptions +from oslo.config import cfg from cinder import exception from cinder import flags -from cinder.openstack.common import cfg from cinder.openstack.common import lockutils from cinder.openstack.common import log as logging import cinder.volume.driver diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py index 67574f83b..31a41909f 100644 --- a/cinder/volume/drivers/scality.py +++ b/cinder/volume/drivers/scality.py @@ -21,10 +21,11 @@ import os import urllib2 import urlparse +from oslo.config import cfg + from cinder import exception from cinder import flags from cinder.image import image_utils -from cinder.openstack.common import cfg from cinder.openstack.common import log as logging from cinder.volume import driver