From 6a2df86bbab67fcc036b821a9a4b866c90a7c896 Mon Sep 17 00:00:00 2001 From: "Jay S. Bryant" Date: Thu, 15 Jan 2015 14:03:49 -0600 Subject: [PATCH] Move oslo.config to oslo_config namespace This is the third in a series of changes to move to using the new oslo_ namespace that is being used for oslo libraries. There is currently a shim in place that is allowing the old oslo. imports to work, but we need to be prepared for when the shims go away. Thus, we need patches like this one to move to the new namespace. This patch also updates our hacking check to ensure that no instances of oslo.config sneak back in. Change-Id: I45d24c4330f7c23fc5ad0a0527f1840d09710512 --- cinder/api/__init__.py | 2 +- cinder/api/common.py | 2 +- cinder/api/contrib/__init__.py | 2 +- cinder/api/contrib/hosts.py | 2 +- cinder/api/contrib/services.py | 2 +- cinder/api/contrib/volume_manage.py | 2 +- cinder/api/extensions.py | 2 +- cinder/api/middleware/auth.py | 2 +- cinder/api/middleware/sizelimit.py | 2 +- cinder/api/versions.py | 2 +- cinder/backup/api.py | 2 +- cinder/backup/driver.py | 2 +- cinder/backup/drivers/ceph.py | 2 +- cinder/backup/drivers/swift.py | 2 +- cinder/backup/drivers/tsm.py | 2 +- cinder/backup/manager.py | 2 +- cinder/backup/rpcapi.py | 4 ++-- cinder/cmd/all.py | 2 +- cinder/cmd/api.py | 2 +- cinder/cmd/backup.py | 2 +- cinder/cmd/manage.py | 2 +- cinder/cmd/scheduler.py | 2 +- cinder/cmd/volume.py | 2 +- cinder/cmd/volume_usage_audit.py | 2 +- cinder/common/config.py | 2 +- cinder/compute/nova.py | 2 +- cinder/consistencygroup/api.py | 2 +- cinder/db/api.py | 2 +- cinder/db/base.py | 2 +- cinder/db/migration.py | 2 +- cinder/db/sqlalchemy/api.py | 2 +- .../versions/021_add_default_quota_class.py | 2 +- .../versions/026_add_consistencygroup_quota_class.py | 2 +- cinder/db/sqlalchemy/models.py | 2 +- cinder/exception.py | 2 +- cinder/hacking/checks.py | 3 ++- cinder/image/glance.py | 2 +- cinder/image/image_utils.py | 2 +- cinder/keymgr/__init__.py | 2 +- cinder/keymgr/barbican.py | 2 +- cinder/keymgr/conf_key_mgr.py | 2 +- cinder/keymgr/key_mgr.py | 2 +- cinder/manager.py | 2 +- cinder/policy.py | 2 +- cinder/quota.py | 2 +- cinder/replication/__init__.py | 2 +- cinder/replication/api.py | 2 +- cinder/rpc.py | 2 +- cinder/scheduler/driver.py | 2 +- cinder/scheduler/filter_scheduler.py | 2 +- cinder/scheduler/host_manager.py | 2 +- cinder/scheduler/manager.py | 2 +- cinder/scheduler/rpcapi.py | 2 +- cinder/scheduler/scheduler_options.py | 2 +- cinder/scheduler/simple.py | 2 +- cinder/scheduler/weights/capacity.py | 2 +- cinder/scheduler/weights/volume_number.py | 2 +- cinder/service.py | 2 +- cinder/ssh_utils.py | 2 +- cinder/test.py | 4 ++-- cinder/tests/api/contrib/test_admin_actions.py | 4 ++-- cinder/tests/api/contrib/test_volume_actions.py | 2 +- cinder/tests/api/contrib/test_volume_replication.py | 2 +- cinder/tests/api/middleware/test_sizelimit.py | 2 +- cinder/tests/api/test_extensions.py | 2 +- cinder/tests/api/v1/test_snapshot_metadata.py | 2 +- cinder/tests/api/v1/test_volume_metadata.py | 2 +- cinder/tests/api/v1/test_volumes.py | 2 +- cinder/tests/api/v2/test_snapshot_metadata.py | 2 +- cinder/tests/api/v2/test_volume_metadata.py | 2 +- cinder/tests/api/v2/test_volumes.py | 2 +- cinder/tests/conf_fixture.py | 2 +- cinder/tests/db/test_name_id.py | 2 +- cinder/tests/declare_conf.py | 2 +- cinder/tests/image/test_glance.py | 2 +- cinder/tests/integrated/test_extensions.py | 2 +- cinder/tests/keymgr/test_barbican.py | 2 +- cinder/tests/keymgr/test_conf_key_mgr.py | 2 +- cinder/tests/runtime_conf.py | 2 +- .../scheduler/test_allocated_capacity_weigher.py | 2 +- cinder/tests/scheduler/test_capacity_weigher.py | 2 +- cinder/tests/scheduler/test_host_manager.py | 2 +- cinder/tests/scheduler/test_rpcapi.py | 2 +- cinder/tests/scheduler/test_scheduler.py | 2 +- cinder/tests/scheduler/test_volume_number_weigher.py | 2 +- cinder/tests/targets/test_base_iscsi_driver.py | 2 +- cinder/tests/test_backup.py | 2 +- cinder/tests/test_backup_swift.py | 2 +- cinder/tests/test_block_device.py | 2 +- cinder/tests/test_cmd.py | 12 ++++++------ cinder/tests/test_conf.py | 2 +- cinder/tests/test_coraid.py | 2 +- cinder/tests/test_db_api.py | 2 +- cinder/tests/test_glusterfs.py | 2 +- cinder/tests/test_gpfs.py | 2 +- cinder/tests/test_hacking.py | 4 ++++ cinder/tests/test_hp3par.py | 2 +- cinder/tests/test_huawei_drivers_compatibility.py | 2 +- cinder/tests/test_ibm_xiv_ds8k.py | 2 +- cinder/tests/test_ibmnas.py | 2 +- cinder/tests/test_netapp_nfs.py | 2 +- cinder/tests/test_nimble.py | 2 +- cinder/tests/test_quobyte.py | 2 +- cinder/tests/test_quota.py | 2 +- cinder/tests/test_replication.py | 2 +- cinder/tests/test_service.py | 2 +- cinder/tests/test_symantec_cnfs.py | 2 +- cinder/tests/test_test.py | 2 +- cinder/tests/test_utils.py | 2 +- cinder/tests/test_volume.py | 2 +- cinder/tests/test_volume_configuration.py | 2 +- cinder/tests/test_volume_rpcapi.py | 2 +- cinder/tests/test_volume_types.py | 2 +- cinder/tests/test_volume_utils.py | 2 +- cinder/tests/test_wsgi.py | 2 +- cinder/tests/windows/test_windows.py | 2 +- .../zonemanager/test_brcd_fc_san_lookup_service.py | 2 +- cinder/tests/zonemanager/test_brcd_fc_zone_driver.py | 2 +- .../zonemanager/test_cisco_fc_san_lookup_service.py | 2 +- .../tests/zonemanager/test_cisco_fc_zone_driver.py | 2 +- cinder/transfer/__init__.py | 2 +- cinder/transfer/api.py | 2 +- cinder/utils.py | 2 +- cinder/volume/api.py | 2 +- cinder/volume/configuration.py | 2 +- cinder/volume/driver.py | 2 +- cinder/volume/drivers/block_device.py | 2 +- cinder/volume/drivers/cloudbyte/options.py | 2 +- cinder/volume/drivers/coraid.py | 2 +- cinder/volume/drivers/datera.py | 2 +- .../volume/drivers/dell/dell_storagecenter_common.py | 2 +- cinder/volume/drivers/drbdmanagedrv.py | 2 +- cinder/volume/drivers/emc/emc_vmax_common.py | 2 +- cinder/volume/drivers/emc/emc_vnx_cli.py | 2 +- cinder/volume/drivers/eqlx.py | 2 +- cinder/volume/drivers/fujitsu_eternus_dx_common.py | 2 +- cinder/volume/drivers/fusionio/ioControl.py | 2 +- cinder/volume/drivers/glusterfs.py | 2 +- cinder/volume/drivers/hds/hds.py | 2 +- cinder/volume/drivers/hds/iscsi.py | 2 +- cinder/volume/drivers/hds/nfs.py | 2 +- cinder/volume/drivers/hitachi/hbsd_common.py | 2 +- cinder/volume/drivers/hitachi/hbsd_fc.py | 2 +- cinder/volume/drivers/hitachi/hbsd_horcm.py | 2 +- cinder/volume/drivers/hitachi/hbsd_iscsi.py | 2 +- cinder/volume/drivers/huawei/__init__.py | 2 +- .../volume/drivers/huaweistorhyper/huaweistorac.py | 2 +- cinder/volume/drivers/ibm/flashsystem.py | 2 +- cinder/volume/drivers/ibm/gpfs.py | 2 +- cinder/volume/drivers/ibm/ibmnas.py | 2 +- cinder/volume/drivers/ibm/storwize_svc/__init__.py | 2 +- cinder/volume/drivers/ibm/xiv_ds8k.py | 2 +- cinder/volume/drivers/lvm.py | 2 +- cinder/volume/drivers/netapp/eseries/iscsi.py | 2 +- cinder/volume/drivers/netapp/options.py | 2 +- cinder/volume/drivers/nexenta/options.py | 2 +- cinder/volume/drivers/nfs.py | 2 +- cinder/volume/drivers/nimble.py | 2 +- cinder/volume/drivers/prophetstor/options.py | 2 +- cinder/volume/drivers/pure.py | 2 +- cinder/volume/drivers/quobyte.py | 2 +- cinder/volume/drivers/rbd.py | 2 +- cinder/volume/drivers/remotefs.py | 2 +- cinder/volume/drivers/san/hp/hp_3par_common.py | 2 +- .../volume/drivers/san/hp/hp_lefthand_rest_proxy.py | 2 +- cinder/volume/drivers/san/hp/hp_msa_common.py | 2 +- cinder/volume/drivers/san/san.py | 2 +- cinder/volume/drivers/san/solaris.py | 2 +- cinder/volume/drivers/scality.py | 2 +- cinder/volume/drivers/sheepdog.py | 2 +- cinder/volume/drivers/smbfs.py | 2 +- cinder/volume/drivers/solidfire.py | 2 +- cinder/volume/drivers/srb.py | 2 +- cinder/volume/drivers/storpool.py | 2 +- cinder/volume/drivers/violin/v6000_common.py | 2 +- cinder/volume/drivers/vmware/vmdk.py | 2 +- cinder/volume/drivers/windows/smbfs.py | 2 +- cinder/volume/drivers/windows/windows.py | 2 +- cinder/volume/drivers/windows/windows_utils.py | 2 +- cinder/volume/drivers/xio.py | 2 +- cinder/volume/drivers/zadara.py | 2 +- cinder/volume/drivers/zfssa/zfssaiscsi.py | 2 +- cinder/volume/drivers/zfssa/zfssanfs.py | 2 +- cinder/volume/flows/api/create_volume.py | 2 +- cinder/volume/flows/manager/create_volume.py | 2 +- cinder/volume/manager.py | 2 +- cinder/volume/qos_specs.py | 2 +- cinder/volume/rpcapi.py | 2 +- cinder/volume/targets/driver.py | 2 +- cinder/volume/utils.py | 2 +- cinder/volume/volume_types.py | 2 +- cinder/wsgi.py | 2 +- .../zonemanager/drivers/brocade/brcd_fabric_opts.py | 2 +- .../drivers/brocade/brcd_fc_zone_driver.py | 2 +- .../zonemanager/drivers/cisco/cisco_fabric_opts.py | 2 +- .../drivers/cisco/cisco_fc_zone_driver.py | 2 +- cinder/zonemanager/fc_zone_manager.py | 2 +- 197 files changed, 209 insertions(+), 204 deletions(-) diff --git a/cinder/api/__init__.py b/cinder/api/__init__.py index 3f5d60a8667..4112d598c68 100644 --- a/cinder/api/__init__.py +++ b/cinder/api/__init__.py @@ -15,7 +15,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg import paste.urlmap from cinder.i18n import _LW diff --git a/cinder/api/common.py b/cinder/api/common.py index 95cb3998677..f5c369f2f72 100644 --- a/cinder/api/common.py +++ b/cinder/api/common.py @@ -18,7 +18,7 @@ import os import re import urllib -from oslo.config import cfg +from oslo_config import cfg import six.moves.urllib.parse as urlparse import webob diff --git a/cinder/api/contrib/__init__.py b/cinder/api/contrib/__init__.py index 48804e81e68..140ccc5de75 100644 --- a/cinder/api/contrib/__init__.py +++ b/cinder/api/contrib/__init__.py @@ -19,7 +19,7 @@ It can't be called 'extensions' because that causes namespacing problems. """ -from oslo.config import cfg +from oslo_config import cfg from cinder.api import extensions from cinder.openstack.common import log as logging diff --git a/cinder/api/contrib/hosts.py b/cinder/api/contrib/hosts.py index 35f2c81aecb..4f79248c83b 100644 --- a/cinder/api/contrib/hosts.py +++ b/cinder/api/contrib/hosts.py @@ -17,8 +17,8 @@ from xml.parsers import expat -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg import webob.exc from cinder.api import extensions diff --git a/cinder/api/contrib/services.py b/cinder/api/contrib/services.py index 318774f9215..369b85e0b8c 100644 --- a/cinder/api/contrib/services.py +++ b/cinder/api/contrib/services.py @@ -14,8 +14,8 @@ # under the License. -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg import webob.exc from cinder.api import extensions diff --git a/cinder/api/contrib/volume_manage.py b/cinder/api/contrib/volume_manage.py index 07a7545a6d3..47039bdd35a 100644 --- a/cinder/api/contrib/volume_manage.py +++ b/cinder/api/contrib/volume_manage.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg from webob import exc from cinder.api import extensions diff --git a/cinder/api/extensions.py b/cinder/api/extensions.py index cc01f8d3fc6..f8733f66d1b 100644 --- a/cinder/api/extensions.py +++ b/cinder/api/extensions.py @@ -16,8 +16,8 @@ import os -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg import webob.dec import webob.exc diff --git a/cinder/api/middleware/auth.py b/cinder/api/middleware/auth.py index cf898c9b07d..5d4546bafaa 100644 --- a/cinder/api/middleware/auth.py +++ b/cinder/api/middleware/auth.py @@ -20,8 +20,8 @@ Common Auth Middleware. import os -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob.dec import webob.exc diff --git a/cinder/api/middleware/sizelimit.py b/cinder/api/middleware/sizelimit.py index b87db336662..58d450c5e67 100644 --- a/cinder/api/middleware/sizelimit.py +++ b/cinder/api/middleware/sizelimit.py @@ -17,7 +17,7 @@ Request Body limiting middleware. """ -from oslo.config import cfg +from oslo_config import cfg import webob.dec import webob.exc diff --git a/cinder/api/versions.py b/cinder/api/versions.py index ceb0fc16218..ca80e8e1f36 100644 --- a/cinder/api/versions.py +++ b/cinder/api/versions.py @@ -17,7 +17,7 @@ import datetime from lxml import etree -from oslo.config import cfg +from oslo_config import cfg from cinder.api.openstack import wsgi from cinder.api.views import versions as views_versions diff --git a/cinder/backup/api.py b/cinder/backup/api.py index 2b52d6d2ae4..1b3cee17321 100644 --- a/cinder/backup/api.py +++ b/cinder/backup/api.py @@ -19,8 +19,8 @@ Handles all requests relating to the volume backups service. from eventlet import greenthread -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg from cinder.backup import rpcapi as backup_rpcapi from cinder import context diff --git a/cinder/backup/driver.py b/cinder/backup/driver.py index 26a59bb83ae..bd4bcdac175 100644 --- a/cinder/backup/driver.py +++ b/cinder/backup/driver.py @@ -17,8 +17,8 @@ import abc -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import six from cinder.db import base diff --git a/cinder/backup/drivers/ceph.py b/cinder/backup/drivers/ceph.py index 86b969213d3..57887eeb10a 100644 --- a/cinder/backup/drivers/ceph.py +++ b/cinder/backup/drivers/ceph.py @@ -49,10 +49,10 @@ import subprocess import time import eventlet -from oslo.config import cfg from oslo.utils import encodeutils from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder.backup.driver import BackupDriver from cinder import exception diff --git a/cinder/backup/drivers/swift.py b/cinder/backup/drivers/swift.py index 4a403e7ce30..50139c3e87c 100644 --- a/cinder/backup/drivers/swift.py +++ b/cinder/backup/drivers/swift.py @@ -37,10 +37,10 @@ import os import socket import eventlet -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import timeutils from oslo.utils import units +from oslo_config import cfg import six from swiftclient import client as swift diff --git a/cinder/backup/drivers/tsm.py b/cinder/backup/drivers/tsm.py index 73cfca39e47..f19bb3a985b 100644 --- a/cinder/backup/drivers/tsm.py +++ b/cinder/backup/drivers/tsm.py @@ -29,8 +29,8 @@ import json import os import stat -from oslo.config import cfg from oslo_concurrency import processutils +from oslo_config import cfg from cinder.backup.driver import BackupDriver from cinder import exception diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index 5e240d78bbd..a766eeb2829 100644 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -33,10 +33,10 @@ Volume backups can be created, restored, deleted and listed. """ -from oslo.config import cfg from oslo import messaging from oslo.utils import excutils from oslo.utils import importutils +from oslo_config import cfg from cinder.backup import driver from cinder.backup import rpcapi as backup_rpcapi diff --git a/cinder/backup/rpcapi.py b/cinder/backup/rpcapi.py index 7258eb4da2d..7f8d807decb 100644 --- a/cinder/backup/rpcapi.py +++ b/cinder/backup/rpcapi.py @@ -18,8 +18,8 @@ Client side of the volume backup RPC API. """ -from oslo.config import cfg from oslo import messaging +from oslo_config import cfg from cinder.openstack.common import log as logging from cinder import rpc @@ -96,4 +96,4 @@ class BackupAPI(object): 'host': host}) cctxt = self.client.prepare(server=host) return cctxt.cast(ctxt, 'reset_status', backup_id=backup_id, - status=status) \ No newline at end of file + status=status) diff --git a/cinder/cmd/all.py b/cinder/cmd/all.py index de21938e201..f6c2a0ea692 100644 --- a/cinder/cmd/all.py +++ b/cinder/cmd/all.py @@ -33,7 +33,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg +from oslo_config import cfg from cinder import i18n i18n.enable_lazy() diff --git a/cinder/cmd/api.py b/cinder/cmd/api.py index f04b1b9ca0e..da7262279ae 100644 --- a/cinder/cmd/api.py +++ b/cinder/cmd/api.py @@ -25,7 +25,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg +from oslo_config import cfg from cinder import i18n i18n.enable_lazy() diff --git a/cinder/cmd/backup.py b/cinder/cmd/backup.py index 8fd8f25be25..df44560a5c9 100644 --- a/cinder/cmd/backup.py +++ b/cinder/cmd/backup.py @@ -23,7 +23,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) import eventlet -from oslo.config import cfg +from oslo_config import cfg eventlet.monkey_patch() diff --git a/cinder/cmd/manage.py b/cinder/cmd/manage.py index f278a210c0b..8dabde5ba63 100644 --- a/cinder/cmd/manage.py +++ b/cinder/cmd/manage.py @@ -61,8 +61,8 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg from oslo import messaging +from oslo_config import cfg from oslo_db.sqlalchemy import migration from cinder import i18n diff --git a/cinder/cmd/scheduler.py b/cinder/cmd/scheduler.py index 24d9bf7cdf1..8ef5b37b3ed 100644 --- a/cinder/cmd/scheduler.py +++ b/cinder/cmd/scheduler.py @@ -25,7 +25,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg +from oslo_config import cfg from cinder import i18n i18n.enable_lazy() diff --git a/cinder/cmd/volume.py b/cinder/cmd/volume.py index 2b3a4dbcdbd..0eed7c7e779 100644 --- a/cinder/cmd/volume.py +++ b/cinder/cmd/volume.py @@ -33,7 +33,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg +from oslo_config import cfg from cinder import i18n i18n.enable_lazy() diff --git a/cinder/cmd/volume_usage_audit.py b/cinder/cmd/volume_usage_audit.py index 69391bf5a1b..670309d5c28 100644 --- a/cinder/cmd/volume_usage_audit.py +++ b/cinder/cmd/volume_usage_audit.py @@ -41,7 +41,7 @@ import warnings warnings.simplefilter('once', DeprecationWarning) -from oslo.config import cfg +from oslo_config import cfg from cinder import i18n i18n.enable_lazy() diff --git a/cinder/common/config.py b/cinder/common/config.py index a977f1e882b..e3761bb285b 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -27,7 +27,7 @@ stepping stone. import socket -from oslo.config import cfg +from oslo_config import cfg from cinder.i18n import _ diff --git a/cinder/compute/nova.py b/cinder/compute/nova.py index 356a828ee48..2a2fc82d9eb 100644 --- a/cinder/compute/nova.py +++ b/cinder/compute/nova.py @@ -23,7 +23,7 @@ from novaclient import service_catalog from novaclient.v1_1 import client as nova_client from novaclient.v1_1.contrib import assisted_volume_snapshots from novaclient.v1_1.contrib import list_extensions -from oslo.config import cfg +from oslo_config import cfg from requests import exceptions as request_exceptions from cinder import context as ctx diff --git a/cinder/consistencygroup/api.py b/cinder/consistencygroup/api.py index 9a4786563e8..6c225f05d62 100644 --- a/cinder/consistencygroup/api.py +++ b/cinder/consistencygroup/api.py @@ -20,9 +20,9 @@ Handles all requests relating to consistency groups. import functools -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import timeutils +from oslo_config import cfg from cinder.db import base from cinder import exception diff --git a/cinder/db/api.py b/cinder/db/api.py index ecd3d4bf222..869cab8dda8 100644 --- a/cinder/db/api.py +++ b/cinder/db/api.py @@ -41,7 +41,7 @@ these objects be simple dictionaries. """ -from oslo.config import cfg +from oslo_config import cfg from oslo_db import concurrency as db_concurrency from oslo_db import options as db_options diff --git a/cinder/db/base.py b/cinder/db/base.py index 3ba467467ca..e35943af216 100644 --- a/cinder/db/base.py +++ b/cinder/db/base.py @@ -17,8 +17,8 @@ """Base class for classes that need modular database access.""" -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg db_driver_opt = cfg.StrOpt('db_driver', diff --git a/cinder/db/migration.py b/cinder/db/migration.py index f00cf55c115..7603313f10c 100644 --- a/cinder/db/migration.py +++ b/cinder/db/migration.py @@ -19,7 +19,7 @@ import os import threading -from oslo.config import cfg +from oslo_config import cfg from oslo_db import options from stevedore import driver diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 2a3c2d4b226..8034ee31bdf 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -26,8 +26,8 @@ import time import uuid import warnings -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from oslo_db import exception as db_exc from oslo_db import options from oslo_db.sqlalchemy import session as db_session diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py b/cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py index fa6592a986c..b611fc26a62 100644 --- a/cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py +++ b/cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py @@ -14,7 +14,7 @@ import datetime -from oslo.config import cfg +from oslo_config import cfg from sqlalchemy import MetaData, Table from cinder.i18n import _LE, _LI diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/026_add_consistencygroup_quota_class.py b/cinder/db/sqlalchemy/migrate_repo/versions/026_add_consistencygroup_quota_class.py index a682f002e5d..de26615d969 100644 --- a/cinder/db/sqlalchemy/migrate_repo/versions/026_add_consistencygroup_quota_class.py +++ b/cinder/db/sqlalchemy/migrate_repo/versions/026_add_consistencygroup_quota_class.py @@ -14,7 +14,7 @@ import datetime -from oslo.config import cfg +from oslo_config import cfg from sqlalchemy import MetaData, Table from cinder.i18n import _ diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index b61a127da8e..d053820a1d8 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -19,8 +19,8 @@ SQLAlchemy models for cinder data. """ -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from oslo_db.sqlalchemy import models from sqlalchemy import Column, Integer, String, Text, schema from sqlalchemy.ext.declarative import declarative_base diff --git a/cinder/exception.py b/cinder/exception.py index 6015765c10a..a82b34ed10b 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -24,7 +24,7 @@ SHOULD include dedicated exception logging. import sys -from oslo.config import cfg +from oslo_config import cfg import six import webob.exc diff --git a/cinder/hacking/checks.py b/cinder/hacking/checks.py index ff4e1dd3342..29efadd9aa3 100644 --- a/cinder/hacking/checks.py +++ b/cinder/hacking/checks.py @@ -43,7 +43,8 @@ no_audit_log = re.compile(r"(.)*LOG\.audit(.)*") # NOTE(jsbryant): When other oslo libraries switch over non-namespaced # imports, we will need to add them to the regex below. -oslo_namespace_imports = re.compile(r"from[\s]*oslo[.](concurrency|db)") +oslo_namespace_imports = re.compile(r"from[\s]*oslo[.](concurrency|db" + "|config)") def no_vi_headers(physical_line, line_number, lines): diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 66bf46ee03d..fb936eb9d34 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -27,9 +27,9 @@ import sys import time import glanceclient.exc -from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import timeutils +from oslo_config import cfg import six.moves.urllib.parse as urlparse from cinder import exception diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index b9ebdba184c..4e24778f98b 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -28,10 +28,10 @@ import contextlib import os import tempfile -from oslo.config import cfg from oslo.utils import timeutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _ diff --git a/cinder/keymgr/__init__.py b/cinder/keymgr/__init__.py index d1123081738..6c144451d2c 100644 --- a/cinder/keymgr/__init__.py +++ b/cinder/keymgr/__init__.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg keymgr_opts = [ cfg.StrOpt('api_class', diff --git a/cinder/keymgr/barbican.py b/cinder/keymgr/barbican.py index 76d1128b6c9..09ec4b72142 100644 --- a/cinder/keymgr/barbican.py +++ b/cinder/keymgr/barbican.py @@ -24,8 +24,8 @@ import binascii from barbicanclient import client as barbican_client from keystoneclient.auth import identity from keystoneclient import session -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/keymgr/conf_key_mgr.py b/cinder/keymgr/conf_key_mgr.py index 4b7d5660fa5..3357be10d6c 100644 --- a/cinder/keymgr/conf_key_mgr.py +++ b/cinder/keymgr/conf_key_mgr.py @@ -33,7 +33,7 @@ encryption key so *any* volume can be decrypted once the fixed key is known. import array -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LW diff --git a/cinder/keymgr/key_mgr.py b/cinder/keymgr/key_mgr.py index 9ed05a656ba..4d8bbdbf325 100644 --- a/cinder/keymgr/key_mgr.py +++ b/cinder/keymgr/key_mgr.py @@ -19,7 +19,7 @@ Key manager API import abc -from oslo.config import cfg +from oslo_config import cfg import six encryption_opts = [ diff --git a/cinder/manager.py b/cinder/manager.py index fea47eefe09..2ebf91e3c00 100644 --- a/cinder/manager.py +++ b/cinder/manager.py @@ -52,8 +52,8 @@ This module provides Manager, a base class for managers. """ -from oslo.config import cfg from oslo import messaging +from oslo_config import cfg from cinder.db import base from cinder.openstack.common import log as logging diff --git a/cinder/policy.py b/cinder/policy.py index 4378d1cfd24..586a1bce267 100644 --- a/cinder/policy.py +++ b/cinder/policy.py @@ -16,7 +16,7 @@ """Policy Engine For Cinder""" -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.openstack.common import policy diff --git a/cinder/quota.py b/cinder/quota.py index 84756ef7f6e..570b6bc4f81 100644 --- a/cinder/quota.py +++ b/cinder/quota.py @@ -19,9 +19,9 @@ import datetime -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import timeutils +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/replication/__init__.py b/cinder/replication/__init__.py index a4260e809c8..aa36e07c35f 100644 --- a/cinder/replication/__init__.py +++ b/cinder/replication/__init__.py @@ -13,8 +13,8 @@ # under the License. -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg CONF = cfg.CONF diff --git a/cinder/replication/api.py b/cinder/replication/api.py index 97c19bf6a05..49d9fa3d03d 100644 --- a/cinder/replication/api.py +++ b/cinder/replication/api.py @@ -17,7 +17,7 @@ Handles all requests relating to volume replication. """ import functools -from oslo.config import cfg +from oslo_config import cfg from cinder.db import base from cinder import exception diff --git a/cinder/rpc.py b/cinder/rpc.py index f07cf054562..49491db3a27 100644 --- a/cinder/rpc.py +++ b/cinder/rpc.py @@ -26,9 +26,9 @@ __all__ = [ 'TRANSPORT_ALIASES', ] -from oslo.config import cfg from oslo import messaging from oslo.serialization import jsonutils +from oslo_config import cfg from osprofiler import profiler import cinder.context diff --git a/cinder/scheduler/driver.py b/cinder/scheduler/driver.py index 927846c394b..158d7a24140 100644 --- a/cinder/scheduler/driver.py +++ b/cinder/scheduler/driver.py @@ -19,9 +19,9 @@ Scheduler base class that all Schedulers should inherit from """ -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import timeutils +from oslo_config import cfg from cinder import db from cinder.i18n import _ diff --git a/cinder/scheduler/filter_scheduler.py b/cinder/scheduler/filter_scheduler.py index 6abeaf2a551..583d3d11953 100644 --- a/cinder/scheduler/filter_scheduler.py +++ b/cinder/scheduler/filter_scheduler.py @@ -20,7 +20,7 @@ You can customize this scheduler by specifying your own volume Filters and Weighing Functions. """ -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LW diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index a27b2f2d578..47828063c4c 100644 --- a/cinder/scheduler/host_manager.py +++ b/cinder/scheduler/host_manager.py @@ -19,8 +19,8 @@ Manage hosts in the current zone. import UserDict -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from cinder import db from cinder import exception diff --git a/cinder/scheduler/manager.py b/cinder/scheduler/manager.py index 5cd482af0cf..ee69741d5bd 100644 --- a/cinder/scheduler/manager.py +++ b/cinder/scheduler/manager.py @@ -19,10 +19,10 @@ Scheduler Service """ -from oslo.config import cfg from oslo import messaging from oslo.utils import excutils from oslo.utils import importutils +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/scheduler/rpcapi.py b/cinder/scheduler/rpcapi.py index 53fadad8421..189333e818d 100644 --- a/cinder/scheduler/rpcapi.py +++ b/cinder/scheduler/rpcapi.py @@ -16,9 +16,9 @@ Client side of the scheduler manager RPC API. """ -from oslo.config import cfg from oslo import messaging from oslo.serialization import jsonutils +from oslo_config import cfg from cinder import rpc diff --git a/cinder/scheduler/scheduler_options.py b/cinder/scheduler/scheduler_options.py index a95df1382a8..965f1f42c8e 100644 --- a/cinder/scheduler/scheduler_options.py +++ b/cinder/scheduler/scheduler_options.py @@ -24,8 +24,8 @@ import datetime import json import os -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from cinder.i18n import _LE from cinder.openstack.common import log as logging diff --git a/cinder/scheduler/simple.py b/cinder/scheduler/simple.py index 7414f5736fd..7270955046f 100644 --- a/cinder/scheduler/simple.py +++ b/cinder/scheduler/simple.py @@ -50,7 +50,7 @@ With that, FilterScheduler behaves mostly the same as Chance/SimpleScheduler, with additional benefits of supporting volume types, volume encryption, QoS. """ -from oslo.config import cfg +from oslo_config import cfg simple_scheduler_opts = [ cfg.IntOpt("max_gigabytes", diff --git a/cinder/scheduler/weights/capacity.py b/cinder/scheduler/weights/capacity.py index 7ad78db8359..fe0074f3d01 100644 --- a/cinder/scheduler/weights/capacity.py +++ b/cinder/scheduler/weights/capacity.py @@ -35,7 +35,7 @@ and the weighing has the opposite effect of the default. import math -from oslo.config import cfg +from oslo_config import cfg from cinder.openstack.common.scheduler import weights diff --git a/cinder/scheduler/weights/volume_number.py b/cinder/scheduler/weights/volume_number.py index 87203628a7c..642b7167288 100644 --- a/cinder/scheduler/weights/volume_number.py +++ b/cinder/scheduler/weights/volume_number.py @@ -23,7 +23,7 @@ number and the weighing has the opposite effect of the default. """ -from oslo.config import cfg +from oslo_config import cfg from cinder import db from cinder.openstack.common import log as logging diff --git a/cinder/service.py b/cinder/service.py index 5e9a3b6bd3e..34730958302 100644 --- a/cinder/service.py +++ b/cinder/service.py @@ -22,10 +22,10 @@ import inspect import os import random -from oslo.config import cfg from oslo import messaging from oslo.utils import importutils from oslo_concurrency import processutils +from oslo_config import cfg from oslo_db import exception as db_exc import osprofiler.notifier from osprofiler import profiler diff --git a/cinder/ssh_utils.py b/cinder/ssh_utils.py index fbfdf5a695c..5ce4b1cf232 100644 --- a/cinder/ssh_utils.py +++ b/cinder/ssh_utils.py @@ -22,7 +22,7 @@ import os import string from eventlet import pools -from oslo.config import cfg +from oslo_config import cfg import paramiko from cinder import exception diff --git a/cinder/test.py b/cinder/test.py index 7fb7d95fbf1..429c1f2a5b4 100644 --- a/cinder/test.py +++ b/cinder/test.py @@ -29,12 +29,12 @@ import uuid import fixtures import mock import mox -from oslo.config import cfg -from oslo.config import fixture as config_fixture from oslo.messaging import conffixture as messaging_conffixture from oslo.utils import strutils from oslo.utils import timeutils from oslo_concurrency import lockutils +from oslo_config import cfg +from oslo_config import fixture as config_fixture import stubout import testtools diff --git a/cinder/tests/api/contrib/test_admin_actions.py b/cinder/tests/api/contrib/test_admin_actions.py index 201dd0769e0..69bf92f31c3 100644 --- a/cinder/tests/api/contrib/test_admin_actions.py +++ b/cinder/tests/api/contrib/test_admin_actions.py @@ -13,11 +13,11 @@ import ast import fixtures -from oslo.config import cfg -from oslo.config import fixture as config_fixture from oslo.serialization import jsonutils from oslo.utils import timeutils from oslo_concurrency import lockutils +from oslo_config import cfg +from oslo_config import fixture as config_fixture import webob from webob import exc diff --git a/cinder/tests/api/contrib/test_volume_actions.py b/cinder/tests/api/contrib/test_volume_actions.py index a3e1113a4cd..8b57043b5ac 100644 --- a/cinder/tests/api/contrib/test_volume_actions.py +++ b/cinder/tests/api/contrib/test_volume_actions.py @@ -17,9 +17,9 @@ import json import uuid import mock -from oslo.config import cfg from oslo import messaging from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api.contrib import volume_actions diff --git a/cinder/tests/api/contrib/test_volume_replication.py b/cinder/tests/api/contrib/test_volume_replication.py index 2c2d3cdb403..4277a205c3a 100644 --- a/cinder/tests/api/contrib/test_volume_replication.py +++ b/cinder/tests/api/contrib/test_volume_replication.py @@ -19,7 +19,7 @@ Tests for volume replication API code. import json import mock -from oslo.config import cfg +from oslo_config import cfg import webob from cinder import context diff --git a/cinder/tests/api/middleware/test_sizelimit.py b/cinder/tests/api/middleware/test_sizelimit.py index 61d8f17425a..3b0a778f782 100644 --- a/cinder/tests/api/middleware/test_sizelimit.py +++ b/cinder/tests/api/middleware/test_sizelimit.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg import six import webob diff --git a/cinder/tests/api/test_extensions.py b/cinder/tests/api/test_extensions.py index a875c8541f3..a7acdff45cf 100644 --- a/cinder/tests/api/test_extensions.py +++ b/cinder/tests/api/test_extensions.py @@ -16,8 +16,8 @@ import iso8601 from lxml import etree -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v1/test_snapshot_metadata.py b/cinder/tests/api/v1/test_snapshot_metadata.py index 01c4321aee4..c80ca3b8327 100644 --- a/cinder/tests/api/v1/test_snapshot_metadata.py +++ b/cinder/tests/api/v1/test_snapshot_metadata.py @@ -15,8 +15,8 @@ import uuid -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v1/test_volume_metadata.py b/cinder/tests/api/v1/test_volume_metadata.py index 0b1188f025e..e0be0ca834e 100644 --- a/cinder/tests/api/v1/test_volume_metadata.py +++ b/cinder/tests/api/v1/test_volume_metadata.py @@ -15,8 +15,8 @@ import uuid -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v1/test_volumes.py b/cinder/tests/api/v1/test_volumes.py index 88a6beba6a9..3c16fe6cbbf 100644 --- a/cinder/tests/api/v1/test_volumes.py +++ b/cinder/tests/api/v1/test_volumes.py @@ -17,7 +17,7 @@ import datetime from lxml import etree import mock -from oslo.config import cfg +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v2/test_snapshot_metadata.py b/cinder/tests/api/v2/test_snapshot_metadata.py index 28aa3eda637..e7e4a3aaed8 100644 --- a/cinder/tests/api/v2/test_snapshot_metadata.py +++ b/cinder/tests/api/v2/test_snapshot_metadata.py @@ -15,8 +15,8 @@ import uuid -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v2/test_volume_metadata.py b/cinder/tests/api/v2/test_volume_metadata.py index 6e90c4495ab..a3ed0155144 100644 --- a/cinder/tests/api/v2/test_volume_metadata.py +++ b/cinder/tests/api/v2/test_volume_metadata.py @@ -15,8 +15,8 @@ import uuid -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg import webob from cinder.api import extensions diff --git a/cinder/tests/api/v2/test_volumes.py b/cinder/tests/api/v2/test_volumes.py index 5b79deff904..c200e6ade86 100644 --- a/cinder/tests/api/v2/test_volumes.py +++ b/cinder/tests/api/v2/test_volumes.py @@ -18,7 +18,7 @@ import datetime from lxml import etree import mock -from oslo.config import cfg +from oslo_config import cfg import six import six.moves.urllib.parse as urlparse import webob diff --git a/cinder/tests/conf_fixture.py b/cinder/tests/conf_fixture.py index 4bb29c998d7..698369f8c70 100644 --- a/cinder/tests/conf_fixture.py +++ b/cinder/tests/conf_fixture.py @@ -16,7 +16,7 @@ import os -from oslo.config import cfg +from oslo_config import cfg CONF = cfg.CONF diff --git a/cinder/tests/db/test_name_id.py b/cinder/tests/db/test_name_id.py index 5446c2f5f4a..faeca670e6f 100644 --- a/cinder/tests/db/test_name_id.py +++ b/cinder/tests/db/test_name_id.py @@ -14,7 +14,7 @@ """Tests for volume name_id.""" -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/declare_conf.py b/cinder/tests/declare_conf.py index a1974403316..78e03f22242 100644 --- a/cinder/tests/declare_conf.py +++ b/cinder/tests/declare_conf.py @@ -15,7 +15,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg CONF = cfg.CONF diff --git a/cinder/tests/image/test_glance.py b/cinder/tests/image/test_glance.py index b5803736354..26b272a2ff2 100644 --- a/cinder/tests/image/test_glance.py +++ b/cinder/tests/image/test_glance.py @@ -18,7 +18,7 @@ import datetime import glanceclient.exc import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/integrated/test_extensions.py b/cinder/tests/integrated/test_extensions.py index da965d39815..b27f45b6012 100644 --- a/cinder/tests/integrated/test_extensions.py +++ b/cinder/tests/integrated/test_extensions.py @@ -14,7 +14,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg from cinder.openstack.common import log as logging from cinder.tests.integrated import integrated_helpers diff --git a/cinder/tests/keymgr/test_barbican.py b/cinder/tests/keymgr/test_barbican.py index bc81b1c5e64..ef8577f1e15 100644 --- a/cinder/tests/keymgr/test_barbican.py +++ b/cinder/tests/keymgr/test_barbican.py @@ -22,7 +22,7 @@ import base64 import binascii import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.keymgr import barbican diff --git a/cinder/tests/keymgr/test_conf_key_mgr.py b/cinder/tests/keymgr/test_conf_key_mgr.py index d4ba38c47e7..314a48f4012 100644 --- a/cinder/tests/keymgr/test_conf_key_mgr.py +++ b/cinder/tests/keymgr/test_conf_key_mgr.py @@ -19,7 +19,7 @@ Test cases for the conf key manager. import array -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/runtime_conf.py b/cinder/tests/runtime_conf.py index db1a6c5b713..8fd4d15a4ec 100644 --- a/cinder/tests/runtime_conf.py +++ b/cinder/tests/runtime_conf.py @@ -15,7 +15,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg CONF = cfg.CONF diff --git a/cinder/tests/scheduler/test_allocated_capacity_weigher.py b/cinder/tests/scheduler/test_allocated_capacity_weigher.py index 22791285bad..718ba60bcbe 100644 --- a/cinder/tests/scheduler/test_allocated_capacity_weigher.py +++ b/cinder/tests/scheduler/test_allocated_capacity_weigher.py @@ -18,7 +18,7 @@ Tests For Allocated Capacity Weigher. """ import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder.openstack.common.scheduler.weights import HostWeightHandler diff --git a/cinder/tests/scheduler/test_capacity_weigher.py b/cinder/tests/scheduler/test_capacity_weigher.py index c28f384ae7a..962220a26ae 100644 --- a/cinder/tests/scheduler/test_capacity_weigher.py +++ b/cinder/tests/scheduler/test_capacity_weigher.py @@ -17,7 +17,7 @@ Tests For Capacity Weigher. """ import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder.openstack.common.scheduler.weights import HostWeightHandler diff --git a/cinder/tests/scheduler/test_host_manager.py b/cinder/tests/scheduler/test_host_manager.py index 86e830ed89e..881630f37bf 100644 --- a/cinder/tests/scheduler/test_host_manager.py +++ b/cinder/tests/scheduler/test_host_manager.py @@ -17,8 +17,8 @@ Tests For HostManager """ import mock -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from cinder import exception from cinder.openstack.common.scheduler import filters diff --git a/cinder/tests/scheduler/test_rpcapi.py b/cinder/tests/scheduler/test_rpcapi.py index fe6287a2ce6..c37044c568b 100644 --- a/cinder/tests/scheduler/test_rpcapi.py +++ b/cinder/tests/scheduler/test_rpcapi.py @@ -20,7 +20,7 @@ Unit Tests for cinder.scheduler.rpcapi import copy import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder.scheduler import rpcapi as scheduler_rpcapi diff --git a/cinder/tests/scheduler/test_scheduler.py b/cinder/tests/scheduler/test_scheduler.py index 5d55eccfa1a..7351c11bd41 100644 --- a/cinder/tests/scheduler/test_scheduler.py +++ b/cinder/tests/scheduler/test_scheduler.py @@ -19,7 +19,7 @@ Tests For Scheduler """ import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/scheduler/test_volume_number_weigher.py b/cinder/tests/scheduler/test_volume_number_weigher.py index 51c36369d35..2aa7596a611 100644 --- a/cinder/tests/scheduler/test_volume_number_weigher.py +++ b/cinder/tests/scheduler/test_volume_number_weigher.py @@ -17,7 +17,7 @@ Tests For Volume Number Weigher. """ import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder.db.sqlalchemy import api diff --git a/cinder/tests/targets/test_base_iscsi_driver.py b/cinder/tests/targets/test_base_iscsi_driver.py index 78de70a34be..3bcb3cad6c3 100644 --- a/cinder/tests/targets/test_base_iscsi_driver.py +++ b/cinder/tests/targets/test_base_iscsi_driver.py @@ -10,8 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from cinder import exception from cinder import test diff --git a/cinder/tests/test_backup.py b/cinder/tests/test_backup.py index e7fdd5cc86e..847384d5d62 100644 --- a/cinder/tests/test_backup.py +++ b/cinder/tests/test_backup.py @@ -20,9 +20,9 @@ Tests for Backup code. import tempfile import mock -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import timeutils +from oslo_config import cfg from cinder.backup import manager from cinder import context diff --git a/cinder/tests/test_backup_swift.py b/cinder/tests/test_backup_swift.py index aea344495e5..b919ba310a3 100644 --- a/cinder/tests/test_backup_swift.py +++ b/cinder/tests/test_backup_swift.py @@ -24,7 +24,7 @@ import tempfile import zlib import mock -from oslo.config import cfg +from oslo_config import cfg from swiftclient import client as swift from cinder.backup.drivers.swift import SwiftBackupDriver diff --git a/cinder/tests/test_block_device.py b/cinder/tests/test_block_device.py index 9804cdcc61f..6ba46d0a85c 100644 --- a/cinder/tests/test_block_device.py +++ b/cinder/tests/test_block_device.py @@ -14,7 +14,7 @@ # under the License. import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder.db.sqlalchemy import api diff --git a/cinder/tests/test_cmd.py b/cinder/tests/test_cmd.py index 18c9e81ddea..d62b5221077 100644 --- a/cinder/tests/test_cmd.py +++ b/cinder/tests/test_cmd.py @@ -16,7 +16,7 @@ import StringIO import sys import mock -from oslo.config import cfg +from oslo_config import cfg import rtslib from cinder.cmd import all as cinder_all @@ -636,7 +636,7 @@ class TestCinderManageCmd(test.TestCase): service_get_all.assert_called_with(ctxt) service_is_up.assert_called_with(service) - @mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt') + @mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt') def test_main_argv_lt_2(self, register_cli_opt): script_name = 'cinder-manage' sys.argv = [script_name] @@ -647,9 +647,9 @@ class TestCinderManageCmd(test.TestCase): self.assertTrue(register_cli_opt.called) self.assertEqual(exit.code, 2) - @mock.patch('oslo.config.cfg.ConfigOpts.__call__') + @mock.patch('oslo_config.cfg.ConfigOpts.__call__') @mock.patch('cinder.openstack.common.log.setup') - @mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt') + @mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt') def test_main_sudo_failed(self, register_cli_opt, log_setup, config_opts_call): script_name = 'cinder-manage' @@ -666,8 +666,8 @@ class TestCinderManageCmd(test.TestCase): self.assertFalse(log_setup.called) self.assertEqual(exit.code, 2) - @mock.patch('oslo.config.cfg.ConfigOpts.__call__') - @mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt') + @mock.patch('oslo_config.cfg.ConfigOpts.__call__') + @mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt') def test_main(self, register_cli_opt, config_opts_call): script_name = 'cinder-manage' sys.argv = [script_name, 'config', 'list'] diff --git a/cinder/tests/test_conf.py b/cinder/tests/test_conf.py index c4f0ef9a2fa..1dd285ad652 100644 --- a/cinder/tests/test_conf.py +++ b/cinder/tests/test_conf.py @@ -17,7 +17,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg from cinder import test diff --git a/cinder/tests/test_coraid.py b/cinder/tests/test_coraid.py index b062cf782ba..f1206b59175 100644 --- a/cinder/tests/test_coraid.py +++ b/cinder/tests/test_coraid.py @@ -18,9 +18,9 @@ import math import mock import mox -from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import units +from oslo_config import cfg from cinder.brick.initiator import connector from cinder import exception diff --git a/cinder/tests/test_db_api.py b/cinder/tests/test_db_api.py index 5b402c14b23..3459c020226 100644 --- a/cinder/tests/test_db_api.py +++ b/cinder/tests/test_db_api.py @@ -16,7 +16,7 @@ import datetime -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/test_glusterfs.py b/cinder/tests/test_glusterfs.py index f2b17907fbd..fc2feba85fa 100644 --- a/cinder/tests/test_glusterfs.py +++ b/cinder/tests/test_glusterfs.py @@ -21,9 +21,9 @@ import time import traceback import mock -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils as putils +from oslo_config import cfg from cinder import brick from cinder import compute diff --git a/cinder/tests/test_gpfs.py b/cinder/tests/test_gpfs.py index 119ac959ce0..1535f0c6cc0 100644 --- a/cinder/tests/test_gpfs.py +++ b/cinder/tests/test_gpfs.py @@ -18,9 +18,9 @@ import shutil import tempfile import mock -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_hacking.py b/cinder/tests/test_hacking.py index 0a981414d77..19068c100b9 100644 --- a/cinder/tests/test_hacking.py +++ b/cinder/tests/test_hacking.py @@ -147,3 +147,7 @@ class HackingTestCase(test.TestCase): "from oslo.db import foo")))) self.assertEqual(0, len(list(checks.check_oslo_namespace_imports( "from oslo_db import bar")))) + self.assertEqual(1, len(list(checks.check_oslo_namespace_imports( + "from oslo.config import foo")))) + self.assertEqual(0, len(list(checks.check_oslo_namespace_imports( + "from oslo_config import bar")))) diff --git a/cinder/tests/test_hp3par.py b/cinder/tests/test_hp3par.py index abdd6a44d01..77878c9bac6 100644 --- a/cinder/tests/test_hp3par.py +++ b/cinder/tests/test_hp3par.py @@ -19,8 +19,8 @@ import mock import ast -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_huawei_drivers_compatibility.py b/cinder/tests/test_huawei_drivers_compatibility.py index e082a15f6e9..5a5df04a573 100644 --- a/cinder/tests/test_huawei_drivers_compatibility.py +++ b/cinder/tests/test_huawei_drivers_compatibility.py @@ -13,8 +13,8 @@ # under the License. -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import context from cinder import test diff --git a/cinder/tests/test_ibm_xiv_ds8k.py b/cinder/tests/test_ibm_xiv_ds8k.py index 4a4caa9fa30..2bb57b9d54e 100644 --- a/cinder/tests/test_ibm_xiv_ds8k.py +++ b/cinder/tests/test_ibm_xiv_ds8k.py @@ -22,7 +22,7 @@ import copy import mox -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_ibmnas.py b/cinder/tests/test_ibmnas.py index ee3736c110d..23157d8e283 100644 --- a/cinder/tests/test_ibmnas.py +++ b/cinder/tests/test_ibmnas.py @@ -22,8 +22,8 @@ NAS based IBM GPFS Storage Systems). """ import mock -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_netapp_nfs.py b/cinder/tests/test_netapp_nfs.py index 75f0cf0f4f7..7bb0dbb960b 100644 --- a/cinder/tests/test_netapp_nfs.py +++ b/cinder/tests/test_netapp_nfs.py @@ -43,7 +43,7 @@ from cinder.volume.drivers.netapp.dataontap import ssc_cmode from cinder.volume.drivers.netapp import utils -from oslo.config import cfg +from oslo_config import cfg CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/cinder/tests/test_nimble.py b/cinder/tests/test_nimble.py index 925eea147f2..27cb0c77aed 100644 --- a/cinder/tests/test_nimble.py +++ b/cinder/tests/test_nimble.py @@ -14,7 +14,7 @@ # under the License. import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.openstack.common import log as logging diff --git a/cinder/tests/test_quobyte.py b/cinder/tests/test_quobyte.py index 42e0fde6abe..23ff13ef3fd 100644 --- a/cinder/tests/test_quobyte.py +++ b/cinder/tests/test_quobyte.py @@ -26,9 +26,9 @@ import mox as mox_lib from mox import IgnoreArg from mox import IsA from mox import stubout -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils as putils +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_quota.py b/cinder/tests/test_quota.py index aed9dd15481..0143438620b 100644 --- a/cinder/tests/test_quota.py +++ b/cinder/tests/test_quota.py @@ -19,8 +19,8 @@ import datetime import mock -from oslo.config import cfg from oslo.utils import timeutils +from oslo_config import cfg from cinder import backup from cinder import context diff --git a/cinder/tests/test_replication.py b/cinder/tests/test_replication.py index 8da2ad400fc..59f22e7038b 100644 --- a/cinder/tests/test_replication.py +++ b/cinder/tests/test_replication.py @@ -16,8 +16,8 @@ Tests for Volume replication code. """ import mock -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/test_service.py b/cinder/tests/test_service.py index 2f80cea3f5c..2b9759da4b9 100644 --- a/cinder/tests/test_service.py +++ b/cinder/tests/test_service.py @@ -22,8 +22,8 @@ Unit Tests for remote procedure calls using queue import mock import mox -from oslo.config import cfg from oslo_concurrency import processutils +from oslo_config import cfg from oslo_db import exception as db_exc from cinder import context diff --git a/cinder/tests/test_symantec_cnfs.py b/cinder/tests/test_symantec_cnfs.py index d11536344d5..2c4042a0d80 100644 --- a/cinder/tests/test_symantec_cnfs.py +++ b/cinder/tests/test_symantec_cnfs.py @@ -18,7 +18,7 @@ import os import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/tests/test_test.py b/cinder/tests/test_test.py index a2efd3b5860..3c53bf4762f 100644 --- a/cinder/tests/test_test.py +++ b/cinder/tests/test_test.py @@ -17,8 +17,8 @@ """Tests for the testing base code.""" -from oslo.config import cfg from oslo import messaging +from oslo_config import cfg from cinder import rpc from cinder import test diff --git a/cinder/tests/test_utils.py b/cinder/tests/test_utils.py index a4712497e9f..4ee35a433f2 100644 --- a/cinder/tests/test_utils.py +++ b/cinder/tests/test_utils.py @@ -19,9 +19,9 @@ import os import uuid import mock -from oslo.config import cfg from oslo.utils import timeutils from oslo_concurrency import processutils as putils +from oslo_config import cfg import paramiko import six diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 61b8830dea4..95c62c44984 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -29,11 +29,11 @@ import tempfile import eventlet import mock import mox -from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import importutils from oslo.utils import timeutils from oslo.utils import units +from oslo_config import cfg from stevedore import extension from taskflow.engines.action_engine import engine diff --git a/cinder/tests/test_volume_configuration.py b/cinder/tests/test_volume_configuration.py index 470eca5ffaf..55c927abf4d 100644 --- a/cinder/tests/test_volume_configuration.py +++ b/cinder/tests/test_volume_configuration.py @@ -16,7 +16,7 @@ """Tests for the configuration wrapper in volume drivers.""" -from oslo.config import cfg +from oslo_config import cfg from cinder.openstack.common import log as logging from cinder import test diff --git a/cinder/tests/test_volume_rpcapi.py b/cinder/tests/test_volume_rpcapi.py index a94ee5bcb6d..33ba3c8ff4c 100644 --- a/cinder/tests/test_volume_rpcapi.py +++ b/cinder/tests/test_volume_rpcapi.py @@ -17,8 +17,8 @@ Unit Tests for cinder.volume.rpcapi """ import copy -from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/test_volume_types.py b/cinder/tests/test_volume_types.py index 393ee6b52be..47240fcdae9 100644 --- a/cinder/tests/test_volume_types.py +++ b/cinder/tests/test_volume_types.py @@ -19,7 +19,7 @@ Unit Tests for volume types code import datetime import time -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import db diff --git a/cinder/tests/test_volume_utils.py b/cinder/tests/test_volume_utils.py index 2a1defa103a..737ae239f6d 100644 --- a/cinder/tests/test_volume_utils.py +++ b/cinder/tests/test_volume_utils.py @@ -16,8 +16,8 @@ """Tests For miscellaneous util methods used with volume.""" import mock -from oslo.config import cfg from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.openstack.common import log as logging diff --git a/cinder/tests/test_wsgi.py b/cinder/tests/test_wsgi.py index 7d7b2ef16b1..14589874598 100644 --- a/cinder/tests/test_wsgi.py +++ b/cinder/tests/test_wsgi.py @@ -25,7 +25,7 @@ import time import urllib2 import mock -from oslo.config import cfg +from oslo_config import cfg import testtools import webob import webob.dec diff --git a/cinder/tests/windows/test_windows.py b/cinder/tests/windows/test_windows.py index 5ec0a2e2a31..cd54729f7d8 100644 --- a/cinder/tests/windows/test_windows.py +++ b/cinder/tests/windows/test_windows.py @@ -23,7 +23,7 @@ import shutil import tempfile import mox -from oslo.config import cfg +from oslo_config import cfg from cinder.image import image_utils from cinder.openstack.common import fileutils diff --git a/cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py b/cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py index e138d452a02..053191508fa 100644 --- a/cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py +++ b/cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py @@ -20,7 +20,7 @@ """Unit tests for brcd fc san lookup service.""" import mock -from oslo.config import cfg +from oslo_config import cfg import paramiko from cinder import exception diff --git a/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py b/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py index 5845c853882..2129abb1db3 100644 --- a/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py +++ b/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py @@ -20,8 +20,8 @@ """Unit tests for Brocade fc zone driver.""" import mock -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg import paramiko from cinder import exception diff --git a/cinder/tests/zonemanager/test_cisco_fc_san_lookup_service.py b/cinder/tests/zonemanager/test_cisco_fc_san_lookup_service.py index fca1cdf3f12..3d1a140b18d 100644 --- a/cinder/tests/zonemanager/test_cisco_fc_san_lookup_service.py +++ b/cinder/tests/zonemanager/test_cisco_fc_san_lookup_service.py @@ -18,7 +18,7 @@ """Unit tests for Cisco fc san lookup service.""" import mock -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder import test diff --git a/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py b/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py index 91d5d33839e..b1441aa0dde 100644 --- a/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py +++ b/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py @@ -17,9 +17,9 @@ """Unit tests for Cisco FC zone driver.""" -from oslo.config import cfg from oslo.utils import importutils from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder import test diff --git a/cinder/transfer/__init__.py b/cinder/transfer/__init__.py index 7b972ac4e05..b778d52bdfa 100644 --- a/cinder/transfer/__init__.py +++ b/cinder/transfer/__init__.py @@ -17,8 +17,8 @@ # collisions with use of 'from cinder.transfer import ' elsewhere. -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg CONF = cfg.CONF diff --git a/cinder/transfer/api.py b/cinder/transfer/api.py index 46a706b4b5e..3789f547759 100644 --- a/cinder/transfer/api.py +++ b/cinder/transfer/api.py @@ -22,8 +22,8 @@ import hashlib import hmac import os -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg from cinder.db import base from cinder import exception diff --git a/cinder/utils.py b/cinder/utils.py index aa6fadcc980..357305255ea 100644 --- a/cinder/utils.py +++ b/cinder/utils.py @@ -35,11 +35,11 @@ from xml import sax from xml.sax import expatreader from xml.sax import saxutils -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import timeutils from oslo_concurrency import lockutils from oslo_concurrency import processutils +from oslo_config import cfg import six from cinder.brick.initiator import connector diff --git a/cinder/volume/api.py b/cinder/volume/api.py index fe00660786f..303372c2fa9 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -23,9 +23,9 @@ import collections import datetime import functools -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import timeutils +from oslo_config import cfg import six from cinder import context diff --git a/cinder/volume/configuration.py b/cinder/volume/configuration.py index 2599ee9ad9f..6b983683772 100644 --- a/cinder/volume/configuration.py +++ b/cinder/volume/configuration.py @@ -40,7 +40,7 @@ and registered in the group in which they are used. """ -from oslo.config import cfg +from oslo_config import cfg from cinder.openstack.common import log as logging diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index a4a75a14932..bfc644caa43 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -19,9 +19,9 @@ Drivers for volumes. import time -from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LW diff --git a/cinder/volume/drivers/block_device.py b/cinder/volume/drivers/block_device.py index a9cf2694996..f59baf3e266 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -15,8 +15,8 @@ import os -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import context from cinder.db.sqlalchemy import api diff --git a/cinder/volume/drivers/cloudbyte/options.py b/cinder/volume/drivers/cloudbyte/options.py index f140a537732..7ca3128ee30 100644 --- a/cinder/volume/drivers/cloudbyte/options.py +++ b/cinder/volume/drivers/cloudbyte/options.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg cloudbyte_connection_opts = [ cfg.StrOpt("cb_apikey", diff --git a/cinder/volume/drivers/coraid.py b/cinder/volume/drivers/coraid.py index 26f10e51fc0..1ce9375f560 100644 --- a/cinder/volume/drivers/coraid.py +++ b/cinder/volume/drivers/coraid.py @@ -26,10 +26,10 @@ import math import urllib import urllib2 -from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import units from oslo_concurrency import lockutils +from oslo_config import cfg import six.moves.urllib.parse as urlparse from cinder import exception diff --git a/cinder/volume/drivers/datera.py b/cinder/volume/drivers/datera.py index 65ae3bdb15d..2c33a9815f5 100644 --- a/cinder/volume/drivers/datera.py +++ b/cinder/volume/drivers/datera.py @@ -15,8 +15,8 @@ import json -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg import requests from cinder import exception diff --git a/cinder/volume/drivers/dell/dell_storagecenter_common.py b/cinder/volume/drivers/dell/dell_storagecenter_common.py index 70e3811c870..55c690f3497 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_common.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_common.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LW diff --git a/cinder/volume/drivers/drbdmanagedrv.py b/cinder/volume/drivers/drbdmanagedrv.py index a87f6637196..c0dab7ba316 100644 --- a/cinder/volume/drivers/drbdmanagedrv.py +++ b/cinder/volume/drivers/drbdmanagedrv.py @@ -25,9 +25,9 @@ for more details. import uuid -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import units +from oslo_config import cfg import six diff --git a/cinder/volume/drivers/emc/emc_vmax_common.py b/cinder/volume/drivers/emc/emc_vmax_common.py index 1ff012015eb..524be0b4ca8 100644 --- a/cinder/volume/drivers/emc/emc_vmax_common.py +++ b/cinder/volume/drivers/emc/emc_vmax_common.py @@ -15,7 +15,7 @@ import os.path -from oslo.config import cfg +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/emc/emc_vnx_cli.py b/cinder/volume/drivers/emc/emc_vnx_cli.py index 508dd99ee31..02d5f587e7a 100644 --- a/cinder/volume/drivers/emc/emc_vnx_cli.py +++ b/cinder/volume/drivers/emc/emc_vnx_cli.py @@ -21,12 +21,12 @@ import random import re import time -from oslo.config import cfg from oslo.serialization import jsonutils as json from oslo.utils import excutils from oslo.utils import timeutils from oslo_concurrency import lockutils from oslo_concurrency import processutils +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/eqlx.py b/cinder/volume/drivers/eqlx.py index 7739b5111a1..9b9fff01ead 100644 --- a/cinder/volume/drivers/eqlx.py +++ b/cinder/volume/drivers/eqlx.py @@ -21,9 +21,9 @@ import random import eventlet from eventlet import greenthread import greenlet -from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LW, _LI diff --git a/cinder/volume/drivers/fujitsu_eternus_dx_common.py b/cinder/volume/drivers/fujitsu_eternus_dx_common.py index caa329f6b23..34c4946b8a1 100644 --- a/cinder/volume/drivers/fujitsu_eternus_dx_common.py +++ b/cinder/volume/drivers/fujitsu_eternus_dx_common.py @@ -25,8 +25,8 @@ import hashlib import time from xml.dom.minidom import parseString -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/fusionio/ioControl.py b/cinder/volume/drivers/fusionio/ioControl.py index ce7985c262d..8f3b8857eee 100644 --- a/cinder/volume/drivers/fusionio/ioControl.py +++ b/cinder/volume/drivers/fusionio/ioControl.py @@ -23,8 +23,8 @@ import json import random import uuid -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg import requests from cinder import exception diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index d8fcc21769d..dcf0c109c73 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -17,9 +17,9 @@ import errno import os import stat -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder.brick.remotefs import remotefs as remotefs_brick from cinder import exception diff --git a/cinder/volume/drivers/hds/hds.py b/cinder/volume/drivers/hds/hds.py index 7fe55734511..4992b70bbec 100644 --- a/cinder/volume/drivers/hds/hds.py +++ b/cinder/volume/drivers/hds/hds.py @@ -21,8 +21,8 @@ iSCSI Cinder Volume driver for Hitachi Unified Storage (HUS) platform. from xml.etree import ElementTree as ETree -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/drivers/hds/iscsi.py b/cinder/volume/drivers/hds/iscsi.py index adb30427831..d33436be258 100644 --- a/cinder/volume/drivers/hds/iscsi.py +++ b/cinder/volume/drivers/hds/iscsi.py @@ -20,9 +20,9 @@ iSCSI Cinder Volume driver for Hitachi Unified Storage (HUS-HNAS) platform. from xml.etree import ElementTree as ETree -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder import exception from cinder.i18n import _LE, _LI diff --git a/cinder/volume/drivers/hds/nfs.py b/cinder/volume/drivers/hds/nfs.py index 0139265762c..b522446053d 100644 --- a/cinder/volume/drivers/hds/nfs.py +++ b/cinder/volume/drivers/hds/nfs.py @@ -21,10 +21,10 @@ import os import time from xml.etree import ElementTree as ETree -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/drivers/hitachi/hbsd_common.py b/cinder/volume/drivers/hitachi/hbsd_common.py index bc6b1e42cab..ecb1865072b 100644 --- a/cinder/volume/drivers/hitachi/hbsd_common.py +++ b/cinder/volume/drivers/hitachi/hbsd_common.py @@ -20,8 +20,8 @@ from contextlib import nested import re import threading -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg import six from cinder.db.sqlalchemy import api diff --git a/cinder/volume/drivers/hitachi/hbsd_fc.py b/cinder/volume/drivers/hitachi/hbsd_fc.py index aab7165ca78..c10156c9dbb 100644 --- a/cinder/volume/drivers/hitachi/hbsd_fc.py +++ b/cinder/volume/drivers/hitachi/hbsd_fc.py @@ -20,8 +20,8 @@ from contextlib import nested import os import threading -from oslo.config import cfg from oslo.utils import excutils +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/hitachi/hbsd_horcm.py b/cinder/volume/drivers/hitachi/hbsd_horcm.py index 116385bd89b..27f527caf5b 100644 --- a/cinder/volume/drivers/hitachi/hbsd_horcm.py +++ b/cinder/volume/drivers/hitachi/hbsd_horcm.py @@ -20,9 +20,9 @@ import shlex import threading import time -from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import processutils as putils +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/hitachi/hbsd_iscsi.py b/cinder/volume/drivers/hitachi/hbsd_iscsi.py index 1b1246f862c..11515f8d681 100644 --- a/cinder/volume/drivers/hitachi/hbsd_iscsi.py +++ b/cinder/volume/drivers/hitachi/hbsd_iscsi.py @@ -20,7 +20,7 @@ from contextlib import nested import os import threading -from oslo.config import cfg +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/huawei/__init__.py b/cinder/volume/drivers/huawei/__init__.py index 554a3f6adec..2416acc7865 100644 --- a/cinder/volume/drivers/huawei/__init__.py +++ b/cinder/volume/drivers/huawei/__init__.py @@ -18,7 +18,7 @@ Provide a unified driver class for users. The product type and the protocol should be specified in config file before. """ -from oslo.config import cfg +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/huaweistorhyper/huaweistorac.py b/cinder/volume/drivers/huaweistorhyper/huaweistorac.py index 3ba3b324db5..2c46070bcf5 100644 --- a/cinder/volume/drivers/huaweistorhyper/huaweistorac.py +++ b/cinder/volume/drivers/huaweistorhyper/huaweistorac.py @@ -20,8 +20,8 @@ import uuid -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg import six from cinder import context diff --git a/cinder/volume/drivers/ibm/flashsystem.py b/cinder/volume/drivers/ibm/flashsystem.py index 1b66c463a7c..eeb8852fb6b 100644 --- a/cinder/volume/drivers/ibm/flashsystem.py +++ b/cinder/volume/drivers/ibm/flashsystem.py @@ -29,10 +29,10 @@ import re import string import threading -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg import six from cinder import context diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py index f0a1ed4a016..2e97728c222 100644 --- a/cinder/volume/drivers/ibm/gpfs.py +++ b/cinder/volume/drivers/ibm/gpfs.py @@ -21,9 +21,9 @@ import os import re import shutil -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/drivers/ibm/ibmnas.py b/cinder/volume/drivers/ibm/ibmnas.py index 25e9951783d..469ea8da389 100644 --- a/cinder/volume/drivers/ibm/ibmnas.py +++ b/cinder/volume/drivers/ibm/ibmnas.py @@ -32,9 +32,9 @@ Notes: import os import re -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LI, _LW diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py index ca0cd3d8dce..2a3bc3112bb 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py +++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py @@ -37,9 +37,9 @@ Limitations: import math import time -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/ibm/xiv_ds8k.py b/cinder/volume/drivers/ibm/xiv_ds8k.py index 9a32b92bd5b..19eff017d4f 100644 --- a/cinder/volume/drivers/ibm/xiv_ds8k.py +++ b/cinder/volume/drivers/ibm/xiv_ds8k.py @@ -22,8 +22,8 @@ Unified Volume driver for IBM XIV and DS8K Storage Systems. """ -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import exception from cinder.openstack.common import log as logging diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 459cd8bc690..b3398df9988 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -19,10 +19,10 @@ import math import os import socket -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder.brick import exception as brick_exception from cinder.brick.local_dev import lvm as lvm diff --git a/cinder/volume/drivers/netapp/eseries/iscsi.py b/cinder/volume/drivers/netapp/eseries/iscsi.py index 3fe1574d58c..272054e5f81 100644 --- a/cinder/volume/drivers/netapp/eseries/iscsi.py +++ b/cinder/volume/drivers/netapp/eseries/iscsi.py @@ -19,9 +19,9 @@ import socket import time import uuid -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/options.py b/cinder/volume/drivers/netapp/options.py index d07f32640b6..d8343849bd7 100644 --- a/cinder/volume/drivers/netapp/options.py +++ b/cinder/volume/drivers/netapp/options.py @@ -24,7 +24,7 @@ individual modules. It is recommended to Keep options at a single place to ensure re usability and better management of configuration options. """ -from oslo.config import cfg +from oslo_config import cfg netapp_proxy_opts = [ cfg.StrOpt('netapp_storage_family', diff --git a/cinder/volume/drivers/nexenta/options.py b/cinder/volume/drivers/nexenta/options.py index 7b61e63134a..34ab993e1ce 100644 --- a/cinder/volume/drivers/nexenta/options.py +++ b/cinder/volume/drivers/nexenta/options.py @@ -21,7 +21,7 @@ .. moduleauthor:: Yuriy Taraday """ -from oslo.config import cfg +from oslo_config import cfg NEXENTA_CONNECTION_OPTIONS = [ diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py index b3d327a496d..e6561bffeee 100644 --- a/cinder/volume/drivers/nfs.py +++ b/cinder/volume/drivers/nfs.py @@ -17,9 +17,9 @@ import errno import os import time -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils as putils +from oslo_config import cfg import six from cinder.brick.remotefs import remotefs as remotefs_brick diff --git a/cinder/volume/drivers/nimble.py b/cinder/volume/drivers/nimble.py index ed1f4d0b6c0..d8337746b26 100644 --- a/cinder/volume/drivers/nimble.py +++ b/cinder/volume/drivers/nimble.py @@ -24,8 +24,8 @@ import re import string import urllib2 -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from suds import client from cinder import exception diff --git a/cinder/volume/drivers/prophetstor/options.py b/cinder/volume/drivers/prophetstor/options.py index c9b1f28fe28..c9cc3e99260 100644 --- a/cinder/volume/drivers/prophetstor/options.py +++ b/cinder/volume/drivers/prophetstor/options.py @@ -14,7 +14,7 @@ # under the License. -from oslo.config import cfg +from oslo_config import cfg DPL_OPTS = [ diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 62813fdf72e..62f108e6dca 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -22,10 +22,10 @@ import math import re import uuid -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI, _LW diff --git a/cinder/volume/drivers/quobyte.py b/cinder/volume/drivers/quobyte.py index 62b9e9fffdb..2119a0d78f9 100644 --- a/cinder/volume/drivers/quobyte.py +++ b/cinder/volume/drivers/quobyte.py @@ -17,8 +17,8 @@ import errno import os -from oslo.config import cfg from oslo_concurrency import processutils +from oslo_config import cfg import xattr from cinder import compute diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 7c8260990ca..6a9e16837c3 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -21,9 +21,9 @@ import os import tempfile import urllib -from oslo.config import cfg from oslo.utils import encodeutils from oslo.utils import units +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/remotefs.py b/cinder/volume/drivers/remotefs.py index 77d7755a8be..2314e13656c 100644 --- a/cinder/volume/drivers/remotefs.py +++ b/cinder/volume/drivers/remotefs.py @@ -21,9 +21,9 @@ import re import tempfile import time -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils as putils +from oslo_config import cfg from cinder import compute from cinder import db diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 5f845d0e7c1..0df3575241c 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -49,9 +49,9 @@ if hp3parclient: from hp3parclient import client from hp3parclient import exceptions as hpexceptions -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py index 6387bfa7f7c..2e02b3535f7 100644 --- a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py +++ b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py @@ -15,8 +15,8 @@ # """HP LeftHand SAN ISCSI REST Proxy.""" -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/san/hp/hp_msa_common.py b/cinder/volume/drivers/san/hp/hp_msa_common.py index 12fac1b7117..74d3266e105 100644 --- a/cinder/volume/drivers/san/hp/hp_msa_common.py +++ b/cinder/volume/drivers/san/hp/hp_msa_common.py @@ -19,7 +19,7 @@ Volume driver common utilities for HP MSA Storage array import base64 import uuid -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _LE diff --git a/cinder/volume/drivers/san/san.py b/cinder/volume/drivers/san/san.py index d68cd143843..fa04affd44c 100644 --- a/cinder/volume/drivers/san/san.py +++ b/cinder/volume/drivers/san/san.py @@ -22,9 +22,9 @@ controller on the SAN hardware. We expect to access it over SSH or some API. import random from eventlet import greenthread -from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/san/solaris.py b/cinder/volume/drivers/san/solaris.py index 2cb1d963a23..c32330adb8b 100644 --- a/cinder/volume/drivers/san/solaris.py +++ b/cinder/volume/drivers/san/solaris.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _ diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py index cee941b9420..65bee2f31fc 100644 --- a/cinder/volume/drivers/scality.py +++ b/cinder/volume/drivers/scality.py @@ -21,9 +21,9 @@ import errno import os import urllib2 -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import lockutils +from oslo_config import cfg import six.moves.urllib.parse as urlparse from cinder import exception diff --git a/cinder/volume/drivers/sheepdog.py b/cinder/volume/drivers/sheepdog.py index 3bafdbd3bec..ad8fb858893 100644 --- a/cinder/volume/drivers/sheepdog.py +++ b/cinder/volume/drivers/sheepdog.py @@ -20,9 +20,9 @@ SheepDog Volume Driver. """ import re -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/smbfs.py b/cinder/volume/drivers/smbfs.py index 938ce46bd37..a9fad716db4 100644 --- a/cinder/volume/drivers/smbfs.py +++ b/cinder/volume/drivers/smbfs.py @@ -16,9 +16,9 @@ import os import re -from oslo.config import cfg from oslo.utils import units from oslo_concurrency import processutils as putils +from oslo_config import cfg from cinder.brick.remotefs import remotefs from cinder import exception diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index 01532205df6..a1c0825a9f9 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -20,9 +20,9 @@ import socket import string import time -from oslo.config import cfg from oslo.utils import timeutils from oslo.utils import units +from oslo_config import cfg import requests from six import wraps diff --git a/cinder/volume/drivers/srb.py b/cinder/volume/drivers/srb.py index 20451fc671f..1c70416de38 100644 --- a/cinder/volume/drivers/srb.py +++ b/cinder/volume/drivers/srb.py @@ -24,11 +24,11 @@ import functools import sys import time -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units from oslo_concurrency import lockutils from oslo_concurrency import processutils as putils +from oslo_config import cfg import six from cinder.brick.local_dev import lvm diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py index 36a5116bcfb..ad26973d103 100644 --- a/cinder/volume/drivers/storpool.py +++ b/cinder/volume/drivers/storpool.py @@ -17,9 +17,9 @@ from __future__ import absolute_import -from oslo.config import cfg from oslo.utils import importutils from oslo.utils import units +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/volume/drivers/violin/v6000_common.py b/cinder/volume/drivers/violin/v6000_common.py index 6872659d12f..15863877bba 100644 --- a/cinder/volume/drivers/violin/v6000_common.py +++ b/cinder/volume/drivers/violin/v6000_common.py @@ -31,8 +31,8 @@ driver documentation for more information. import re import time -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LW, _LI diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py index 0fc4614088c..ff79122f8ff 100644 --- a/cinder/volume/drivers/vmware/vmdk.py +++ b/cinder/volume/drivers/vmware/vmdk.py @@ -27,9 +27,9 @@ import distutils.version as dist_version # pylint: disable=E0611 import os import tempfile -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI, _LW diff --git a/cinder/volume/drivers/windows/smbfs.py b/cinder/volume/drivers/windows/smbfs.py index 76fc2410a83..4beffbf6a27 100644 --- a/cinder/volume/drivers/windows/smbfs.py +++ b/cinder/volume/drivers/windows/smbfs.py @@ -18,8 +18,8 @@ import os import re import sys -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from cinder import exception from cinder.i18n import _ diff --git a/cinder/volume/drivers/windows/windows.py b/cinder/volume/drivers/windows/windows.py index 7aec54b896d..5aee1fff010 100644 --- a/cinder/volume/drivers/windows/windows.py +++ b/cinder/volume/drivers/windows/windows.py @@ -21,7 +21,7 @@ This driver requires ISCSI target role installed import os -from oslo.config import cfg +from oslo_config import cfg from cinder.image import image_utils from cinder.openstack.common import fileutils diff --git a/cinder/volume/drivers/windows/windows_utils.py b/cinder/volume/drivers/windows/windows_utils.py index 1cbb143f059..b518ee67dd6 100644 --- a/cinder/volume/drivers/windows/windows_utils.py +++ b/cinder/volume/drivers/windows/windows_utils.py @@ -19,7 +19,7 @@ Utility class for Windows Storage Server 2012 volume related operations. import ctypes import os -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LI diff --git a/cinder/volume/drivers/xio.py b/cinder/volume/drivers/xio.py index 1db7af3f582..48e3c778cd4 100644 --- a/cinder/volume/drivers/xio.py +++ b/cinder/volume/drivers/xio.py @@ -18,7 +18,7 @@ import string import urllib2 from lxml import etree -from oslo.config import cfg +from oslo_config import cfg from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/zadara.py b/cinder/volume/drivers/zadara.py index baa66bee1f1..4b3eeea73de 100644 --- a/cinder/volume/drivers/zadara.py +++ b/cinder/volume/drivers/zadara.py @@ -23,7 +23,7 @@ This driver requires VPSA with API ver.13.07 or higher. import httplib from lxml import etree -from oslo.config import cfg +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LW diff --git a/cinder/volume/drivers/zfssa/zfssaiscsi.py b/cinder/volume/drivers/zfssa/zfssaiscsi.py index 47334468ae8..48e6dbb99c4 100644 --- a/cinder/volume/drivers/zfssa/zfssaiscsi.py +++ b/cinder/volume/drivers/zfssa/zfssaiscsi.py @@ -17,8 +17,8 @@ ZFS Storage Appliance Cinder Volume Driver import ast import base64 -from oslo.config import cfg from oslo.utils import units +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LW diff --git a/cinder/volume/drivers/zfssa/zfssanfs.py b/cinder/volume/drivers/zfssa/zfssanfs.py index 0c8266b9f4c..58637976da4 100644 --- a/cinder/volume/drivers/zfssa/zfssanfs.py +++ b/cinder/volume/drivers/zfssa/zfssanfs.py @@ -18,9 +18,9 @@ import base64 from datetime import datetime import errno -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import units +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/flows/api/create_volume.py b/cinder/volume/flows/api/create_volume.py index 73d5d5132bf..6a72a30061a 100644 --- a/cinder/volume/flows/api/create_volume.py +++ b/cinder/volume/flows/api/create_volume.py @@ -11,9 +11,9 @@ # under the License. -from oslo.config import cfg from oslo.utils import timeutils from oslo.utils import units +from oslo_config import cfg import taskflow.engines from taskflow.patterns import linear_flow from taskflow.utils import misc diff --git a/cinder/volume/flows/manager/create_volume.py b/cinder/volume/flows/manager/create_volume.py index 9037cd95d58..894dad02a4d 100644 --- a/cinder/volume/flows/manager/create_volume.py +++ b/cinder/volume/flows/manager/create_volume.py @@ -12,9 +12,9 @@ import traceback -from oslo.config import cfg from oslo.utils import timeutils from oslo_concurrency import processutils +from oslo_config import cfg import taskflow.engines from taskflow.patterns import linear_flow from taskflow.utils import misc diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index e28ba055d14..4ea9e2c917a 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -39,12 +39,12 @@ intact. import time -from oslo.config import cfg from oslo import messaging from oslo.serialization import jsonutils from oslo.utils import excutils from oslo.utils import importutils from oslo.utils import timeutils +from oslo_config import cfg from osprofiler import profiler from cinder import compute diff --git a/cinder/volume/qos_specs.py b/cinder/volume/qos_specs.py index 020e215c85d..eeca2a1599e 100644 --- a/cinder/volume/qos_specs.py +++ b/cinder/volume/qos_specs.py @@ -16,7 +16,7 @@ """The QoS Specs Implementation""" -from oslo.config import cfg +from oslo_config import cfg from oslo_db import exception as db_exc from cinder import context diff --git a/cinder/volume/rpcapi.py b/cinder/volume/rpcapi.py index 544fc2a54f3..99fe88208bb 100644 --- a/cinder/volume/rpcapi.py +++ b/cinder/volume/rpcapi.py @@ -16,9 +16,9 @@ Client side of the volume RPC API. """ -from oslo.config import cfg from oslo import messaging from oslo.serialization import jsonutils +from oslo_config import cfg from cinder import rpc from cinder.volume import utils diff --git a/cinder/volume/targets/driver.py b/cinder/volume/targets/driver.py index 056288061cd..e120768d779 100644 --- a/cinder/volume/targets/driver.py +++ b/cinder/volume/targets/driver.py @@ -12,7 +12,7 @@ import abc -from oslo.config import cfg +from oslo_config import cfg import six CONF = cfg.CONF diff --git a/cinder/volume/utils.py b/cinder/volume/utils.py index 89aa147b8c9..71633169523 100644 --- a/cinder/volume/utils.py +++ b/cinder/volume/utils.py @@ -18,11 +18,11 @@ import math from Crypto.Random import random -from oslo.config import cfg from oslo.utils import strutils from oslo.utils import timeutils from oslo.utils import units from oslo_concurrency import processutils +from oslo_config import cfg from cinder.brick.local_dev import lvm as brick_lvm from cinder import exception diff --git a/cinder/volume/volume_types.py b/cinder/volume/volume_types.py index 19959681fc2..d4ed6896273 100644 --- a/cinder/volume/volume_types.py +++ b/cinder/volume/volume_types.py @@ -20,7 +20,7 @@ """Built-in volume type properties.""" -from oslo.config import cfg +from oslo_config import cfg from oslo_db import exception as db_exc import six diff --git a/cinder/wsgi.py b/cinder/wsgi.py index b575161826f..94710c66fbe 100644 --- a/cinder/wsgi.py +++ b/cinder/wsgi.py @@ -29,9 +29,9 @@ import time import eventlet import eventlet.wsgi import greenlet -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import netutils +from oslo_config import cfg from paste import deploy import routes.middleware import webob.dec diff --git a/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py b/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py index 1461ea061c2..abce738a527 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from oslo.config import cfg +from oslo_config import cfg from cinder.openstack.common import log as logging from cinder.volume.configuration import Configuration diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py index f865666757d..fb737018fac 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py @@ -30,10 +30,10 @@ add_connection and delete_connection interfaces. """ -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import importutils from oslo_concurrency import lockutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py b/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py index 5bd01d1b901..51276454aeb 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from oslo.config import cfg +from oslo_config import cfg from cinder.volume.configuration import Configuration diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py index c8bc494c381..f983729330d 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py @@ -27,10 +27,10 @@ add_connection and delete_connection interfaces. :zone_name_prefix: Used by: class: 'FCZoneDriver'. Defaults to 'openstack' """ -from oslo.config import cfg from oslo.utils import excutils from oslo.utils import importutils from oslo_concurrency import lockutils +from oslo_config import cfg import six from cinder import exception diff --git a/cinder/zonemanager/fc_zone_manager.py b/cinder/zonemanager/fc_zone_manager.py index 46400a1ee41..75037ce8960 100644 --- a/cinder/zonemanager/fc_zone_manager.py +++ b/cinder/zonemanager/fc_zone_manager.py @@ -31,8 +31,8 @@ detach operation. """ -from oslo.config import cfg from oslo.utils import importutils +from oslo_config import cfg from cinder import exception from cinder.i18n import _, _LI