From: Jay S. Bryant Date: Fri, 16 Jan 2015 22:54:27 +0000 (-0600) Subject: Move oslo.utils to oslo_utils namespace X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b6ec77e6d4f27a5e995a92dc6b2efe0bfc9f49e9;p=openstack-build%2Fcinder-build.git Move oslo.utils to oslo_utils namespace This is the fourth 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.utils sneak back in. Change-Id: I19c331a9b54c5f42c278577ecc59fe1b65e61af0 --- diff --git a/cinder/api/contrib/admin_actions.py b/cinder/api/contrib/admin_actions.py index 964af7b38..0c1b9e89e 100644 --- a/cinder/api/contrib/admin_actions.py +++ b/cinder/api/contrib/admin_actions.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import strutils +from oslo_utils import strutils import webob from webob import exc diff --git a/cinder/api/contrib/hosts.py b/cinder/api/contrib/hosts.py index 4f79248c8..1940ab4d3 100644 --- a/cinder/api/contrib/hosts.py +++ b/cinder/api/contrib/hosts.py @@ -17,8 +17,8 @@ from xml.parsers import expat -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils import webob.exc from cinder.api import extensions diff --git a/cinder/api/contrib/qos_specs_manage.py b/cinder/api/contrib/qos_specs_manage.py index 062d1f6d6..03481ed35 100644 --- a/cinder/api/contrib/qos_specs_manage.py +++ b/cinder/api/contrib/qos_specs_manage.py @@ -15,7 +15,7 @@ """The QoS specs extension""" -from oslo.utils import strutils +from oslo_utils import strutils import six import webob diff --git a/cinder/api/contrib/quotas.py b/cinder/api/contrib/quotas.py index 121224fef..8ef8ee2e4 100644 --- a/cinder/api/contrib/quotas.py +++ b/cinder/api/contrib/quotas.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import strutils +from oslo_utils import strutils import webob from cinder.api import extensions diff --git a/cinder/api/contrib/services.py b/cinder/api/contrib/services.py index 369b85e0b..c0971bec8 100644 --- a/cinder/api/contrib/services.py +++ b/cinder/api/contrib/services.py @@ -14,8 +14,8 @@ # under the License. -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils import webob.exc from cinder.api import extensions diff --git a/cinder/api/contrib/volume_actions.py b/cinder/api/contrib/volume_actions.py index fd4bc1f8b..fa018923c 100644 --- a/cinder/api/contrib/volume_actions.py +++ b/cinder/api/contrib/volume_actions.py @@ -14,7 +14,7 @@ from oslo import messaging -from oslo.utils import strutils +from oslo_utils import strutils import webob from cinder.api import extensions diff --git a/cinder/api/extensions.py b/cinder/api/extensions.py index f8733f66d..579bdf31a 100644 --- a/cinder/api/extensions.py +++ b/cinder/api/extensions.py @@ -16,8 +16,8 @@ import os -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import importutils import webob.dec import webob.exc diff --git a/cinder/api/openstack/wsgi.py b/cinder/api/openstack/wsgi.py index 648a88407..6b3a1ee2f 100644 --- a/cinder/api/openstack/wsgi.py +++ b/cinder/api/openstack/wsgi.py @@ -22,7 +22,7 @@ from xml.parsers import expat from lxml import etree from oslo.serialization import jsonutils -from oslo.utils import excutils +from oslo_utils import excutils import six import webob diff --git a/cinder/api/v1/limits.py b/cinder/api/v1/limits.py index 0f44c7b7b..7793b20ac 100644 --- a/cinder/api/v1/limits.py +++ b/cinder/api/v1/limits.py @@ -25,7 +25,7 @@ import re import time from oslo.serialization import jsonutils -from oslo.utils import importutils +from oslo_utils import importutils import webob.dec import webob.exc diff --git a/cinder/api/v1/snapshots.py b/cinder/api/v1/snapshots.py index 016d1e447..59eb85607 100644 --- a/cinder/api/v1/snapshots.py +++ b/cinder/api/v1/snapshots.py @@ -15,7 +15,7 @@ """The volumes snapshots api.""" -from oslo.utils import strutils +from oslo_utils import strutils import webob from webob import exc diff --git a/cinder/api/v2/limits.py b/cinder/api/v2/limits.py index e89393d90..6df83b983 100644 --- a/cinder/api/v2/limits.py +++ b/cinder/api/v2/limits.py @@ -25,7 +25,7 @@ import re import time from oslo.serialization import jsonutils -from oslo.utils import importutils +from oslo_utils import importutils import webob.dec import webob.exc diff --git a/cinder/api/v2/snapshots.py b/cinder/api/v2/snapshots.py index 64d1d2843..27060c308 100644 --- a/cinder/api/v2/snapshots.py +++ b/cinder/api/v2/snapshots.py @@ -15,7 +15,7 @@ """The volumes snapshots api.""" -from oslo.utils import strutils +from oslo_utils import strutils import webob from webob import exc diff --git a/cinder/api/v2/types.py b/cinder/api/v2/types.py index 5710df97a..6707ccbab 100644 --- a/cinder/api/v2/types.py +++ b/cinder/api/v2/types.py @@ -15,7 +15,7 @@ """The volume type & volume types extra specs extension.""" -from oslo.utils import strutils +from oslo_utils import strutils from webob import exc from cinder.api.openstack import wsgi diff --git a/cinder/api/views/limits.py b/cinder/api/views/limits.py index b676f10ef..d8c22af05 100644 --- a/cinder/api/views/limits.py +++ b/cinder/api/views/limits.py @@ -15,7 +15,7 @@ import datetime -from oslo.utils import timeutils +from oslo_utils import timeutils class ViewBuilder(object): diff --git a/cinder/backup/__init__.py b/cinder/backup/__init__.py index 7482eb458..d39c6159f 100644 --- a/cinder/backup/__init__.py +++ b/cinder/backup/__init__.py @@ -16,7 +16,7 @@ # Importing full names to not pollute the namespace and cause possible # collisions with use of 'from cinder.backup import ' elsewhere. -from oslo.utils import importutils +from oslo_utils import importutils from cinder.common import config diff --git a/cinder/backup/api.py b/cinder/backup/api.py index 1b3cee173..89a1f3652 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils from cinder.backup import rpcapi as backup_rpcapi from cinder import context diff --git a/cinder/backup/drivers/ceph.py b/cinder/backup/drivers/ceph.py index 57887eeb1..6c780c6ce 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.utils import encodeutils -from oslo.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import encodeutils +from oslo_utils import excutils +from oslo_utils import units 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 50139c3e8..25ac7149a 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.utils import excutils -from oslo.utils import timeutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import timeutils +from oslo_utils import units import six from swiftclient import client as swift diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index a766eeb28..89c140823 100644 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -34,9 +34,9 @@ Volume backups can be created, restored, deleted and listed. """ from oslo import messaging -from oslo.utils import excutils -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import importutils from cinder.backup import driver from cinder.backup import rpcapi as backup_rpcapi diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 9d2cdf7ff..9776ddf2e 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -22,8 +22,8 @@ import math import re import time -from oslo.utils import excutils from oslo_concurrency import processutils as putils +from oslo_utils import excutils from cinder.brick import exception from cinder.brick import executor diff --git a/cinder/compute/__init__.py b/cinder/compute/__init__.py index b3cdf137a..21a94f826 100644 --- a/cinder/compute/__init__.py +++ b/cinder/compute/__init__.py @@ -14,7 +14,7 @@ # under the License. import oslo.config.cfg -from oslo.utils import importutils +from oslo_utils import importutils _compute_opts = [ diff --git a/cinder/consistencygroup/__init__.py b/cinder/consistencygroup/__init__.py index efa3bc0e1..29aa02d00 100644 --- a/cinder/consistencygroup/__init__.py +++ b/cinder/consistencygroup/__init__.py @@ -16,7 +16,7 @@ # Importing full names to not pollute the namespace and cause possible # collisions with use of 'from cinder.transfer import ' elsewhere. -from oslo.utils import importutils +from oslo_utils import importutils from cinder.common import config diff --git a/cinder/consistencygroup/api.py b/cinder/consistencygroup/api.py index 6c225f05d..9c90c0a38 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.utils import excutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import timeutils from cinder.db import base from cinder import exception diff --git a/cinder/context.py b/cinder/context.py index 81602b87a..e9879d865 100644 --- a/cinder/context.py +++ b/cinder/context.py @@ -19,8 +19,8 @@ import copy -from oslo.utils import timeutils from oslo_context import context +from oslo_utils import timeutils from cinder.i18n import _ from cinder.openstack.common import local diff --git a/cinder/db/base.py b/cinder/db/base.py index e35943af2..69365c6df 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils db_driver_opt = cfg.StrOpt('db_driver', diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 8034ee31b..172cdcf20 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -26,11 +26,11 @@ import time import uuid import warnings -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 +from oslo_utils import timeutils import osprofiler.sqlalchemy import six import sqlalchemy diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index d053820a1..82d423a58 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -19,9 +19,9 @@ SQLAlchemy models for cinder data. """ -from oslo.utils import timeutils from oslo_config import cfg from oslo_db.sqlalchemy import models +from oslo_utils import timeutils from sqlalchemy import Column, Integer, String, Text, schema from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import ForeignKey, DateTime, Boolean diff --git a/cinder/hacking/checks.py b/cinder/hacking/checks.py index 29efadd9a..b7965ec5b 100644 --- a/cinder/hacking/checks.py +++ b/cinder/hacking/checks.py @@ -44,7 +44,7 @@ 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" - "|config)") + "|config|utils)") def no_vi_headers(physical_line, line_number, lines): diff --git a/cinder/image/glance.py b/cinder/image/glance.py index fb936eb9d..1f85429f3 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -28,8 +28,8 @@ import time import glanceclient.exc from oslo.serialization import jsonutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils 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 4e24778f9..ff0570d05 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.utils import timeutils -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import timeutils +from oslo_utils import units from cinder import exception from cinder.i18n import _ diff --git a/cinder/keymgr/__init__.py b/cinder/keymgr/__init__.py index 6c144451d..846e74691 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils keymgr_opts = [ cfg.StrOpt('api_class', diff --git a/cinder/keymgr/barbican.py b/cinder/keymgr/barbican.py index 09ec4b721..34c6d79bc 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/quota.py b/cinder/quota.py index 570b6bc4f..d8ae0ad48 100644 --- a/cinder/quota.py +++ b/cinder/quota.py @@ -19,9 +19,9 @@ import datetime -from oslo.utils import importutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import timeutils from cinder import context from cinder import db diff --git a/cinder/replication/__init__.py b/cinder/replication/__init__.py index aa36e07c3..4b8c6cf5b 100644 --- a/cinder/replication/__init__.py +++ b/cinder/replication/__init__.py @@ -13,8 +13,8 @@ # under the License. -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import importutils CONF = cfg.CONF diff --git a/cinder/scheduler/driver.py b/cinder/scheduler/driver.py index 158d7a241..c27fef152 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.utils import importutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import timeutils from cinder import db from cinder.i18n import _ diff --git a/cinder/scheduler/flows/create_volume.py b/cinder/scheduler/flows/create_volume.py index b6f70305a..4e55d4d1a 100644 --- a/cinder/scheduler/flows/create_volume.py +++ b/cinder/scheduler/flows/create_volume.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import excutils +from oslo_utils import excutils import taskflow.engines from taskflow.patterns import linear_flow diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index 47828063c..582a954dc 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.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils from cinder import db from cinder import exception diff --git a/cinder/scheduler/manager.py b/cinder/scheduler/manager.py index ee69741d5..0790bcdbf 100644 --- a/cinder/scheduler/manager.py +++ b/cinder/scheduler/manager.py @@ -20,9 +20,9 @@ Scheduler Service """ from oslo import messaging -from oslo.utils import excutils -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import importutils from cinder import context from cinder import db diff --git a/cinder/scheduler/scheduler_options.py b/cinder/scheduler/scheduler_options.py index 965f1f42c..a70218058 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.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils from cinder.i18n import _LE from cinder.openstack.common import log as logging diff --git a/cinder/service.py b/cinder/service.py index 347309583..5918bafa2 100644 --- a/cinder/service.py +++ b/cinder/service.py @@ -23,10 +23,10 @@ import os import random 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 +from oslo_utils import importutils import osprofiler.notifier from osprofiler import profiler import osprofiler.web diff --git a/cinder/test.py b/cinder/test.py index 429c1f2a5..a502c08a9 100644 --- a/cinder/test.py +++ b/cinder/test.py @@ -30,11 +30,11 @@ import fixtures import mock import mox 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 +from oslo_utils import strutils +from oslo_utils import timeutils 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 69bf92f31..a037bcc4a 100644 --- a/cinder/tests/api/contrib/test_admin_actions.py +++ b/cinder/tests/api/contrib/test_admin_actions.py @@ -14,10 +14,10 @@ import ast import fixtures 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 +from oslo_utils import timeutils import webob from webob import exc diff --git a/cinder/tests/api/contrib/test_availability_zones.py b/cinder/tests/api/contrib/test_availability_zones.py index 06ecd88f4..a46839911 100644 --- a/cinder/tests/api/contrib/test_availability_zones.py +++ b/cinder/tests/api/contrib/test_availability_zones.py @@ -16,7 +16,7 @@ import datetime from lxml import etree -from oslo.utils import timeutils +from oslo_utils import timeutils import cinder.api.contrib.availability_zones import cinder.context diff --git a/cinder/tests/api/contrib/test_backups.py b/cinder/tests/api/contrib/test_backups.py index b6c3a89bb..3bf5f22a7 100644 --- a/cinder/tests/api/contrib/test_backups.py +++ b/cinder/tests/api/contrib/test_backups.py @@ -21,7 +21,7 @@ import json from xml.dom import minidom import mock -from oslo.utils import timeutils +from oslo_utils import timeutils import webob # needed for stubs to work diff --git a/cinder/tests/api/contrib/test_hosts.py b/cinder/tests/api/contrib/test_hosts.py index 8e5788848..d0208971a 100644 --- a/cinder/tests/api/contrib/test_hosts.py +++ b/cinder/tests/api/contrib/test_hosts.py @@ -16,7 +16,7 @@ import datetime from lxml import etree -from oslo.utils import timeutils +from oslo_utils import timeutils import webob.exc from cinder.api.contrib import hosts as os_hosts diff --git a/cinder/tests/api/contrib/test_services.py b/cinder/tests/api/contrib/test_services.py index cf26ebd96..273af9471 100644 --- a/cinder/tests/api/contrib/test_services.py +++ b/cinder/tests/api/contrib/test_services.py @@ -16,7 +16,7 @@ from datetime import datetime -from oslo.utils import timeutils +from oslo_utils import timeutils import webob.exc from cinder.api.contrib import services diff --git a/cinder/tests/api/fakes.py b/cinder/tests/api/fakes.py index 0242a50ce..fd6aa0930 100644 --- a/cinder/tests/api/fakes.py +++ b/cinder/tests/api/fakes.py @@ -15,7 +15,7 @@ import uuid -from oslo.utils import timeutils +from oslo_utils import timeutils import routes import webob import webob.dec diff --git a/cinder/tests/api/v1/test_types.py b/cinder/tests/api/v1/test_types.py index 13c8836d5..290f279e4 100644 --- a/cinder/tests/api/v1/test_types.py +++ b/cinder/tests/api/v1/test_types.py @@ -16,7 +16,7 @@ import uuid from lxml import etree -from oslo.utils import timeutils +from oslo_utils import timeutils import webob from cinder.api.v1 import types diff --git a/cinder/tests/api/v2/test_types.py b/cinder/tests/api/v2/test_types.py index 66bd9cedc..c2877dd2c 100644 --- a/cinder/tests/api/v2/test_types.py +++ b/cinder/tests/api/v2/test_types.py @@ -16,7 +16,7 @@ import uuid from lxml import etree -from oslo.utils import timeutils +from oslo_utils import timeutils import six import webob diff --git a/cinder/tests/integrated/api/client.py b/cinder/tests/integrated/api/client.py index 1c16306c9..95e419677 100644 --- a/cinder/tests/integrated/api/client.py +++ b/cinder/tests/integrated/api/client.py @@ -13,7 +13,7 @@ # under the License. from oslo.serialization import jsonutils -from oslo.utils import netutils +from oslo_utils import netutils import requests import six.moves.urllib.parse as urlparse diff --git a/cinder/tests/scheduler/fakes.py b/cinder/tests/scheduler/fakes.py index e5fa3a32e..35e5337c7 100644 --- a/cinder/tests/scheduler/fakes.py +++ b/cinder/tests/scheduler/fakes.py @@ -16,7 +16,7 @@ Fakes For Scheduler tests. """ -from oslo.utils import timeutils +from oslo_utils import timeutils from cinder.openstack.common import uuidutils from cinder.scheduler import filter_scheduler diff --git a/cinder/tests/scheduler/test_host_manager.py b/cinder/tests/scheduler/test_host_manager.py index 881630f37..eea6bcc8c 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.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils from cinder import exception from cinder.openstack.common.scheduler import filters @@ -84,7 +84,7 @@ class HostManagerTestCase(test.TestCase): self.assertEqual(expected, mock_func.call_args_list) self.assertEqual(set(result), set(self.fake_hosts)) - @mock.patch('oslo.utils.timeutils.utcnow') + @mock.patch('oslo_utils.timeutils.utcnow') def test_update_service_capabilities(self, _mock_utcnow): service_states = self.host_manager.service_states self.assertDictMatch(service_states, {}) @@ -118,7 +118,7 @@ class HostManagerTestCase(test.TestCase): @mock.patch('cinder.db.service_get_all_by_topic') @mock.patch('cinder.utils.service_is_up') - @mock.patch('oslo.utils.timeutils.utcnow') + @mock.patch('oslo_utils.timeutils.utcnow') def test_update_and_get_pools(self, _mock_utcnow, _mock_service_is_up, _mock_service_get_all_by_topic): diff --git a/cinder/tests/scheduler/test_scheduler.py b/cinder/tests/scheduler/test_scheduler.py index 7351c11bd..bdaf35eb3 100644 --- a/cinder/tests/scheduler/test_scheduler.py +++ b/cinder/tests/scheduler/test_scheduler.py @@ -278,7 +278,7 @@ class SchedulerDriverModuleTestCase(test.TestCase): self.context = context.RequestContext('fake_user', 'fake_project') @mock.patch('cinder.db.volume_update') - @mock.patch('oslo.utils.timeutils.utcnow') + @mock.patch('oslo_utils.timeutils.utcnow') def test_volume_host_update_db(self, _mock_utcnow, _mock_vol_update): _mock_utcnow.return_value = 'fake-now' driver.volume_update_db(self.context, 31337, 'fake_host') diff --git a/cinder/tests/targets/test_base_iscsi_driver.py b/cinder/tests/targets/test_base_iscsi_driver.py index 3bcb3cad6..14c80db93 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.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils from cinder import exception from cinder import test diff --git a/cinder/tests/targets/test_tgt_driver.py b/cinder/tests/targets/test_tgt_driver.py index fec0bf428..fb88afa90 100644 --- a/cinder/tests/targets/test_tgt_driver.py +++ b/cinder/tests/targets/test_tgt_driver.py @@ -14,8 +14,8 @@ import os import tempfile import mock -from oslo.utils import timeutils from oslo_concurrency import processutils as putils +from oslo_utils import timeutils from cinder import context from cinder import test diff --git a/cinder/tests/test_backup.py b/cinder/tests/test_backup.py index 847384d5d..d82e81cc3 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.utils import importutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import timeutils from cinder.backup import manager from cinder import context diff --git a/cinder/tests/test_coraid.py b/cinder/tests/test_coraid.py index f1206b591..a55a339f7 100644 --- a/cinder/tests/test_coraid.py +++ b/cinder/tests/test_coraid.py @@ -19,8 +19,8 @@ import math import mock import mox from oslo.serialization import jsonutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import units from cinder.brick.initiator import connector from cinder import exception diff --git a/cinder/tests/test_drbdmanagedrv.py b/cinder/tests/test_drbdmanagedrv.py index 3eb033e09..c87957dc5 100644 --- a/cinder/tests/test_drbdmanagedrv.py +++ b/cinder/tests/test_drbdmanagedrv.py @@ -16,8 +16,8 @@ import collections import mock -from oslo.utils import importutils -from oslo.utils import timeutils +from oslo_utils import importutils +from oslo_utils import timeutils from cinder import context from cinder.openstack.common import log as logging diff --git a/cinder/tests/test_fusionio_ioControl.py b/cinder/tests/test_fusionio_ioControl.py index 1455f991f..cf00ea762 100644 --- a/cinder/tests/test_fusionio_ioControl.py +++ b/cinder/tests/test_fusionio_ioControl.py @@ -17,8 +17,8 @@ import copy import json import mock -from oslo.utils import timeutils -from oslo.utils import units +from oslo_utils import timeutils +from oslo_utils import units import requests from cinder import context diff --git a/cinder/tests/test_glusterfs.py b/cinder/tests/test_glusterfs.py index fc2feba85..4e70bd4e8 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.utils import units from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import units from cinder import brick from cinder import compute diff --git a/cinder/tests/test_gpfs.py b/cinder/tests/test_gpfs.py index 1535f0c6c..cea131316 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.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_hacking.py b/cinder/tests/test_hacking.py index 19068c100..5dfb27b2f 100644 --- a/cinder/tests/test_hacking.py +++ b/cinder/tests/test_hacking.py @@ -151,3 +151,7 @@ class HackingTestCase(test.TestCase): "from oslo.config import foo")))) self.assertEqual(0, len(list(checks.check_oslo_namespace_imports( "from oslo_config import bar")))) + self.assertEqual(1, len(list(checks.check_oslo_namespace_imports( + "from oslo.utils import foo")))) + self.assertEqual(0, len(list(checks.check_oslo_namespace_imports( + "from oslo_utils import bar")))) diff --git a/cinder/tests/test_hp3par.py b/cinder/tests/test_hp3par.py index 77878c9ba..911025950 100644 --- a/cinder/tests/test_hp3par.py +++ b/cinder/tests/test_hp3par.py @@ -19,8 +19,8 @@ import mock import ast -from oslo.utils import units from oslo_config import cfg +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_hplefthand.py b/cinder/tests/test_hplefthand.py index 564dbdeb4..8bcfdc201 100644 --- a/cinder/tests/test_hplefthand.py +++ b/cinder/tests/test_hplefthand.py @@ -15,7 +15,7 @@ # """Unit tests for OpenStack Cinder volume drivers.""" import mock -from oslo.utils import units +from oslo_utils import units 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 5a5df04a5..98d6b308e 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils from cinder import context from cinder import test diff --git a/cinder/tests/test_huaweistorac.py b/cinder/tests/test_huaweistorac.py index 6bb52dd66..8175bbb76 100644 --- a/cinder/tests/test_huaweistorac.py +++ b/cinder/tests/test_huaweistorac.py @@ -23,7 +23,7 @@ import re import tempfile from xml.dom.minidom import Document -from oslo.utils import units +from oslo_utils import units from cinder.brick.initiator import connector as brick_connector from cinder import exception diff --git a/cinder/tests/test_ibm_flashsystem.py b/cinder/tests/test_ibm_flashsystem.py index 2a453e6a6..3060f451f 100644 --- a/cinder/tests/test_ibm_flashsystem.py +++ b/cinder/tests/test_ibm_flashsystem.py @@ -20,9 +20,9 @@ Tests for the IBM FlashSystem volume driver. """ import mock -from oslo.utils import excutils -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import excutils +from oslo_utils import units import six import random diff --git a/cinder/tests/test_ibmnas.py b/cinder/tests/test_ibmnas.py index 23157d8e2..114dd857d 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.utils import units from oslo_config import cfg +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_nexenta.py b/cinder/tests/test_nexenta.py index 0192db102..7d39c79ce 100644 --- a/cinder/tests/test_nexenta.py +++ b/cinder/tests/test_nexenta.py @@ -21,7 +21,7 @@ import base64 import urllib2 import mox as mox_lib -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder import db diff --git a/cinder/tests/test_nfs.py b/cinder/tests/test_nfs.py index 46df23fbf..45851e0d2 100644 --- a/cinder/tests/test_nfs.py +++ b/cinder/tests/test_nfs.py @@ -23,7 +23,7 @@ import mox as mox_lib from mox import IgnoreArg from mox import IsA from mox import stubout -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_prophetstor_dpl.py b/cinder/tests/test_prophetstor_dpl.py index 657fcf31f..3780949c0 100644 --- a/cinder/tests/test_prophetstor_dpl.py +++ b/cinder/tests/test_prophetstor_dpl.py @@ -18,7 +18,7 @@ import httplib import re import mock -from oslo.utils import units +from oslo_utils import units from cinder import exception from cinder import test diff --git a/cinder/tests/test_pure.py b/cinder/tests/test_pure.py index 50492589c..d0139a047 100644 --- a/cinder/tests/test_pure.py +++ b/cinder/tests/test_pure.py @@ -14,8 +14,8 @@ # under the License. import mock -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import units from cinder import exception from cinder import test diff --git a/cinder/tests/test_quobyte.py b/cinder/tests/test_quobyte.py index 23ff13ef3..2bce9aea4 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.utils import units from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_quota.py b/cinder/tests/test_quota.py index 014343862..617b94c27 100644 --- a/cinder/tests/test_quota.py +++ b/cinder/tests/test_quota.py @@ -19,8 +19,8 @@ import datetime import mock -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import timeutils from cinder import backup from cinder import context diff --git a/cinder/tests/test_rbd.py b/cinder/tests/test_rbd.py index 2dabe8c4a..8af04ea2f 100644 --- a/cinder/tests/test_rbd.py +++ b/cinder/tests/test_rbd.py @@ -21,8 +21,8 @@ import os import tempfile import mock -from oslo.utils import timeutils -from oslo.utils import units +from oslo_utils import timeutils +from oslo_utils import units from cinder import db from cinder import exception diff --git a/cinder/tests/test_replication.py b/cinder/tests/test_replication.py index 59f22e703..ef4e15d3a 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils from cinder import context from cinder import db diff --git a/cinder/tests/test_scality.py b/cinder/tests/test_scality.py index 657ff9aac..bb63d1261 100644 --- a/cinder/tests/test_scality.py +++ b/cinder/tests/test_scality.py @@ -22,7 +22,7 @@ import shutil import tempfile import mox as mox_lib -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_sheepdog.py b/cinder/tests/test_sheepdog.py index 97fb76804..38ad4428b 100644 --- a/cinder/tests/test_sheepdog.py +++ b/cinder/tests/test_sheepdog.py @@ -18,8 +18,8 @@ import contextlib import mock -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import units from cinder.image import image_utils from cinder import test diff --git a/cinder/tests/test_solidfire.py b/cinder/tests/test_solidfire.py index 7d45609cb..d86b51fc3 100644 --- a/cinder/tests/test_solidfire.py +++ b/cinder/tests/test_solidfire.py @@ -18,8 +18,8 @@ import datetime import mock import mox -from oslo.utils import timeutils -from oslo.utils import units +from oslo_utils import timeutils +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_srb.py b/cinder/tests/test_srb.py index b084c2680..e3f02c118 100644 --- a/cinder/tests/test_srb.py +++ b/cinder/tests/test_srb.py @@ -17,8 +17,8 @@ Unit tests for the Scality Rest Block Volume Driver. """ import mock -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_storpool.py b/cinder/tests/test_storpool.py index 6a6fec796..36a059823 100644 --- a/cinder/tests/test_storpool.py +++ b/cinder/tests/test_storpool.py @@ -18,7 +18,7 @@ import re import sys import mock -from oslo.utils import units +from oslo_utils import units fakeStorPool = mock.Mock() diff --git a/cinder/tests/test_storwize_svc.py b/cinder/tests/test_storwize_svc.py index 9272d9427..b8bcfe50e 100644 --- a/cinder/tests/test_storwize_svc.py +++ b/cinder/tests/test_storwize_svc.py @@ -23,10 +23,10 @@ import re import time import mock -from oslo.utils import excutils -from oslo.utils import importutils -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import excutils +from oslo_utils import importutils +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/tests/test_utils.py b/cinder/tests/test_utils.py index 4ee35a433..1eeec4854 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.utils import timeutils from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import timeutils import paramiko import six @@ -353,7 +353,7 @@ class GenericUtilsTestCase(test.TestCase): utils.read_file_as_root, test_filepath) - @mock.patch('oslo.utils.timeutils.utcnow') + @mock.patch('oslo_utils.timeutils.utcnow') def test_service_is_up(self, mock_utcnow): fts_func = datetime.datetime.fromtimestamp fake_now = 1000 @@ -893,7 +893,7 @@ class AuditPeriodTest(test.TestCase): month=2, year=2012)) - @mock.patch('oslo.utils.timeutils.utcnow', + @mock.patch('oslo_utils.timeutils.utcnow', return_value=datetime.datetime(day=1, month=1, year=2012)) @@ -902,7 +902,7 @@ class AuditPeriodTest(test.TestCase): self.assertEqual(datetime.datetime(day=1, month=11, year=2011), begin) self.assertEqual(datetime.datetime(day=1, month=12, year=2011), end) - @mock.patch('oslo.utils.timeutils.utcnow', + @mock.patch('oslo_utils.timeutils.utcnow', return_value=datetime.datetime(day=2, month=1, year=2012)) diff --git a/cinder/tests/test_v6000_fcp.py b/cinder/tests/test_v6000_fcp.py index 34d509204..a28ac7ae0 100644 --- a/cinder/tests/test_v6000_fcp.py +++ b/cinder/tests/test_v6000_fcp.py @@ -18,7 +18,7 @@ Tests for Violin Memory 6000 Series All-Flash Array Fibrechannel Driver """ import mock -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder.db.sqlalchemy import models diff --git a/cinder/tests/test_v6000_iscsi.py b/cinder/tests/test_v6000_iscsi.py index 2c9f8e750..c87df966f 100644 --- a/cinder/tests/test_v6000_iscsi.py +++ b/cinder/tests/test_v6000_iscsi.py @@ -18,7 +18,7 @@ Tests for Violin Memory 6000 Series All-Flash Array iSCSI driver """ import mock -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder.db.sqlalchemy import models diff --git a/cinder/tests/test_vmware_datastore.py b/cinder/tests/test_vmware_datastore.py index a118a52d0..fe7077939 100644 --- a/cinder/tests/test_vmware_datastore.py +++ b/cinder/tests/test_vmware_datastore.py @@ -18,7 +18,7 @@ Unit tests for datastore module. """ import mock -from oslo.utils import units +from oslo_utils import units from cinder import test from cinder.volume.drivers.vmware import datastore as ds_sel diff --git a/cinder/tests/test_vmware_vmdk.py b/cinder/tests/test_vmware_vmdk.py index 6140fc25f..942355e7f 100644 --- a/cinder/tests/test_vmware_vmdk.py +++ b/cinder/tests/test_vmware_vmdk.py @@ -22,7 +22,7 @@ import os import mock import mox -from oslo.utils import units +from oslo_utils import units from cinder import exception from cinder.image import glance diff --git a/cinder/tests/test_vmware_volumeops.py b/cinder/tests/test_vmware_volumeops.py index 9644413a7..d2d91d37a 100644 --- a/cinder/tests/test_vmware_volumeops.py +++ b/cinder/tests/test_vmware_volumeops.py @@ -18,7 +18,7 @@ Test suite for VMware VMDK driver volumeops module. """ import mock -from oslo.utils import units +from oslo_utils import units from cinder import test from cinder.volume.drivers.vmware import error_util diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 8778129ea..120b7a34c 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -30,10 +30,10 @@ import eventlet import mock import mox 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 oslo_utils import importutils +from oslo_utils import timeutils +from oslo_utils import units from stevedore import extension from taskflow.engines.action_engine import engine diff --git a/cinder/tests/test_zfssa.py b/cinder/tests/test_zfssa.py index b0fdcf8f4..740314eb0 100644 --- a/cinder/tests/test_zfssa.py +++ b/cinder/tests/test_zfssa.py @@ -19,7 +19,7 @@ import mock from json import JSONEncoder -from oslo.utils import units +from oslo_utils import units from cinder.openstack.common import log as logging from cinder import test diff --git a/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py b/cinder/tests/zonemanager/test_brcd_fc_zone_driver.py index 2129abb1d..69c7c139b 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils import paramiko from cinder import exception diff --git a/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py b/cinder/tests/zonemanager/test_cisco_fc_zone_driver.py index b1441aa0d..a9aa3c4a4 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.utils import importutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import importutils from cinder import exception from cinder import test diff --git a/cinder/transfer/__init__.py b/cinder/transfer/__init__.py index b778d52bd..7b4107dad 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils CONF = cfg.CONF diff --git a/cinder/transfer/api.py b/cinder/transfer/api.py index 3789f5477..164a97e7e 100644 --- a/cinder/transfer/api.py +++ b/cinder/transfer/api.py @@ -22,8 +22,8 @@ import hashlib import hmac import os -from oslo.utils import excutils from oslo_config import cfg +from oslo_utils import excutils from cinder.db import base from cinder import exception diff --git a/cinder/utils.py b/cinder/utils.py index 357305255..674ca5b95 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.utils import importutils -from oslo.utils import timeutils from oslo_concurrency import lockutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import timeutils import six from cinder.brick.initiator import connector diff --git a/cinder/volume/__init__.py b/cinder/volume/__init__.py index 374aa8851..55c98ef3d 100644 --- a/cinder/volume/__init__.py +++ b/cinder/volume/__init__.py @@ -17,7 +17,7 @@ # Importing full names to not pollute the namespace and cause possible # collisions with use of 'from cinder.volume import ' elsewhere. -from oslo.utils import importutils +from oslo_utils import importutils from cinder.common import config diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 303372c2f..9cd7f3a40 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -23,9 +23,9 @@ import collections import datetime import functools -from oslo.utils import excutils -from oslo.utils import timeutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import timeutils import six from cinder import context diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index bfc644caa..34a6d89bb 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -19,9 +19,9 @@ Drivers for volumes. import time -from oslo.utils import excutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils 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 f59baf3e2..4b49c0f40 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -15,8 +15,8 @@ import os -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import importutils from cinder import context from cinder.db.sqlalchemy import api diff --git a/cinder/volume/drivers/coraid.py b/cinder/volume/drivers/coraid.py index 1ce9375f5..e0c4bca8c 100644 --- a/cinder/volume/drivers/coraid.py +++ b/cinder/volume/drivers/coraid.py @@ -27,9 +27,9 @@ import urllib import urllib2 from oslo.serialization import jsonutils -from oslo.utils import units from oslo_concurrency import lockutils from oslo_config import cfg +from oslo_utils import units 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 2c33a9815..2165519b4 100644 --- a/cinder/volume/drivers/datera.py +++ b/cinder/volume/drivers/datera.py @@ -15,8 +15,8 @@ import json -from oslo.utils import units from oslo_config import cfg +from oslo_utils import units 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 55c690f34..9dea49679 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE, _LW diff --git a/cinder/volume/drivers/dell/dell_storagecenter_fc.py b/cinder/volume/drivers/dell/dell_storagecenter_fc.py index c1ce3995a..bf4d511ce 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_fc.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_fc.py @@ -14,7 +14,7 @@ '''Volume driver for Dell Storage Center.''' -from oslo.utils import excutils +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/dell/dell_storagecenter_iscsi.py b/cinder/volume/drivers/dell/dell_storagecenter_iscsi.py index 658bc5b43..00d198655 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_iscsi.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_iscsi.py @@ -14,7 +14,7 @@ '''Volume driver for Dell Storage Center.''' -from oslo.utils import excutils +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/drbdmanagedrv.py b/cinder/volume/drivers/drbdmanagedrv.py index c0dab7ba3..e8b10886b 100644 --- a/cinder/volume/drivers/drbdmanagedrv.py +++ b/cinder/volume/drivers/drbdmanagedrv.py @@ -25,9 +25,9 @@ for more details. import uuid -from oslo.utils import importutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import units import six diff --git a/cinder/volume/drivers/emc/emc_vnx_cli.py b/cinder/volume/drivers/emc/emc_vnx_cli.py index 02d5f587e..4d72a3fa8 100644 --- a/cinder/volume/drivers/emc/emc_vnx_cli.py +++ b/cinder/volume/drivers/emc/emc_vnx_cli.py @@ -22,11 +22,11 @@ import re import time 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 +from oslo_utils import excutils +from oslo_utils import timeutils import six from cinder import exception diff --git a/cinder/volume/drivers/eqlx.py b/cinder/volume/drivers/eqlx.py index 9b9fff01e..35df80187 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.utils import excutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils 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 34c4946b8..2f52854d1 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.utils import units from oslo_config import cfg +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/fusionio/ioControl.py b/cinder/volume/drivers/fusionio/ioControl.py index 8f3b8857e..17b356deb 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.utils import units from oslo_config import cfg +from oslo_utils import units import requests from cinder import exception diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index dcf0c109c..011c52658 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.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import units 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 4992b70bb..ae0f271f0 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/drivers/hds/hnas_backend.py b/cinder/volume/drivers/hds/hnas_backend.py index 420affa64..e935199d8 100644 --- a/cinder/volume/drivers/hds/hnas_backend.py +++ b/cinder/volume/drivers/hds/hnas_backend.py @@ -20,7 +20,7 @@ Hitachi Unified Storage (HUS-HNAS) platform. Backend operations. import re -from oslo.utils import units +from oslo_utils import units from cinder.openstack.common import log as logging from cinder import utils diff --git a/cinder/volume/drivers/hds/iscsi.py b/cinder/volume/drivers/hds/iscsi.py index d33436be2..24d2b2ad4 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.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units 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 b52244605..46b67be49 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.utils import excutils -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/volume/drivers/hitachi/hbsd_basiclib.py b/cinder/volume/drivers/hitachi/hbsd_basiclib.py index 23693696b..dcd0094c6 100644 --- a/cinder/volume/drivers/hitachi/hbsd_basiclib.py +++ b/cinder/volume/drivers/hitachi/hbsd_basiclib.py @@ -16,9 +16,9 @@ import inspect import os import shlex -from oslo.utils import excutils from oslo_concurrency import lockutils from oslo_concurrency import processutils as putils +from oslo_utils import excutils import six from cinder import exception diff --git a/cinder/volume/drivers/hitachi/hbsd_common.py b/cinder/volume/drivers/hitachi/hbsd_common.py index ecb186507..a07a84de4 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils 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 c10156c9d..e7947dfc5 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.utils import excutils from oslo_config import cfg +from oslo_utils import excutils 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 27f527caf..8a0570926 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.utils import excutils from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import excutils import six from cinder import exception diff --git a/cinder/volume/drivers/huawei/rest_common.py b/cinder/volume/drivers/huawei/rest_common.py index 1780fc91d..2f64d4e69 100644 --- a/cinder/volume/drivers/huawei/rest_common.py +++ b/cinder/volume/drivers/huawei/rest_common.py @@ -22,8 +22,8 @@ import urllib2 import uuid from xml.etree import ElementTree as ET -from oslo.utils import excutils -from oslo.utils import units +from oslo_utils import excutils +from oslo_utils import units import six from cinder import context diff --git a/cinder/volume/drivers/huawei/ssh_common.py b/cinder/volume/drivers/huawei/ssh_common.py index 215bdcea4..4f2ce6075 100644 --- a/cinder/volume/drivers/huawei/ssh_common.py +++ b/cinder/volume/drivers/huawei/ssh_common.py @@ -26,7 +26,7 @@ import threading import time from xml.etree import ElementTree as ET -from oslo.utils import excutils +from oslo_utils import excutils from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/huaweistorhyper/huaweistorac.py b/cinder/volume/drivers/huaweistorhyper/huaweistorac.py index 2c46070bc..596d8bad9 100644 --- a/cinder/volume/drivers/huaweistorhyper/huaweistorac.py +++ b/cinder/volume/drivers/huaweistorhyper/huaweistorac.py @@ -20,8 +20,8 @@ import uuid -from oslo.utils import units from oslo_config import cfg +from oslo_utils import units import six from cinder import context diff --git a/cinder/volume/drivers/huaweistorhyper/vbs_client.py b/cinder/volume/drivers/huaweistorhyper/vbs_client.py index d6bf650a7..12a0102f5 100644 --- a/cinder/volume/drivers/huaweistorhyper/vbs_client.py +++ b/cinder/volume/drivers/huaweistorhyper/vbs_client.py @@ -19,7 +19,7 @@ import socket -from oslo.utils import units +from oslo_utils import units from cinder.i18n import _, _LE from cinder.openstack.common import log as logging diff --git a/cinder/volume/drivers/ibm/flashsystem.py b/cinder/volume/drivers/ibm/flashsystem.py index eeb8852fb..16c11f0ce 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.utils import excutils -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units import six from cinder import context diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py index 2e97728c2..7d8de1e00 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.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import units 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 469ea8da3..fdd93e8b3 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.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import units 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 2a3bc3112..e2b838d76 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.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/ibm/storwize_svc/helpers.py b/cinder/volume/drivers/ibm/storwize_svc/helpers.py index acc4de9fa..c4a60cc75 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/helpers.py +++ b/cinder/volume/drivers/ibm/storwize_svc/helpers.py @@ -19,8 +19,8 @@ import re import unicodedata from eventlet import greenthread -from oslo.utils import excutils -from oslo.utils import strutils +from oslo_utils import excutils +from oslo_utils import strutils import six from cinder import context diff --git a/cinder/volume/drivers/ibm/xiv_ds8k.py b/cinder/volume/drivers/ibm/xiv_ds8k.py index 19eff017d..9f6977732 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils 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 b3398df99..5c10a866d 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.utils import importutils -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import units from cinder.brick import exception as brick_exception from cinder.brick.local_dev import lvm as lvm diff --git a/cinder/volume/drivers/netapp/common.py b/cinder/volume/drivers/netapp/common.py index 8efa8f2e4..85dbdfa84 100644 --- a/cinder/volume/drivers/netapp/common.py +++ b/cinder/volume/drivers/netapp/common.py @@ -18,7 +18,7 @@ Unified driver for NetApp storage systems. Supports multiple storage systems of different families and protocols. """ -from oslo.utils import importutils +from oslo_utils import importutils from cinder import exception from cinder.i18n import _, _LI diff --git a/cinder/volume/drivers/netapp/dataontap/block_7mode.py b/cinder/volume/drivers/netapp/dataontap/block_7mode.py index bea12f382..7a371db38 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_7mode.py @@ -21,8 +21,8 @@ Volume driver library for NetApp 7-mode block storage systems. """ -from oslo.utils import timeutils -from oslo.utils import units +from oslo_utils import timeutils +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/block_base.py b/cinder/volume/drivers/netapp/dataontap/block_base.py index ba8a52409..446c7a755 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_base.py +++ b/cinder/volume/drivers/netapp/dataontap/block_base.py @@ -24,8 +24,8 @@ Volume driver library for NetApp 7/C-mode block storage systems. import sys import uuid -from oslo.utils import excutils -from oslo.utils import units +from oslo_utils import excutils +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/block_cmode.py b/cinder/volume/drivers/netapp/dataontap/block_cmode.py index 8ec2e2213..6d944428c 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_cmode.py @@ -23,7 +23,7 @@ Volume driver library for NetApp C-mode block storage systems. import copy -from oslo.utils import units +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/client/client_base.py b/cinder/volume/drivers/netapp/dataontap/client/client_base.py index 09811e3f8..89b1592bf 100644 --- a/cinder/volume/drivers/netapp/dataontap/client/client_base.py +++ b/cinder/volume/drivers/netapp/dataontap/client/client_base.py @@ -17,8 +17,8 @@ import copy import socket import sys -from oslo.utils import excutils -from oslo.utils import timeutils +from oslo_utils import excutils +from oslo_utils import timeutils import six from cinder.i18n import _LE, _LW, _LI diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py b/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py index eb686b0cf..34329f753 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py @@ -20,7 +20,7 @@ Volume driver for NetApp NFS storage. """ -from oslo.utils import units +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_base.py b/cinder/volume/drivers/netapp/dataontap/nfs_base.py index 61bbc9b3c..cf4b5a9a3 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_base.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_base.py @@ -25,9 +25,9 @@ import re from threading import Timer import time -from oslo.utils import excutils -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import excutils +from oslo_utils import units import six.moves.urllib.parse as urlparse from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py index a11d9c02b..9c9077759 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py @@ -23,7 +23,7 @@ Volume driver for NetApp NFS storage. import os import uuid -from oslo.utils import units +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/dataontap/ssc_cmode.py b/cinder/volume/drivers/netapp/dataontap/ssc_cmode.py index 197112aee..08b33b3f3 100644 --- a/cinder/volume/drivers/netapp/dataontap/ssc_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/ssc_cmode.py @@ -21,7 +21,7 @@ Storage service catalog utility functions and classes for NetApp systems. import copy from threading import Timer -from oslo.utils import timeutils +from oslo_utils import timeutils import six from cinder import exception diff --git a/cinder/volume/drivers/netapp/eseries/iscsi.py b/cinder/volume/drivers/netapp/eseries/iscsi.py index 272054e5f..952d2bd36 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.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/nexenta/nfs.py b/cinder/volume/drivers/nexenta/nfs.py index 84e6976aa..1419c2796 100644 --- a/cinder/volume/drivers/nexenta/nfs.py +++ b/cinder/volume/drivers/nexenta/nfs.py @@ -25,7 +25,7 @@ import hashlib import os import re -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder import db diff --git a/cinder/volume/drivers/nexenta/utils.py b/cinder/volume/drivers/nexenta/utils.py index a7c3f12c1..93a636e8b 100644 --- a/cinder/volume/drivers/nexenta/utils.py +++ b/cinder/volume/drivers/nexenta/utils.py @@ -23,7 +23,7 @@ import re -from oslo.utils import units +from oslo_utils import units import six.moves.urllib.parse as urlparse from cinder.i18n import _ diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py index e6561bffe..6acce9261 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.utils import units from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import units 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 d8337746b..7e289bbbb 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.utils import units from oslo_config import cfg +from oslo_utils import units from suds import client from cinder import exception diff --git a/cinder/volume/drivers/prophetstor/dplcommon.py b/cinder/volume/drivers/prophetstor/dplcommon.py index 560f5a3d5..1bf34a012 100644 --- a/cinder/volume/drivers/prophetstor/dplcommon.py +++ b/cinder/volume/drivers/prophetstor/dplcommon.py @@ -25,7 +25,7 @@ import json import random import time -from oslo.utils import units +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 62f108e6d..0e5abf687 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.utils import excutils -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units from cinder import exception from cinder.i18n import _, _LE, _LI, _LW diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 6a9e16837..a2dd52730 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.utils import encodeutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import encodeutils +from oslo_utils import units import six from cinder import exception diff --git a/cinder/volume/drivers/remotefs.py b/cinder/volume/drivers/remotefs.py index 2314e1365..f51956df2 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.utils import units from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import units 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 0df357524..a9f111b4b 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -42,16 +42,16 @@ import pprint import re import uuid -from oslo.utils import importutils +from oslo_utils import importutils hp3parclient = importutils.try_import("hp3parclient") if hp3parclient: from hp3parclient import client from hp3parclient import exceptions as hpexceptions -from oslo.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py b/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py index 14e3b253d..c6954984b 100644 --- a/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py +++ b/cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py @@ -21,8 +21,8 @@ operations on the SAN. """ from lxml import etree -from oslo.utils import units from oslo_concurrency import processutils +from oslo_utils import units from cinder import exception from cinder.i18n import _, _LE 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 2e02b3535..0eb594324 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.utils import units from oslo_config import cfg +from oslo_utils import units from cinder import context from cinder import exception diff --git a/cinder/volume/drivers/san/san.py b/cinder/volume/drivers/san/san.py index fa04affd4..f5adc86b8 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.utils import excutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py index 65bee2f31..99729a1b2 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.utils import units from oslo_concurrency import lockutils from oslo_config import cfg +from oslo_utils import units 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 ad8fb8588..aedec2b23 100644 --- a/cinder/volume/drivers/sheepdog.py +++ b/cinder/volume/drivers/sheepdog.py @@ -20,9 +20,9 @@ SheepDog Volume Driver. """ import re -from oslo.utils import units from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import units from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/volume/drivers/smbfs.py b/cinder/volume/drivers/smbfs.py index a9fad716d..4509fb541 100644 --- a/cinder/volume/drivers/smbfs.py +++ b/cinder/volume/drivers/smbfs.py @@ -16,9 +16,9 @@ import os import re -from oslo.utils import units from oslo_concurrency import processutils as putils from oslo_config import cfg +from oslo_utils import units 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 a1c0825a9..c824f3be7 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.utils import timeutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import timeutils +from oslo_utils import units import requests from six import wraps diff --git a/cinder/volume/drivers/srb.py b/cinder/volume/drivers/srb.py index 1c70416de..df83ec3f1 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.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 +from oslo_utils import excutils +from oslo_utils import units import six from cinder.brick.local_dev import lvm diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py index ad26973d1..c5d75700e 100644 --- a/cinder/volume/drivers/storpool.py +++ b/cinder/volume/drivers/storpool.py @@ -17,9 +17,9 @@ from __future__ import absolute_import -from oslo.utils import importutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import importutils +from oslo_utils import units 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 15863877b..1ecdfb37e 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.utils import importutils from oslo_config import cfg +from oslo_utils import importutils from cinder import exception from cinder.i18n import _, _LE, _LW, _LI diff --git a/cinder/volume/drivers/violin/v6000_fcp.py b/cinder/volume/drivers/violin/v6000_fcp.py index aeedf494f..59e2fc542 100644 --- a/cinder/volume/drivers/violin/v6000_fcp.py +++ b/cinder/volume/drivers/violin/v6000_fcp.py @@ -35,7 +35,7 @@ properly in an active-active HA configuration. See OpenStack Cinder driver documentation for more information. """ -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder.db.sqlalchemy import models diff --git a/cinder/volume/drivers/violin/v6000_iscsi.py b/cinder/volume/drivers/violin/v6000_iscsi.py index fe594cbab..ce4e27ac6 100644 --- a/cinder/volume/drivers/violin/v6000_iscsi.py +++ b/cinder/volume/drivers/violin/v6000_iscsi.py @@ -36,7 +36,7 @@ driver documentation for more information. import random -from oslo.utils import units +from oslo_utils import units from cinder import context from cinder.db.sqlalchemy import models diff --git a/cinder/volume/drivers/vmware/datastore.py b/cinder/volume/drivers/vmware/datastore.py index 0c052720b..5f908c8a4 100644 --- a/cinder/volume/drivers/vmware/datastore.py +++ b/cinder/volume/drivers/vmware/datastore.py @@ -17,7 +17,7 @@ Classes and utility methods for datastore selection. """ -from oslo.utils import excutils +from oslo_utils import excutils from cinder.i18n import _LE, _LW from cinder.openstack.common import log as logging diff --git a/cinder/volume/drivers/vmware/read_write_util.py b/cinder/volume/drivers/vmware/read_write_util.py index 86351713d..20f238c0b 100644 --- a/cinder/volume/drivers/vmware/read_write_util.py +++ b/cinder/volume/drivers/vmware/read_write_util.py @@ -23,7 +23,7 @@ import httplib import urllib import urllib2 -from oslo.utils import netutils +from oslo_utils import netutils import six.moves.urllib.parse as urlparse from cinder.i18n import _, _LI diff --git a/cinder/volume/drivers/vmware/vim_util.py b/cinder/volume/drivers/vmware/vim_util.py index 97861d8b2..28269cc32 100644 --- a/cinder/volume/drivers/vmware/vim_util.py +++ b/cinder/volume/drivers/vmware/vim_util.py @@ -17,7 +17,7 @@ The VMware API utility module. """ -from oslo.utils import netutils +from oslo_utils import netutils def get_soap_url(protocol, host, path='sdk'): diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py index ff79122f8..31daa1c2b 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.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units from cinder import exception from cinder.i18n import _, _LE, _LI, _LW diff --git a/cinder/volume/drivers/vmware/volumeops.py b/cinder/volume/drivers/vmware/volumeops.py index 58b81285e..d1b201255 100644 --- a/cinder/volume/drivers/vmware/volumeops.py +++ b/cinder/volume/drivers/vmware/volumeops.py @@ -19,7 +19,7 @@ Implements operations on volumes residing on VMware datastores. import urllib -from oslo.utils import units +from oslo_utils import units from cinder.i18n import _, _LE, _LI from cinder.openstack.common import log as logging diff --git a/cinder/volume/drivers/windows/smbfs.py b/cinder/volume/drivers/windows/smbfs.py index 4beffbf6a..30c93644c 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.utils import units from oslo_config import cfg +from oslo_utils import units from cinder import exception from cinder.i18n import _ diff --git a/cinder/volume/drivers/zfssa/zfssaiscsi.py b/cinder/volume/drivers/zfssa/zfssaiscsi.py index 48e6dbb99..92a6913de 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.utils import units from oslo_config import cfg +from oslo_utils import units 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 58637976d..7dba43401 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.utils import excutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import units 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 6a72a3006..1f1cd3d4e 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.utils import timeutils -from oslo.utils import units from oslo_config import cfg +from oslo_utils import timeutils +from oslo_utils import units 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 894dad02a..cea0b2e61 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.utils import timeutils from oslo_concurrency import processutils from oslo_config import cfg +from oslo_utils import timeutils 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 4ea9e2c91..186b783c4 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -41,10 +41,10 @@ import time 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 oslo_utils import excutils +from oslo_utils import importutils +from oslo_utils import timeutils from osprofiler import profiler from cinder import compute diff --git a/cinder/volume/utils.py b/cinder/volume/utils.py index 716331695..1c15b2d48 100644 --- a/cinder/volume/utils.py +++ b/cinder/volume/utils.py @@ -18,11 +18,11 @@ import math from Crypto.Random import random -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 oslo_utils import strutils +from oslo_utils import timeutils +from oslo_utils import units from cinder.brick.local_dev import lvm as brick_lvm from cinder import exception diff --git a/cinder/wsgi.py b/cinder/wsgi.py index 94710c66f..258b1d682 100644 --- a/cinder/wsgi.py +++ b/cinder/wsgi.py @@ -29,9 +29,9 @@ import time import eventlet import eventlet.wsgi import greenlet -from oslo.utils import excutils -from oslo.utils import netutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import netutils from paste import deploy import routes.middleware import webob.dec diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py index 9a43551db..1d6c108a2 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py @@ -17,7 +17,7 @@ # -from oslo.utils import excutils +from oslo_utils import excutils import paramiko from cinder import exception diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_client_cli.py b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_client_cli.py index 063b7c155..4bb53bcce 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_client_cli.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_client_cli.py @@ -25,8 +25,8 @@ import random import re from eventlet import greenthread -from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py index fb737018f..687e7972e 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.utils import excutils -from oslo.utils import importutils from oslo_concurrency import lockutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import importutils from cinder import exception from cinder.i18n import _, _LE, _LI diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py index e5b63ab19..06173c103 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py @@ -18,8 +18,8 @@ import random from eventlet import greenthread -from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_utils import excutils import six from cinder import exception diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py index 00b1412cd..9b102d94e 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py @@ -22,8 +22,8 @@ import random import re from eventlet import greenthread -from oslo.utils import excutils from oslo_concurrency import processutils +from oslo_utils import excutils import six from cinder import exception diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py index f98372933..8ca309aa9 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.utils import excutils -from oslo.utils import importutils from oslo_concurrency import lockutils from oslo_config import cfg +from oslo_utils import excutils +from oslo_utils import importutils import six from cinder import exception diff --git a/cinder/zonemanager/fc_san_lookup_service.py b/cinder/zonemanager/fc_san_lookup_service.py index 1cbee7cf8..48b0df691 100644 --- a/cinder/zonemanager/fc_san_lookup_service.py +++ b/cinder/zonemanager/fc_san_lookup_service.py @@ -23,7 +23,7 @@ defined in this class. """ -from oslo.utils import importutils +from oslo_utils import importutils from cinder import exception from cinder.i18n import _ diff --git a/cinder/zonemanager/fc_zone_manager.py b/cinder/zonemanager/fc_zone_manager.py index 75037ce89..f00701569 100644 --- a/cinder/zonemanager/fc_zone_manager.py +++ b/cinder/zonemanager/fc_zone_manager.py @@ -31,8 +31,8 @@ detach operation. """ -from oslo.utils import importutils from oslo_config import cfg +from oslo_utils import importutils from cinder import exception from cinder.i18n import _, _LI