Browse Source

Switch to using oslo_* instead of oslo.*

The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
oslo.messaging is the only exception because this package doesn't
currently support non-namespaced imports.

Change-Id: I3987e651bc880c8ffa7c0105df0298679dcd3a43
changes/61/147261/5
Thomas Bechtold 7 years ago
parent
commit
071d0b59c1
  1. 2
      bin/manila-all
  2. 2
      bin/manila-api
  3. 4
      bin/manila-manage
  4. 2
      bin/manila-scheduler
  5. 2
      bin/manila-share
  6. 2
      contrib/tempest/tempest/config_share.py
  7. 2
      manila/api/__init__.py
  8. 2
      manila/api/common.py
  9. 2
      manila/api/contrib/__init__.py
  10. 2
      manila/api/contrib/quotas.py
  11. 4
      manila/api/extensions.py
  12. 4
      manila/api/middleware/auth.py
  13. 2
      manila/api/middleware/sizelimit.py
  14. 2
      manila/api/openstack/wsgi.py
  15. 4
      manila/api/v1/limits.py
  16. 4
      manila/api/v1/share_networks.py
  17. 2
      manila/api/v1/shares.py
  18. 2
      manila/api/versions.py
  19. 2
      manila/api/views/limits.py
  20. 2
      manila/common/config.py
  21. 12
      manila/compute/__init__.py
  22. 2
      manila/compute/nova.py
  23. 2
      manila/context.py
  24. 4
      manila/db/api.py
  25. 4
      manila/db/base.py
  26. 2
      manila/db/migrations/alembic/migration.py
  27. 10
      manila/db/sqlalchemy/api.py
  28. 6
      manila/db/sqlalchemy/models.py
  29. 2
      manila/exception.py
  30. 14
      manila/hacking/checks.py
  31. 10
      manila/i18n.py
  32. 2
      manila/manager.py
  33. 4
      manila/network/__init__.py
  34. 2
      manila/network/linux/interface.py
  35. 2
      manila/network/neutron/api.py
  36. 6
      manila/quota.py
  37. 4
      manila/rpc.py
  38. 2
      manila/scheduler/chance.py
  39. 6
      manila/scheduler/driver.py
  40. 2
      manila/scheduler/filter_scheduler.py
  41. 4
      manila/scheduler/host_manager.py
  42. 6
      manila/scheduler/manager.py
  43. 4
      manila/scheduler/rpcapi.py
  44. 6
      manila/scheduler/scheduler_options.py
  45. 2
      manila/scheduler/simple.py
  46. 2
      manila/scheduler/weights/capacity.py
  47. 4
      manila/service.py
  48. 2
      manila/share/__init__.py
  49. 6
      manila/share/api.py
  50. 2
      manila/share/configuration.py
  51. 2
      manila/share/driver.py
  52. 2
      manila/share/drivers/emc/driver.py
  53. 4
      manila/share/drivers/emc/plugins/vnx/connection.py
  54. 4
      manila/share/drivers/emc/plugins/vnx/utils.py
  55. 2
      manila/share/drivers/ganesha/__init__.py
  56. 2
      manila/share/drivers/ganesha/manager.py
  57. 6
      manila/share/drivers/generic.py
  58. 2
      manila/share/drivers/glusterfs.py
  59. 2
      manila/share/drivers/glusterfs_native.py
  60. 4
      manila/share/drivers/huawei/huawei_helper.py
  61. 6
      manila/share/drivers/huawei/huawei_nas.py
  62. 8
      manila/share/drivers/ibm/gpfs.py
  63. 6
      manila/share/drivers/netapp/cluster_mode.py
  64. 4
      manila/share/drivers/netapp/utils.py
  65. 4
      manila/share/drivers/service_instance.py
  66. 2
      manila/share/drivers/zfssa/restclient.py
  67. 2
      manila/share/drivers/zfssa/zfssarest.py
  68. 4
      manila/share/drivers/zfssa/zfssashare.py
  69. 8
      manila/share/manager.py
  70. 4
      manila/share/rpcapi.py
  71. 4
      manila/share/volume_types.py
  72. 4
      manila/test.py
  73. 4
      manila/tests/api/contrib/test_admin_actions.py
  74. 2
      manila/tests/api/contrib/test_services.py
  75. 2
      manila/tests/api/contrib/test_share_actions.py
  76. 2
      manila/tests/api/fakes.py
  77. 2
      manila/tests/api/middleware/test_faults.py
  78. 2
      manila/tests/api/middleware/test_sizelimit.py
  79. 4
      manila/tests/api/test_extensions.py
  80. 2
      manila/tests/api/test_router.py
  81. 2
      manila/tests/api/v1/test_limits.py
  82. 4
      manila/tests/api/v1/test_share_metadata.py
  83. 4
      manila/tests/api/v1/test_share_networks.py
  84. 2
      manila/tests/api/v1/test_volume_types.py
  85. 4
      manila/tests/db/migrations/alembic/test_migration.py
  86. 2
      manila/tests/declare_conf.py
  87. 2
      manila/tests/fake_compute.py
  88. 2
      manila/tests/fake_network.py
  89. 2
      manila/tests/fake_notifier.py
  90. 2
      manila/tests/fake_volume.py
  91. 2
      manila/tests/integrated/api/client.py
  92. 2
      manila/tests/integrated/integrated_helpers.py
  93. 2
      manila/tests/integrated/test_extensions.py
  94. 2
      manila/tests/network/neutron/test_neutron_api.py
  95. 2
      manila/tests/network/test_security_service_db.py
  96. 2
      manila/tests/network/test_share_network_db.py
  97. 2
      manila/tests/runtime_conf.py
  98. 2
      manila/tests/scheduler/fakes.py
  99. 2
      manila/tests/scheduler/test_capacity_weigher.py
  100. 2
      manila/tests/scheduler/test_host_filters.py

2
bin/manila-all

@ -32,7 +32,7 @@ eventlet.monkey_patch()
import os
import sys
from oslo.config import cfg
from oslo_config import cfg
possible_topdir = os.path.normpath(os.path.join
(os.path.abspath(sys.argv[0]),
os.pardir, os.pardir))

2
bin/manila-api

@ -28,7 +28,7 @@ eventlet.monkey_patch()
import os
import sys
from oslo.config import cfg
from oslo_config import cfg
possible_topdir = os.path.normpath(os.path.join
(os.path.abspath(sys.argv[0]),

4
bin/manila-manage

@ -70,8 +70,8 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
from manila import i18n
i18n.enable_lazy()
from oslo.config import cfg
from oslo.utils import uuidutils
from oslo_config import cfg
from oslo_utils import uuidutils
from manila.common import config # Need to register global_opts # noqa
from manila import context

2
bin/manila-scheduler

@ -24,7 +24,7 @@ eventlet.monkey_patch()
import os
import sys
from oslo.config import cfg
from oslo_config import cfg
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...

2
bin/manila-share

@ -23,7 +23,7 @@ eventlet.monkey_patch()
import os
import sys
from oslo.config import cfg
from oslo_config import cfg
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...

2
contrib/tempest/tempest/config_share.py

@ -15,7 +15,7 @@
from __future__ import print_function
from oslo.config import cfg
from oslo_config import cfg
from tempest import config # noqa

2
manila/api/__init__.py

@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
import paste.urlmap

2
manila/api/common.py

@ -16,7 +16,7 @@
import os
import re
from oslo.config import cfg
from oslo_config import cfg
import six
from six.moves.urllib import parse
import webob

2
manila/api/contrib/__init__.py

@ -19,7 +19,7 @@ It can't be called 'extensions' because that causes namespacing problems.
"""
from oslo.config import cfg
from oslo_config import cfg
from manila.api import extensions
from manila.openstack.common import log as logging

2
manila/api/contrib/quotas.py

@ -14,7 +14,7 @@
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
from six.moves.urllib import parse
import webob

4
manila/api/extensions.py

@ -16,8 +16,8 @@
import os
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
import six
import webob.dec
import webob.exc

4
manila/api/middleware/auth.py

@ -18,8 +18,8 @@ Common Auth Middleware.
"""
import os
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import webob.dec
import webob.exc

2
manila/api/middleware/sizelimit.py

@ -16,7 +16,7 @@ Request Body limiting middleware.
"""
from oslo.config import cfg
from oslo_config import cfg
import webob.dec
import webob.exc

2
manila/api/openstack/wsgi.py

@ -15,7 +15,7 @@
import inspect
import math
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
import time
import webob

4
manila/api/v1/limits.py

@ -24,8 +24,8 @@ import math
import re
import time
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo_serialization import jsonutils
from oslo_utils import importutils
import webob.dec
import webob.exc

4
manila/api/v1/share_networks.py

@ -15,8 +15,8 @@
"""The shares api."""
from oslo.db import exception as db_exception
from oslo.utils import timeutils
from oslo_db import exception as db_exception
from oslo_utils import timeutils
import six
import webob
from webob import exc

2
manila/api/v1/shares.py

@ -17,7 +17,7 @@
import ast
from oslo.utils import uuidutils
from oslo_utils import uuidutils
import six
import webob
from webob import exc

2
manila/api/versions.py

@ -16,7 +16,7 @@
import datetime
from lxml import etree
from oslo.config import cfg
from oslo_config import cfg
from manila.api.openstack import wsgi
from manila.api.views import versions as views_versions

2
manila/api/views/limits.py

@ -15,7 +15,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
import six

2
manila/common/config.py

@ -26,7 +26,7 @@ stepping stone.
import socket
from oslo.config import cfg
from oslo_config import cfg
from manila.i18n import _

12
manila/compute/__init__.py

@ -13,22 +13,22 @@
# License for the specific language governing permissions and limitations
# under the License.
import oslo.config.cfg
import oslo.utils.importutils
import oslo_config.cfg
import oslo_utils.importutils
_compute_opts = [
oslo.config.cfg.StrOpt('compute_api_class',
oslo_config.cfg.StrOpt('compute_api_class',
default='manila.compute.nova.API',
help='The full class name of the '
'Compute API class to use.'),
]
oslo.config.cfg.CONF.register_opts(_compute_opts)
oslo_config.cfg.CONF.register_opts(_compute_opts)
def API():
importutils = oslo.utils.importutils
compute_api_class = oslo.config.cfg.CONF.compute_api_class
importutils = oslo_utils.importutils
compute_api_class = oslo_config.cfg.CONF.compute_api_class
cls = importutils.import_class(compute_api_class)
return cls()

2
manila/compute/nova.py

@ -23,7 +23,7 @@ from novaclient import service_catalog
from novaclient.v1_1 import client as nova_client
from novaclient.v1_1.contrib import assisted_volume_snapshots
from novaclient.v1_1 import servers as nova_servers
from oslo.config import cfg
from oslo_config import cfg
from manila.db import base
from manila import exception

2
manila/context.py

@ -19,8 +19,8 @@
import copy
from oslo.utils import timeutils
from oslo_context import context as common_context
from oslo_utils import timeutils
import six
from manila.i18n import _

4
manila/db/api.py

@ -40,8 +40,8 @@ these objects be simple dictionaries.
pool of available hardware (Default: True)
"""
from oslo.config import cfg
from oslo.db import api as db_api
from oslo_config import cfg
from oslo_db import api as db_api
db_opts = [

4
manila/db/base.py

@ -16,8 +16,8 @@
"""Base class for classes that need modular database access."""
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
db_driver_opt = cfg.StrOpt('db_driver',
default='manila.db',

2
manila/db/migrations/alembic/migration.py

@ -17,7 +17,7 @@ import os
import alembic
from alembic import config as alembic_config
import alembic.migration as alembic_migration
from oslo.config import cfg
from oslo_config import cfg
from manila.db.sqlalchemy import api as db_api

10
manila/db/sqlalchemy/api.py

@ -22,11 +22,11 @@ import sys
import uuid
import warnings
from oslo.config import cfg
from oslo.db import exception as db_exception
from oslo.db import options as db_options
from oslo.db.sqlalchemy import session
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_db import exception as db_exception
from oslo_db import options as db_options
from oslo_db.sqlalchemy import session
from oslo_utils import timeutils
import six
from sqlalchemy import or_
from sqlalchemy.orm import joinedload

6
manila/db/sqlalchemy/models.py

@ -19,9 +19,9 @@
SQLAlchemy models for Manila data.
"""
from oslo.config import cfg
from oslo.db.sqlalchemy import models
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_db.sqlalchemy import models
from oslo_utils import timeutils
import six
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base

2
manila/exception.py

@ -22,8 +22,8 @@ SHOULD include dedicated exception logging.
"""
from oslo.config import cfg
from oslo_concurrency import processutils
from oslo_config import cfg
import six
import webob.exc

14
manila/hacking/checks.py

@ -52,6 +52,9 @@ string_translation = re.compile(r"[^_]*_\(\s*('|\")")
underscore_import_check = re.compile(r"(.)*import _(.)*")
# We need this for cases where they have created their own _ function.
custom_underscore_check = re.compile(r"(.)*_\s*=\s*(.)*")
# TODO(toabctl): Remove the oslo.messaging exception when package
# moved away from namespace
oslo_namespace_imports = re.compile(r"from[\s]*oslo[.](?!messaging)(.*)")
class BaseASTChecker(ast.NodeVisitor):
@ -221,9 +224,20 @@ class CheckForTransAdd(BaseASTChecker):
super(CheckForTransAdd, self).generic_visit(node)
def check_oslo_namespace_imports(logical_line, physical_line, filename):
if pep8.noqa(physical_line):
return
if re.match(oslo_namespace_imports, logical_line):
msg = ("N333: '%s' must be used instead of '%s'.") % (
logical_line.replace('oslo.', 'oslo_'),
logical_line)
yield(0, msg)
def factory(register):
register(validate_log_translations)
register(check_explicit_underscore_import)
register(no_translate_debug_logs)
register(CheckForStrExc)
register(CheckForTransAdd)
register(check_oslo_namespace_imports)

10
manila/i18n.py

@ -18,11 +18,11 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html .
"""
from oslo import i18n
import oslo_i18n
DOMAIN = 'manila'
_translators = i18n.TranslatorFactory(domain=DOMAIN)
_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
# The primary translation function using the well-known name "_"
_ = _translators.primary
@ -39,12 +39,12 @@ _LC = _translators.log_critical
def enable_lazy():
return i18n.enable_lazy()
return oslo_i18n.enable_lazy()
def translate(value, user_locale):
return i18n.translate(value, user_locale)
return oslo_i18n.translate(value, user_locale)
def get_available_languages():
return i18n.get_available_languages(DOMAIN)
return oslo_i18n.get_available_languages(DOMAIN)

2
manila/manager.py

@ -51,7 +51,7 @@ This module provides Manager, a base class for managers.
"""
from oslo.config import cfg
from oslo_config import cfg
import six
from manila.db import base

4
manila/network/__init__.py

@ -15,8 +15,8 @@
# under the License.
import abc
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
from manila.db import base as db_base

2
manila/network/linux/interface.py

@ -16,7 +16,7 @@
import abc
import netaddr
from oslo.config import cfg
from oslo_config import cfg
import six
from manila import exception

2
manila/network/neutron/api.py

@ -16,7 +16,7 @@
from neutronclient.common import exceptions as neutron_client_exc
from neutronclient.v2_0 import client as clientv20
from oslo.config import cfg
from oslo_config import cfg
from manila import context
from manila.db import base

6
manila/quota.py

@ -18,9 +18,9 @@
import datetime
from oslo.config import cfg
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
import six
from manila import db

4
manila/rpc.py

@ -26,9 +26,9 @@ __all__ = [
'TRANSPORT_ALIASES',
]
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import manila.context
import manila.exception

2
manila/scheduler/chance.py

@ -21,7 +21,7 @@ Chance (Random) Scheduler implementation
import random
from oslo.config import cfg
from oslo_config import cfg
from manila import exception
from manila.i18n import _

6
manila/scheduler/driver.py

@ -19,9 +19,9 @@
Scheduler base class that all Schedulers should inherit from
"""
from oslo.config import cfg
from oslo.utils import importutils
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import importutils
from oslo_utils import timeutils
from manila import db
from manila.i18n import _

2
manila/scheduler/filter_scheduler.py

@ -20,7 +20,7 @@ You can customize this scheduler by specifying your own share Filters and
Weighing Functions.
"""
from oslo.config import cfg
from oslo_config import cfg
from manila import exception
from manila.i18n import _

4
manila/scheduler/host_manager.py

@ -19,8 +19,8 @@ Manage hosts in the current zone.
import UserDict
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
import six
from manila import db

6
manila/scheduler/manager.py

@ -19,9 +19,9 @@
Scheduler Service
"""
from oslo.config import cfg
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 manila import context
from manila import db

4
manila/scheduler/rpcapi.py

@ -16,9 +16,9 @@
Client side of the scheduler manager RPC API.
"""
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from manila import rpc

6
manila/scheduler/scheduler_options.py

@ -23,9 +23,9 @@ dynamic configuration.
import datetime
import os
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from manila.i18n import _LE
from manila.openstack.common import log as logging

2
manila/scheduler/simple.py

@ -19,7 +19,7 @@
Simple Scheduler
"""
from oslo.config import cfg
from oslo_config import cfg
from manila import db
from manila import exception

2
manila/scheduler/weights/capacity.py

@ -22,7 +22,7 @@ number and the weighing has the opposite effect of the default.
import math
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common.scheduler import weights

4
manila/service.py

@ -27,9 +27,9 @@ import time
import eventlet
import greenlet
from oslo.config import cfg
from oslo import messaging
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
from manila import context
from manila import db

2
manila/share/__init__.py

@ -16,7 +16,7 @@
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from manila.share import <foo>' elsewhere.
import oslo.utils.importutils as import_utils
import oslo_utils.importutils as import_utils
from manila.common import config

6
manila/share/api.py

@ -18,9 +18,9 @@
Handles all requests relating to shares.
"""
from oslo.config import cfg
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 manila.api import extensions

2
manila/share/configuration.py

@ -42,7 +42,7 @@ option group. This is due to the way cfg works. All cfg options must be defined
and registered in the group in which they are used.
"""
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log as logging

2
manila/share/driver.py

@ -20,7 +20,7 @@ Drivers for shares.
import time
from oslo.config import cfg
from oslo_config import cfg
from manila import exception
from manila.i18n import _LE

2
manila/share/drivers/emc/driver.py

@ -20,7 +20,7 @@ backend. Use the Manila configuration variable "share_backend_name"
to specify, which backend plugins to use.
"""
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log
from manila.share import driver

4
manila/share/drivers/emc/plugins/vnx/connection.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
"""VNX backend for the EMC Manila driver."""
from oslo.utils import excutils
from oslo.utils import units
from oslo_utils import excutils
from oslo_utils import units
import six
from manila import db as manila_db

4
manila/share/drivers/emc/plugins/vnx/utils.py

@ -14,8 +14,8 @@
# under the License.
import types
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
from manila.openstack.common import log

2
manila/share/drivers/ganesha/__init__.py

@ -18,7 +18,7 @@ import errno
import os
import re
from oslo.config import cfg
from oslo_config import cfg
import six
from manila import exception

2
manila/share/drivers/ganesha/manager.py

@ -18,7 +18,7 @@ import pipes
import re
import sys
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from manila import exception

6
manila/share/drivers/generic.py

@ -19,10 +19,10 @@ import os
import re
import time
from oslo.config import cfg
from oslo.utils import excutils
from oslo.utils import importutils
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_utils import excutils
from oslo_utils import importutils
import six
from manila.common import constants as const

2
manila/share/drivers/glusterfs.py

@ -29,7 +29,7 @@ import re
import sys
import xml.etree.cElementTree as etree
from oslo.config import cfg
from oslo_config import cfg
import six
from manila import exception

2
manila/share/drivers/glusterfs_native.py

@ -30,7 +30,7 @@ import pipes
import shutil
import tempfile
from oslo.config import cfg
from oslo_config import cfg
import six
from manila import exception

4
manila/share/drivers/huawei/huawei_helper.py

@ -16,8 +16,8 @@
import base64
from xml import etree
from oslo.serialization import jsonutils
from oslo.utils import units
from oslo_serialization import jsonutils
from oslo_utils import units
import six
from six.moves import http_cookiejar
from six.moves.urllib import request as urlreq # pylint: disable=E0611

6
manila/share/drivers/huawei/huawei_nas.py

@ -16,9 +16,9 @@
"""Huawei Nas Driver for Huawei OceanStor V3 storage arrays."""
import time
from oslo.config import cfg
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 manila import exception
from manila.i18n import _, _LI, _LW

8
manila/share/drivers/ibm/gpfs.py

@ -36,11 +36,11 @@ import pipes
import re
import socket
from oslo.config import cfg
from oslo.utils import excutils
from oslo.utils import importutils
from oslo.utils import units
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_utils import excutils
from oslo_utils import importutils
from oslo_utils import units
import six
from manila import exception

6
manila/share/drivers/netapp/cluster_mode.py

@ -24,9 +24,9 @@ import copy
import hashlib
import re
from oslo.config import cfg
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 manila import context

4
manila/share/drivers/netapp/utils.py

@ -22,8 +22,8 @@ import copy
import platform
import socket
from oslo.concurrency import processutils as putils
from oslo.utils import timeutils
from oslo_concurrency import processutils as putils
from oslo_utils import timeutils
from manila.i18n import _LI, _LW
from manila.openstack.common import log as logging

4
manila/share/drivers/service_instance.py

@ -21,8 +21,8 @@ import threading
import time
import netaddr
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
import six
from manila.common import constants

2
manila/share/drivers/zfssa/restclient.py

@ -21,7 +21,7 @@ TODO(diemtran): this module needs to be placed in a library common to OpenStack
import httplib
import time
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
# pylint: disable=E0611,F0401
from six.moves.urllib import error as urlerror

2
manila/share/drivers/zfssa/zfssarest.py

@ -14,7 +14,7 @@
"""
ZFS Storage Appliance Proxy
"""
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from manila import exception
from manila.i18n import _

4
manila/share/drivers/zfssa/zfssashare.py

@ -17,8 +17,8 @@ ZFS Storage Appliance Manila Share Driver
import base64
from oslo.config import cfg
from oslo.utils import units
from oslo_config import cfg
from oslo_utils import units
from manila import exception
from manila.i18n import _

8
manila/share/manager.py

@ -19,10 +19,10 @@
:share_driver: Used by :class:`ShareManager`.
"""
from oslo.config import cfg
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
import six
from manila.common import constants

4
manila/share/rpcapi.py

@ -16,9 +16,9 @@
Client side of the share RPC API.
"""
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from manila import rpc

4
manila/share/volume_types.py

@ -15,8 +15,8 @@
"""Built-in volume type properties."""
from oslo.config import cfg
from oslo.db import exception as db_exception
from oslo_config import cfg
from oslo_db import exception as db_exception
import six
from manila import context

4
manila/test.py

@ -27,10 +27,10 @@ import uuid
import fixtures
import mock
from oslo.config import cfg
from oslo.config import fixture as config_fixture
from oslo.messaging import conffixture as messaging_conffixture
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
import oslotest.base as base_test
import six

4
manila/tests/api/contrib/test_admin_actions.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import webob
from manila import context

2
manila/tests/api/contrib/test_services.py

@ -17,7 +17,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
from manila.api.contrib import services
from manila import context

2
manila/tests/api/contrib/test_share_actions.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
import webob
from manila.api.contrib import share_actions

2
manila/tests/api/fakes.py

@ -15,7 +15,7 @@
import uuid
from oslo.utils import timeutils
from oslo_utils import timeutils
import routes
import six
import webob

2
manila/tests/api/middleware/test_faults.py

@ -15,7 +15,7 @@
from xml.dom import minidom
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import webob
import webob.dec
import webob.exc

2
manila/tests/api/middleware/test_sizelimit.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
import six
import webob

4
manila/tests/api/test_extensions.py

@ -16,8 +16,8 @@
import iso8601
from lxml import etree
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import webob
from manila.api.v1 import router

2
manila/tests/api/test_router.py

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from manila.api.openstack import wsgi
from manila.api.v1 import router

2
manila/tests/api/v1/test_limits.py

@ -21,7 +21,7 @@ import httplib
from xml.dom import minidom
from lxml import etree
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from six import moves
import webob

4
manila/tests/api/v1/test_share_metadata.py

@ -16,8 +16,8 @@
import uuid
import ddt
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import webob
from manila.api.v1 import share_metadata

4
manila/tests/api/v1/test_share_networks.py

@ -14,8 +14,8 @@
# under the License.
import mock
from oslo.db import exception as db_exception
from oslo.utils import timeutils
from oslo_db import exception as db_exception
from oslo_utils import timeutils
from six.moves.urllib import parse
from webob import exc as webob_exc

2
manila/tests/api/v1/test_volume_types.py

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import webob
from manila.api.v1 import volume_types as types

4
manila/tests/db/migrations/alembic/test_migration.py

@ -19,8 +19,8 @@ Tests for database migrations.
from alembic import script
import mock
from oslo.db.sqlalchemy import test_base
from oslo.db.sqlalchemy import test_migrations
from oslo_db.sqlalchemy import test_base
from oslo_db.sqlalchemy import test_migrations
from sqlalchemy.sql import text
from manila.db.migrations.alembic import migration

2
manila/tests/declare_conf.py

@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
CONF = cfg.CONF

2
manila/tests/fake_compute.py

@ -14,7 +14,7 @@
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log as logging

2
manila/tests/fake_network.py

@ -15,7 +15,7 @@
import uuid
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log as logging

2
manila/tests/fake_notifier.py

@ -16,7 +16,7 @@ import collections
import functools
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from manila import rpc

2
manila/tests/fake_volume.py

@ -14,7 +14,7 @@
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log as logging

2
manila/tests/integrated/api/client.py

@ -14,7 +14,7 @@
import httplib
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from six.moves.urllib import parse
from manila.openstack.common import log as logging

2
manila/tests/integrated/integrated_helpers.py

@ -27,7 +27,7 @@ from manila import service
from manila import test # For the flags
from manila.tests.integrated.api import client
from oslo.config import cfg
from oslo_config import cfg
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

2
manila/tests/integrated/test_extensions.py

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from manila.openstack.common import log as logging
from manila.tests.integrated import integrated_helpers

2
manila/tests/network/neutron/test_neutron_api.py

@ -17,7 +17,7 @@
import mock
from neutronclient.common import exceptions as neutron_client_exc
from neutronclient.v2_0 import client as clientv20
from oslo.config import cfg
from oslo_config import cfg
from manila import context
from manila.db import base

2
manila/tests/network/test_security_service_db.py

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.db import exception as db_exception
from oslo_db import exception as db_exception
from manila.common import constants
from manila import context

2
manila/tests/network/test_share_network_db.py