Update Oslo imports to remove namespace package

Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d
Blueprint: drop-namespace-packages
This commit is contained in:
Doug Hellmann 2015-01-21 18:46:55 -05:00
parent db7371c3c2
commit ee31a84719
45 changed files with 77 additions and 75 deletions

View File

@ -21,7 +21,8 @@ import contextlib
import logging
import sys
from oslo.config import cfg
from oslo_config import cfg
from oslo_messaging._drivers import impl_zmq
from oslo_messaging._executors import base # FIXME(markmc)

View File

@ -27,10 +27,10 @@ import collections
import logging
import uuid
from oslo_config import cfg
from oslo_utils import strutils
import six
from oslo.config import cfg
from oslo.utils import strutils
from oslo_messaging._drivers import common as rpc_common
from oslo_messaging._drivers import pool

View File

@ -21,9 +21,9 @@ import sys
import time
import traceback
from oslo_serialization import jsonutils
import six
from oslo.serialization import jsonutils
import oslo_messaging
from oslo_messaging._i18n import _
from oslo_messaging import _utils as utils

View File

@ -20,12 +20,12 @@ import os
import random
import time
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import importutils
from oslo_utils import netutils
import six
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo.utils import netutils
from oslo_messaging._drivers import amqp as rpc_amqp
from oslo_messaging._drivers import amqpdriver
from oslo_messaging._drivers import common as rpc_common

View File

@ -26,11 +26,11 @@ import kombu.connection
import kombu.entity
import kombu.exceptions
import kombu.messaging
from oslo_config import cfg
from oslo_utils import netutils
import six
from six.moves.urllib import parse
from oslo.config import cfg
from oslo.utils import netutils
from oslo_messaging._drivers import amqp as rpc_amqp
from oslo_messaging._drivers import amqpdriver
from oslo_messaging._drivers import common as rpc_common

View File

@ -25,17 +25,17 @@ import uuid
import eventlet
import greenlet
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import excutils
from oslo_utils import importutils
import six
from six import moves
from oslo.config import cfg
from oslo_messaging._drivers import base
from oslo_messaging._drivers import common as rpc_common
from oslo_messaging._executors import base as executor_base # FIXME(markmc)
from oslo_messaging._i18n import _, _LE
from oslo.serialization import jsonutils
from oslo.utils import excutils
from oslo.utils import importutils
zmq = importutils.try_import('eventlet.green.zmq')

View File

@ -20,8 +20,8 @@ import contextlib
import logging
import eventlet
from oslo_config import cfg
from oslo.config import cfg
from oslo_messaging._i18n import _
matchmaker_opts = [

View File

@ -16,8 +16,9 @@ The MatchMaker classes should accept a Topic or Fanout exchange key and
return keys for direct exchanges, per (approximate) AMQP parlance.
"""
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
from oslo_messaging._drivers import matchmaker as mm_common
redis = importutils.try_import('redis')

View File

@ -20,7 +20,8 @@ import itertools
import json
import logging
from oslo.config import cfg
from oslo_config import cfg
from oslo_messaging._drivers import matchmaker as mm
from oslo_messaging._i18n import _

View File

@ -29,11 +29,11 @@ import logging
import threading
import uuid
from oslo_config import cfg
import proton
import pyngus
from six import moves
from oslo.config import cfg
from oslo_messaging._drivers.protocols.amqp import eventloop
from oslo_messaging._drivers.protocols.amqp import opts
from oslo_messaging import transport

View File

@ -25,10 +25,10 @@ import os
import threading
import time
from oslo_serialization import jsonutils
import proton
from six import moves
from oslo.serialization import jsonutils
import oslo_messaging
from oslo_messaging._drivers import base
from oslo_messaging._drivers import common

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

View File

@ -14,10 +14,9 @@
import abc
from oslo_config import cfg
import six
from oslo.config import cfg
_pool_opts = [
cfg.IntOpt('rpc_thread_pool_size',
default=64,

View File

@ -20,8 +20,8 @@ import eventlet
from eventlet.green import threading as greenthreading
from eventlet import greenpool
import greenlet
from oslo_utils import excutils
from oslo.utils import excutils
from oslo_messaging._executors import base
from oslo_messaging import localcontext

View File

@ -20,9 +20,9 @@ import sys
import threading
from concurrent import futures
from oslo_utils import excutils
import six
from oslo.utils import excutils
from oslo_messaging._executors import base

View File

@ -16,10 +16,10 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
"""
from oslo import i18n
import oslo_i18n
_translators = i18n.TranslatorFactory(domain='oslo.messaging')
_translators = oslo_i18n.TranslatorFactory(domain='oslo.messaging')
# The primary translation function using the well-known name "_"
_ = _translators.primary

View File

@ -17,7 +17,8 @@
import logging
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from oslo_messaging.notify import notifier

View File

@ -16,11 +16,11 @@
import fnmatch
import logging
from oslo_config import cfg
import six
from stevedore import dispatch
import yaml
from oslo.config import cfg
from oslo_messaging._i18n import _
from oslo_messaging.notify import notifier

View File

@ -40,7 +40,7 @@ and eventlet executors available.
A simple example of a notification listener with multiple endpoints might be::
from oslo.config import cfg
from oslo_config import cfg
import oslo_messaging
class NotificationEndpoint(object):

View File

@ -12,7 +12,7 @@
import logging
from oslo.config import cfg
from oslo_config import cfg
class LoggingErrorNotificationHandler(logging.Handler):

View File

@ -16,7 +16,8 @@ Driver for the Python logging package that sends log records as a notification.
"""
import logging
from oslo.config import cfg
from oslo_config import cfg
from oslo_messaging.notify import notifier
from oslo_messaging import transport

View File

@ -21,11 +21,11 @@ import os.path
import sys
import traceback as tb
from oslo_config import cfg
from oslo_middleware import base
import six
import webob.dec
from oslo.config import cfg
from oslo.middleware import base
import oslo_messaging
from oslo_messaging._i18n import _LE
from oslo_messaging import notify

View File

@ -19,11 +19,11 @@ import abc
import logging
import uuid
from oslo_config import cfg
from oslo_utils import timeutils
import six
from stevedore import named
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_messaging import serializer as msg_serializer
_notifier_opts = [
@ -104,7 +104,7 @@ class Notifier(object):
:param publisher_id: field in notifications sent, for example
'compute.host1'
:type publisher_id: str
:param driver: a driver to lookup from oslo.messaging.notify.drivers
:param driver: a driver to lookup from oslo_messaging.notify.drivers
:type driver: str
:param topic: the topic which to send messages on
:type topic: str

View File

@ -23,9 +23,9 @@ __all__ = [
'RemoteError',
]
from oslo_config import cfg
import six
from oslo.config import cfg
from oslo_messaging._drivers import base as driver_base
from oslo_messaging import _utils as utils
from oslo_messaging import exceptions

View File

@ -42,7 +42,7 @@ complete.
A simple example of an RPC server with multiple endpoints might be::
from oslo.config import cfg
from oslo_config import cfg
import oslo_messaging
class ServerControlEndpoint(object):

View File

@ -21,11 +21,11 @@ import uuid
import fixtures
import kombu
import mock
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslotest import mockpatch
import testscenarios
from oslo.config import cfg
from oslo.serialization import jsonutils
import oslo_messaging
from oslo_messaging._drivers import amqpdriver
from oslo_messaging._drivers import common as driver_common

View File

@ -18,9 +18,9 @@ import socket
import fixtures
import mock
from oslo_utils import importutils
import testtools
from oslo.utils import importutils
import oslo_messaging
from oslo_messaging.tests import utils as test_utils

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_utils import importutils
import testtools
from oslo.utils import importutils
from oslo_messaging.tests import utils as test_utils
# NOTE(jamespage) matchmaker tied directly to eventlet

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_utils import importutils
import testtools
from oslo.utils import importutils
from oslo_messaging.tests import utils as test_utils
redis = importutils.try_import('redis')

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_utils import importutils
import testtools
from oslo.utils import importutils
from oslo_messaging.tests import utils as test_utils
# NOTE(jamespage) matchmaker tied directly to eventlet

View File

@ -17,9 +17,9 @@ import time
import uuid
import fixtures
from oslo_config import cfg
from six import moves
from oslo.config import cfg
import oslo_messaging
from oslo_messaging.notify import notifier
from oslo_messaging.tests import utils as test_utils

View File

@ -16,9 +16,9 @@
import itertools
import mock
from oslo_utils import timeutils
import testscenarios
from oslo.utils import timeutils
import oslo_messaging
from oslo_messaging.notify import dispatcher as notify_dispatcher
from oslo_messaging.tests import utils as test_utils

View File

@ -17,9 +17,9 @@ import threading
import time
import mock
from oslo_config import cfg
import testscenarios
from oslo.config import cfg
import oslo_messaging
from oslo_messaging.notify import dispatcher
from oslo_messaging.tests import utils as test_utils

View File

@ -19,10 +19,10 @@ import os
import sys
import mock
from oslo_utils import timeutils
import testscenarios
import testtools
from oslo.utils import timeutils
import oslo_messaging
from oslo_messaging.tests.notify import test_notifier
from oslo_messaging.tests import utils as test_utils
@ -56,7 +56,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
# eventlet
logging.logThreads = 0
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_logger(self, mock_utcnow):
with mock.patch('oslo_messaging.transport.get_transport',
return_value=test_notifier._FakeTransport(self.conf)):
@ -99,7 +99,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
"Need logging.config.dictConfig (Python >= 2.7)")
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_logging_conf(self, mock_utcnow):
with mock.patch('oslo_messaging.transport.get_transport',
return_value=test_notifier._FakeTransport(self.conf)):

View File

@ -20,13 +20,13 @@ import uuid
import fixtures
import mock
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from stevedore import dispatch
from stevedore import extension
import testscenarios
import yaml
from oslo.serialization import jsonutils
from oslo.utils import timeutils
import oslo_messaging
from oslo_messaging.notify import _impl_log
from oslo_messaging.notify import _impl_messaging
@ -147,7 +147,7 @@ class TestMessagingNotifier(test_utils.BaseTestCase):
self.stubs.Set(_impl_messaging, 'LOG', self.logger)
self.stubs.Set(msg_notifier, '_LOG', self.logger)
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_notifier(self, mock_utcnow):
drivers = []
if self.v1:
@ -223,7 +223,7 @@ class TestSerializer(test_utils.BaseTestCase):
super(TestSerializer, self).setUp()
self.addCleanup(_impl_test.reset)
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_serializer(self, mock_utcnow):
transport = _FakeTransport(self.conf)
@ -266,7 +266,7 @@ class TestSerializer(test_utils.BaseTestCase):
class TestLogNotifier(test_utils.BaseTestCase):
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_notifier(self, mock_utcnow):
self.config(notification_driver=['log'])

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import testscenarios
from oslo.config import cfg
import oslo_messaging
from oslo_messaging import exceptions
from oslo_messaging import serializer as msg_serializer

View File

@ -16,9 +16,9 @@
import threading
import mock
from oslo_config import cfg
import testscenarios
from oslo.config import cfg
import oslo_messaging
from oslo_messaging.tests import utils as test_utils

View File

@ -20,10 +20,10 @@ import threading
import time
import uuid
from oslo_utils import importutils
from six import moves
import testtools
from oslo.utils import importutils
import oslo_messaging
from oslo_messaging.tests import utils as test_utils

View File

@ -15,10 +15,10 @@
import sys
from oslo_serialization import jsonutils
import six
import testscenarios
from oslo.serialization import jsonutils
import oslo_messaging
from oslo_messaging._drivers import common as exceptions
from oslo_messaging.tests import utils as test_utils

View File

@ -14,12 +14,12 @@
# under the License.
import fixtures
from oslo_config import cfg
import six
from six.moves import mox
from stevedore import driver
import testscenarios
from oslo.config import cfg
import oslo_messaging
from oslo_messaging.tests import utils as test_utils
from oslo_messaging import transport

View File

@ -19,12 +19,10 @@
"""Common utilities used in testing"""
import six
from oslo.config import cfg
from oslo_config import cfg
from oslotest import base
from oslotest import moxstubout
import six
TRUE_VALUES = ('true', '1', 'yes')

View File

@ -27,11 +27,11 @@ __all__ = [
'set_transport_defaults',
]
from oslo_config import cfg
import six
from six.moves.urllib import parse
from stevedore import driver
from oslo.config import cfg
from oslo_messaging import exceptions

View File

@ -16,11 +16,11 @@
import itertools
import mock
from oslo_utils import timeutils
import testscenarios
from oslo import messaging
from oslo.messaging.notify import dispatcher as notify_dispatcher
from oslo.utils import timeutils
from oslo_messaging.tests import utils as test_utils
load_tests = testscenarios.load_tests_apply_scenarios

View File

@ -19,11 +19,11 @@ import os
import sys
import mock
from oslo_utils import timeutils
import testscenarios
import testtools
from oslo import messaging
from oslo.utils import timeutils
import oslo_messaging
from oslo_messaging.tests.notify import test_notifier
from oslo_messaging.tests import utils as test_utils
@ -57,7 +57,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
# eventlet
logging.logThreads = 0
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_logger(self, mock_utcnow):
with mock.patch('oslo_messaging.transport.get_transport',
return_value=test_notifier._FakeTransport(self.conf)):
@ -100,7 +100,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
"Need logging.config.dictConfig (Python >= 2.7)")
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_logging_conf(self, mock_utcnow):
with mock.patch('oslo_messaging.transport.get_transport',
return_value=test_notifier._FakeTransport(self.conf)):

View File

@ -20,6 +20,8 @@ import uuid
import fixtures
import mock
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from stevedore import dispatch
from stevedore import extension
import testscenarios
@ -27,8 +29,6 @@ import yaml
from oslo import messaging
from oslo.messaging import serializer as msg_serializer
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_messaging.notify import _impl_log
from oslo_messaging.notify import _impl_messaging
from oslo_messaging.notify import _impl_test
@ -147,7 +147,7 @@ class TestMessagingNotifier(test_utils.BaseTestCase):
self.stubs.Set(_impl_messaging, 'LOG', self.logger)
self.stubs.Set(msg_notifier, '_LOG', self.logger)
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_notifier(self, mock_utcnow):
drivers = []
if self.v1:
@ -223,7 +223,7 @@ class TestSerializer(test_utils.BaseTestCase):
super(TestSerializer, self).setUp()
self.addCleanup(_impl_test.reset)
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_serializer(self, mock_utcnow):
transport = _FakeTransport(self.conf)
@ -266,7 +266,7 @@ class TestSerializer(test_utils.BaseTestCase):
class TestLogNotifier(test_utils.BaseTestCase):
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_notifier(self, mock_utcnow):
self.config(notification_driver=['log'])