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
This commit is contained in:
Thomas Bechtold 2015-01-14 18:47:57 +01:00
parent b5edd4f9c9
commit 071d0b59c1
133 changed files with 241 additions and 228 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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.api import extensions
from manila.openstack.common import log as logging from manila.openstack.common import log as logging

View File

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

View File

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

View File

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

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.dec
import webob.exc import webob.exc

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ from novaclient import service_catalog
from novaclient.v1_1 import client as nova_client from novaclient.v1_1 import client as nova_client
from novaclient.v1_1.contrib import assisted_volume_snapshots from novaclient.v1_1.contrib import assisted_volume_snapshots
from novaclient.v1_1 import servers as nova_servers 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.db import base
from manila import exception from manila import exception

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@ import os
import alembic import alembic
from alembic import config as alembic_config from alembic import config as alembic_config
import alembic.migration as alembic_migration 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 from manila.db.sqlalchemy import api as db_api

View File

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

View File

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

View File

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

View File

@ -52,6 +52,9 @@ string_translation = re.compile(r"[^_]*_\(\s*('|\")")
underscore_import_check = re.compile(r"(.)*import _(.)*") underscore_import_check = re.compile(r"(.)*import _(.)*")
# We need this for cases where they have created their own _ function. # We need this for cases where they have created their own _ function.
custom_underscore_check = re.compile(r"(.)*_\s*=\s*(.)*") 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): class BaseASTChecker(ast.NodeVisitor):
@ -221,9 +224,20 @@ class CheckForTransAdd(BaseASTChecker):
super(CheckForTransAdd, self).generic_visit(node) 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): def factory(register):
register(validate_log_translations) register(validate_log_translations)
register(check_explicit_underscore_import) register(check_explicit_underscore_import)
register(no_translate_debug_logs) register(no_translate_debug_logs)
register(CheckForStrExc) register(CheckForStrExc)
register(CheckForTransAdd) register(CheckForTransAdd)
register(check_oslo_namespace_imports)

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' DOMAIN = 'manila'
_translators = i18n.TranslatorFactory(domain=DOMAIN) _translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
# The primary translation function using the well-known name "_" # The primary translation function using the well-known name "_"
_ = _translators.primary _ = _translators.primary
@ -39,12 +39,12 @@ _LC = _translators.log_critical
def enable_lazy(): def enable_lazy():
return i18n.enable_lazy() return oslo_i18n.enable_lazy()
def translate(value, user_locale): def translate(value, user_locale):
return i18n.translate(value, user_locale) return oslo_i18n.translate(value, user_locale)
def get_available_languages(): def get_available_languages():
return i18n.get_available_languages(DOMAIN) return oslo_i18n.get_available_languages(DOMAIN)

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 import six
from manila.db import base from manila.db import base

View File

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

View File

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

View File

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

View File

@ -18,9 +18,9 @@
import datetime import datetime
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import importutils from oslo_utils import importutils
from oslo.utils import timeutils from oslo_utils import timeutils
import six import six
from manila import db from manila import db

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,9 +19,9 @@
Scheduler Service Scheduler Service
""" """
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import excutils from oslo_utils import excutils
from oslo.utils import importutils from oslo_utils import importutils
from manila import context from manila import context
from manila import db from manila import db

View File

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

View File

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

View File

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

View File

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

View File

@ -27,9 +27,9 @@ import time
import eventlet import eventlet
import greenlet import greenlet
from oslo.config import cfg
from oslo import messaging 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 context
from manila import db from manila import db

View File

@ -16,7 +16,7 @@
# Importing full names to not pollute the namespace and cause possible # Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from manila.share import <foo>' elsewhere. # 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 from manila.common import config

View File

@ -18,9 +18,9 @@
Handles all requests relating to shares. Handles all requests relating to shares.
""" """
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import excutils from oslo_utils import excutils
from oslo.utils import timeutils from oslo_utils import timeutils
import six import six
from manila.api import extensions from manila.api import extensions

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. 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 from manila.openstack.common import log as logging

View File

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

View File

@ -20,7 +20,7 @@ backend. Use the Manila configuration variable "share_backend_name"
to specify, which backend plugins to use. 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.openstack.common import log
from manila.share import driver from manila.share import driver

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,9 +16,9 @@
"""Huawei Nas Driver for Huawei OceanStor V3 storage arrays.""" """Huawei Nas Driver for Huawei OceanStor V3 storage arrays."""
import time import time
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import excutils from oslo_utils import excutils
from oslo.utils import units from oslo_utils import units
from manila import exception from manila import exception
from manila.i18n import _, _LI, _LW from manila.i18n import _, _LI, _LW

View File

@ -36,11 +36,11 @@ import pipes
import re import re
import socket 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_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 import six
from manila import exception from manila import exception

View File

@ -24,9 +24,9 @@ import copy
import hashlib import hashlib
import re import re
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import excutils from oslo_utils import excutils
from oslo.utils import units from oslo_utils import units
import six import six
from manila import context from manila import context

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,10 +19,10 @@
:share_driver: Used by :class:`ShareManager`. :share_driver: Used by :class:`ShareManager`.
""" """
from oslo.config import cfg from oslo_config import cfg
from oslo.utils import excutils from oslo_utils import excutils
from oslo.utils import importutils from oslo_utils import importutils
from oslo.utils import timeutils from oslo_utils import timeutils
import six import six
from manila.common import constants from manila.common import constants

View File

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

View File

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

View File

@ -27,10 +27,10 @@ import uuid
import fixtures import fixtures
import mock 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.messaging import conffixture as messaging_conffixture
from oslo_concurrency import lockutils 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 oslotest.base as base_test
import six import six

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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.common import constants
from manila import context from manila import context

View File

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

View File

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

View File

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

View File

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

View File

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

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