diff --git a/cinder/api/contrib/admin_actions.py b/cinder/api/contrib/admin_actions.py index 964af7b3802..0c1b9e89e07 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 4f79248c83b..1940ab4d3ee 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 062d1f6d679..03481ed35e4 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 121224fefdc..8ef8ee2e4ee 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 369b85e0b8c..c0971bec816 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 fd4bc1f8b08..fa018923c86 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 f8733f66d1b..579bdf31a31 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 648a88407e2..6b3a1ee2f38 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 0f44c7b7b4e..7793b20ac78 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 016d1e44701..59eb85607ec 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 e89393d900b..6df83b98302 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 64d1d284367..27060c3081c 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 5710df97a98..6707ccbab1c 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 b676f10efee..d8c22af0576 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 7482eb458a5..d39c6159f3d 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 1b3cee17321..89a1f365286 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 57887eeb10a..6c780c6ced9 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 50139c3e87c..25ac7149a23 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 a766eeb2829..89c14082364 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 9d2cdf7ff6e..9776ddf2e31 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 b3cdf137ab3..21a94f826c4 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 efa3bc0e12e..29aa02d0031 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 6c225f05d62..9c90c0a3867 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 81602b87ae3..e9879d8653a 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 e35943af216..69365c6dfb1 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 8034ee31bdf..172cdcf2029 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 d053820a1d8..82d423a58a4 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 29efadd9aa3..b7965ec5b77 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 fb936eb9d34..1f85429f3be 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 4e24778f98b..ff0570d0554 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 6c144451d2c..846e7469117 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 09ec4b72142..34c6d79bc3a 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 570b6bc4f81..d8ae0ad48cc 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 aa36e07c35f..4b8c6cf5bea 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 158d7a24140..c27fef152fe 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 b6f70305a34..4e55d4d1a33 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 47828063c4c..582a954dc1e 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 ee69741d5bd..0790bcdbf49 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 965f1f42c8e..a70218058b7 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 34730958302..5918bafa293 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 429c1f2a5b4..a502c08a9b5 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 69bf92f31c3..a037bcc4a4b 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 06ecd88f470..a4683991160 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 b6c3a89bb07..3bf5f22a745 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 8e578884801..d0208971a23 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 cf26ebd96ef..273af9471c1 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 0242a50ce61..fd6aa0930bb 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 13c8836d51e..290f279e42e 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 66bd9cedc3c..c2877dd2c13 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 1c16306c9ab..95e4196777a 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 e5fa3a32e69..35e5337c771 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 881630f37bf..eea6bcc8ccc 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 7351c11bd41..bdaf35eb3ae 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 3bcb3cad6c3..14c80db93b1 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 fec0bf4281f..fb88afa9009 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 847384d5d62..d82e81cc353 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 f1206b59175..a55a339f7fe 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 3eb033e09a4..c87957dc5ec 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 1455f991f24..cf00ea76285 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 fc2feba85fa..4e70bd4e8b0 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 1535f0c6cc0..cea131316dc 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 19068c100b9..5dfb27b2fa3 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 77878c9bac6..91102595012 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 564dbdeb4c6..8bcfdc20185 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 5a5df04a573..98d6b308eb5 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 6bb52dd66cc..8175bbb76e2 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 2a453e6a65e..3060f451f45 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 23157d8e283..114dd857d84 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 0192db10226..7d39c79cef7 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 46df23fbfd4..45851e0d288 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 657fcf31f70..3780949c010 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 50492589ce2..d0139a04789 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 23ff13ef3fd..2bce9aea40f 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 0143438620b..617b94c27a9 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 2dabe8c4a03..8af04ea2f03 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 59f22e7038b..ef4e15d3a1b 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 657ff9aaccb..bb63d126176 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 97fb768041a..38ad4428b53 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 7d45609cb54..d86b51fc3d0 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 b084c268021..e3f02c11872 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 6a6fec7969d..36a0598232d 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 9272d942771..b8bcfe50e89 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 4ee35a433f2..1eeec4854e9 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 34d50920407..a28ac7ae010 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 2c9f8e750b3..c87df966f35 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 a118a52d00b..fe70779391d 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 6140fc25f11..942355e7f55 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 9644413a779..d2d91d37aa3 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 8778129ea8f..120b7a34c45 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 b0fdcf8f403..740314eb026 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 2129abb1db3..69c7c139b10 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 b1441aa0dde..a9aa3c4a454 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 b778d52bdfa..7b4107dad22 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 3789f547759..164a97e7e8c 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 357305255ea..674ca5b952b 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 374aa8851c8..55c98ef3d70 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 303372c2fa9..9cd7f3a401c 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 bfc644caa43..34a6d89bbfa 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 f59baf3e266..4b49c0f4094 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 1ce9375f560..e0c4bca8c9f 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 2c33a9815f5..2165519b457 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 55c690f3497..9dea4967910 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 c1ce3995a84..bf4d511cebd 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 658bc5b435d..00d198655b5 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 c0dab7ba316..e8b10886b91 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 02d5f587e7a..4d72a3fa8aa 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 9b9fff01ead..35df8018735 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 34c4946b8a1..2f52854d1ac 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 8f3b8857eee..17b356deb97 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 dcf0c109c73..011c5265860 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 4992b70bbec..ae0f271f045 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 420affa64a2..e935199d818 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 d33436be258..24d2b2ad4f0 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 b522446053d..46b67be49f7 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 23693696b78..dcd0094c621 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 ecb1865072b..a07a84de411 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 c10156c9dbb..e7947dfc5a7 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 27f527caf5b..8a0570926a1 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 1780fc91d55..2f64d4e6921 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 215bdcea4dd..4f2ce60759e 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 2c46070bcf5..596d8bad975 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 d6bf650a72f..12a0102f5b7 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 eeb8852fb6b..16c11f0ce91 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 2e97728c222..7d8de1e0074 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 469ea8da389..fdd93e8b390 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 2a3bc3112bb..e2b838d761c 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 acc4de9fae7..c4a60cc7562 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 19eff017d4f..9f697773236 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 b3398df9988..5c10a866d19 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 8efa8f2e4b5..85dbdfa8440 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 bea12f38254..7a371db386c 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 ba8a52409f3..446c7a755bc 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 8ec2e22135c..6d944428cad 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 09811e3f89f..89b1592bf79 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 eb686b0cf55..34329f753f8 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 61bbc9b3c68..cf4b5a9a357 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 a11d9c02be4..9c9077759c1 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 197112aee6b..08b33b3f331 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 272054e5f81..952d2bd3696 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 84e6976aa74..1419c279624 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 a7c3f12c1c4..93a636e8bb7 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 e6561bffeee..6acce926115 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 d8337746b26..7e289bbbb5c 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 560f5a3d5da..1bf34a0121c 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 62f108e6dca..0e5abf68774 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 6a9e16837c3..a2dd527301a 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 2314e13656c..f51956df2ec 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 0df3575241c..a9f111b4b27 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 14e3b253d55..c6954984b5a 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 2e02b3535f7..0eb594324ba 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 fa04affd44c..f5adc86b8f3 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 65bee2f31fc..99729a1b24d 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 ad8fb858893..aedec2b231d 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 a9fad716db4..4509fb541d5 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 a1c0825a9f9..c824f3be73d 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 1c70416de38..df83ec3f1a1 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 ad26973d103..c5d75700ec2 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 15863877bba..1ecdfb37e0e 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 aeedf494fb6..59e2fc54283 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 fe594cbab26..ce4e27ac6a2 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 0c052720b87..5f908c8a498 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 86351713d29..20f238c0bb4 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 97861d8b215..28269cc3226 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 ff79122f8ff..31daa1c2ba4 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 58b81285e6e..d1b20125500 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 4beffbf6a27..30c93644c73 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 48e6dbb99c4..92a6913dedc 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 58637976da4..7dba4340156 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 6a72a30061a..1f1cd3d4ef2 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 894dad02a4d..cea0b2e6100 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 4ea9e2c917a..186b783c496 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 71633169523..1c15b2d4855 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 94710c66fbe..258b1d6822f 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 9a43551db90..1d6c108a27c 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 063b7c155f7..4bb53bcce65 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 fb737018fac..687e7972e70 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 e5b63ab19ed..06173c103c7 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 00b1412cd7f..9b102d94e9b 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 f983729330d..8ca309aa975 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 1cbee7cf89a..48b0df69135 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 75037ce8960..f0070156972 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