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

+ 1
- 1
bin/manila-all View File

@ -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))


+ 1
- 1
bin/manila-api View File

@ -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]),


+ 2
- 2
bin/manila-manage View File

@ -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


+ 1
- 1
bin/manila-scheduler View File

@ -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...


+ 1
- 1
bin/manila-share View File

@ -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...


+ 1
- 1
contrib/tempest/tempest/config_share.py View File

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


+ 1
- 1
manila/api/__init__.py View File

@ -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


+ 1
- 1
manila/api/common.py View File

@ -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


+ 1
- 1
manila/api/contrib/__init__.py View File

@ -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


+ 1
- 1
manila/api/contrib/quotas.py View File

@ -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


+ 2
- 2
manila/api/extensions.py View File

@ -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


+ 2
- 2
manila/api/middleware/auth.py View File

@ -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


+ 1
- 1
manila/api/middleware/sizelimit.py View File

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


+ 1
- 1
manila/api/openstack/wsgi.py View File

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


+ 2
- 2
manila/api/v1/limits.py View File

@ -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


+ 2
- 2
manila/api/v1/share_networks.py View File

@ -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


+ 1
- 1
manila/api/v1/shares.py View File

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


+ 1
- 1
manila/api/versions.py View File

@ -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


+ 1
- 1
manila/api/views/limits.py View File

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


+ 1
- 1
manila/common/config.py View File

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


+ 6
- 6
manila/compute/__init__.py View File

@ -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()

+ 1
- 1
manila/compute/nova.py View File

@ -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


+ 1
- 1
manila/context.py View File

@ -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 _


+ 2
- 2
manila/db/api.py View File

@ -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 = [


+ 2
- 2
manila/db/base.py View File

@ -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',


+ 1
- 1
manila/db/migrations/alembic/migration.py View File

@ -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


+ 5
- 5
manila/db/sqlalchemy/api.py View File

@ -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


+ 3
- 3
manila/db/sqlalchemy/models.py View File

@ -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


+ 1
- 1
manila/exception.py View File

@ -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
- 0
manila/hacking/checks.py View File

@ -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)

+ 5
- 5
manila/i18n.py View File

@ -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)

+ 1
- 1
manila/manager.py View File

@ -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


+ 2
- 2
manila/network/__init__.py View File

@ -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


+ 1
- 1
manila/network/linux/interface.py View File

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


+ 1
- 1
manila/network/neutron/api.py View File

@ -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


+ 3
- 3
manila/quota.py View File

@ -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


+ 2
- 2
manila/rpc.py View File

@ -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


+ 1
- 1
manila/scheduler/chance.py View File

@ -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 _


+ 3
- 3
manila/scheduler/driver.py View File

@ -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 _


+ 1
- 1
manila/scheduler/filter_scheduler.py View File

@ -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 _


+ 2
- 2
manila/scheduler/host_manager.py View File

@ -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


+ 3
- 3
manila/scheduler/manager.py View File

@ -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


+ 2
- 2
manila/scheduler/rpcapi.py View File

@ -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


+ 3
- 3
manila/scheduler/scheduler_options.py View File

@ -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


+ 1
- 1
manila/scheduler/simple.py View File

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


+ 1
- 1
manila/scheduler/weights/capacity.py View File

@ -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


+ 2
- 2
manila/service.py View File

@ -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


+ 1
- 1
manila/share/__init__.py View File

@ -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


+ 3
- 3
manila/share/api.py View File

@ -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


+ 1
- 1
manila/share/configuration.py View File

@ -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


+ 1
- 1
manila/share/driver.py View File

@ -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


+ 1
- 1
manila/share/drivers/emc/driver.py View File

@ -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


+ 2
- 2
manila/share/drivers/emc/plugins/vnx/connection.py View File

@ -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


+ 2
- 2
manila/share/drivers/emc/plugins/vnx/utils.py View File

@ -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


+ 1
- 1
manila/share/drivers/ganesha/__init__.py View File

@ -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


+ 1
- 1
manila/share/drivers/ganesha/manager.py View File

@ -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


+ 3
- 3
manila/share/drivers/generic.py View File

@ -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


+ 1
- 1
manila/share/drivers/glusterfs.py View File

@ -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


+ 1
- 1
manila/share/drivers/glusterfs_native.py View File

@ -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


+ 2
- 2
manila/share/drivers/huawei/huawei_helper.py View File

@ -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


+ 3
- 3
manila/share/drivers/huawei/huawei_nas.py View File

@ -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


+ 4
- 4
manila/share/drivers/ibm/gpfs.py View File

@ -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


+ 3
- 3
manila/share/drivers/netapp/cluster_mode.py View File

@ -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


+ 2
- 2
manila/share/drivers/netapp/utils.py View File

@ -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


+ 2
- 2
manila/share/drivers/service_instance.py View File

@ -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


+ 1
- 1
manila/share/drivers/zfssa/restclient.py View File

@ -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


+ 1
- 1
manila/share/drivers/zfssa/zfssarest.py View File

@ -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 _


+ 2
- 2
manila/share/drivers/zfssa/zfssashare.py View File

@ -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 _


+ 4
- 4
manila/share/manager.py View File

@ -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


+ 2
- 2
manila/share/rpcapi.py View File

@ -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


+ 2
- 2
manila/share/volume_types.py View File

@ -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


+ 2
- 2
manila/test.py View File

@ -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


+ 2
- 2
manila/tests/api/contrib/test_admin_actions.py View File

@ -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


+ 1
- 1
manila/tests/api/contrib/test_services.py View File

@ -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


+ 1
- 1
manila/tests/api/contrib/test_share_actions.py View File

@ -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


+ 1
- 1
manila/tests/api/fakes.py View File

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


+ 1
- 1
manila/tests/api/middleware/test_faults.py View File

@ -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


+ 1
- 1
manila/tests/api/middleware/test_sizelimit.py View File

@ -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


+ 2
- 2
manila/tests/api/test_extensions.py View File

@ -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


+ 1
- 1
manila/tests/api/test_router.py View File

@ -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


+ 1
- 1
manila/tests/api/v1/test_limits.py View File

@ -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


+ 2
- 2
manila/tests/api/v1/test_share_metadata.py View File

@ -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


+ 2
- 2
manila/tests/api/v1/test_share_networks.py View File

@ -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


+ 1
- 1
manila/tests/api/v1/test_volume_types.py View File

@ -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


+ 2
- 2
manila/tests/db/migrations/alembic/test_migration.py View File

@ -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


+ 1
- 1
manila/tests/declare_conf.py View File

@ -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


+ 1
- 1
manila/tests/fake_compute.py View File

@ -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


+ 1
- 1
manila/tests/fake_network.py View File

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


+ 1
- 1
manila/tests/fake_notifier.py View File

@ -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


+ 1
- 1
manila/tests/fake_volume.py View File

@ -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


+ 1
- 1
manila/tests/integrated/api/client.py View File

@ -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


+ 1
- 1
manila/tests/integrated/integrated_helpers.py View File

@ -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__)


+ 1
- 1
manila/tests/integrated/test_extensions.py View File

@ -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


+ 1
- 1
manila/tests/network/neutron/test_neutron_api.py View File

@ -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


+ 1
- 1
manila/tests/network/test_security_service_db.py View File

@ -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


+ 1
- 1
manila/tests/network/test_share_network_db.py View File

@ -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
import six
from manila import context


+ 1
- 1
manila/tests/runtime_conf.py View File

@ -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


+ 1
- 1
manila/tests/scheduler/fakes.py View File

@ -16,7 +16,7 @@
Fakes For Scheduler tests.
"""
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from manila.scheduler import filter_scheduler


+ 1
- 1
manila/tests/scheduler/test_capacity_weigher.py View File

@ -17,7 +17,7 @@ Tests For Capacity Weigher.
"""
import mock
from oslo.config import cfg
from oslo_config import cfg
from manila import context
from manila.openstack.common.scheduler import weights


+ 1
- 1
manila/tests/scheduler/test_host_filters.py View File

@ -15,7 +15,7 @@
Tests For Scheduler Host Filters.
"""
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from manila import context
from manila.openstack.common.scheduler import filters


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save