Update Oslo imports to remove namespace package
Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d Blueprint: drop-namespace-packages
This commit is contained in:
parent
db7371c3c2
commit
ee31a84719
|
@ -21,7 +21,8 @@ import contextlib
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from oslo_messaging._drivers import impl_zmq
|
from oslo_messaging._drivers import impl_zmq
|
||||||
from oslo_messaging._executors import base # FIXME(markmc)
|
from oslo_messaging._executors import base # FIXME(markmc)
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@ import collections
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_utils import strutils
|
||||||
import six
|
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 common as rpc_common
|
||||||
from oslo_messaging._drivers import pool
|
from oslo_messaging._drivers import pool
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,9 @@ import sys
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from oslo.serialization import jsonutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging._i18n import _
|
from oslo_messaging._i18n import _
|
||||||
from oslo_messaging import _utils as utils
|
from oslo_messaging import _utils as utils
|
||||||
|
|
|
@ -20,12 +20,12 @@ import os
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
|
from oslo_utils import importutils
|
||||||
|
from oslo_utils import netutils
|
||||||
import six
|
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 amqp as rpc_amqp
|
||||||
from oslo_messaging._drivers import amqpdriver
|
from oslo_messaging._drivers import amqpdriver
|
||||||
from oslo_messaging._drivers import common as rpc_common
|
from oslo_messaging._drivers import common as rpc_common
|
||||||
|
|
|
@ -26,11 +26,11 @@ import kombu.connection
|
||||||
import kombu.entity
|
import kombu.entity
|
||||||
import kombu.exceptions
|
import kombu.exceptions
|
||||||
import kombu.messaging
|
import kombu.messaging
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_utils import netutils
|
||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse
|
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 amqp as rpc_amqp
|
||||||
from oslo_messaging._drivers import amqpdriver
|
from oslo_messaging._drivers import amqpdriver
|
||||||
from oslo_messaging._drivers import common as rpc_common
|
from oslo_messaging._drivers import common as rpc_common
|
||||||
|
|
|
@ -25,17 +25,17 @@ import uuid
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
import greenlet
|
import greenlet
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
|
from oslo_utils import excutils
|
||||||
|
from oslo_utils import importutils
|
||||||
import six
|
import six
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging._drivers import base
|
from oslo_messaging._drivers import base
|
||||||
from oslo_messaging._drivers import common as rpc_common
|
from oslo_messaging._drivers import common as rpc_common
|
||||||
from oslo_messaging._executors import base as executor_base # FIXME(markmc)
|
from oslo_messaging._executors import base as executor_base # FIXME(markmc)
|
||||||
from oslo_messaging._i18n import _, _LE
|
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')
|
zmq = importutils.try_import('eventlet.green.zmq')
|
||||||
|
|
|
@ -20,8 +20,8 @@ import contextlib
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging._i18n import _
|
from oslo_messaging._i18n import _
|
||||||
|
|
||||||
matchmaker_opts = [
|
matchmaker_opts = [
|
||||||
|
|
|
@ -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.
|
return keys for direct exchanges, per (approximate) AMQP parlance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from oslo.utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from oslo_messaging._drivers import matchmaker as mm_common
|
from oslo_messaging._drivers import matchmaker as mm_common
|
||||||
|
|
||||||
redis = importutils.try_import('redis')
|
redis = importutils.try_import('redis')
|
||||||
|
|
|
@ -20,7 +20,8 @@ import itertools
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from oslo_messaging._drivers import matchmaker as mm
|
from oslo_messaging._drivers import matchmaker as mm
|
||||||
from oslo_messaging._i18n import _
|
from oslo_messaging._i18n import _
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ import logging
|
||||||
import threading
|
import threading
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
import proton
|
import proton
|
||||||
import pyngus
|
import pyngus
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging._drivers.protocols.amqp import eventloop
|
from oslo_messaging._drivers.protocols.amqp import eventloop
|
||||||
from oslo_messaging._drivers.protocols.amqp import opts
|
from oslo_messaging._drivers.protocols.amqp import opts
|
||||||
from oslo_messaging import transport
|
from oslo_messaging import transport
|
||||||
|
|
|
@ -25,10 +25,10 @@ import os
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
import proton
|
import proton
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from oslo.serialization import jsonutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging._drivers import base
|
from oslo_messaging._drivers import base
|
||||||
from oslo_messaging._drivers import common
|
from oslo_messaging._drivers import common
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
amqp1_opts = [
|
amqp1_opts = [
|
||||||
|
|
|
@ -14,10 +14,9 @@
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
|
|
||||||
_pool_opts = [
|
_pool_opts = [
|
||||||
cfg.IntOpt('rpc_thread_pool_size',
|
cfg.IntOpt('rpc_thread_pool_size',
|
||||||
default=64,
|
default=64,
|
||||||
|
|
|
@ -20,8 +20,8 @@ import eventlet
|
||||||
from eventlet.green import threading as greenthreading
|
from eventlet.green import threading as greenthreading
|
||||||
from eventlet import greenpool
|
from eventlet import greenpool
|
||||||
import greenlet
|
import greenlet
|
||||||
|
from oslo_utils import excutils
|
||||||
|
|
||||||
from oslo.utils import excutils
|
|
||||||
from oslo_messaging._executors import base
|
from oslo_messaging._executors import base
|
||||||
from oslo_messaging import localcontext
|
from oslo_messaging import localcontext
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,9 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from concurrent import futures
|
from concurrent import futures
|
||||||
|
from oslo_utils import excutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from oslo.utils import excutils
|
|
||||||
from oslo_messaging._executors import base
|
from oslo_messaging._executors import base
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from oslo_messaging.notify import notifier
|
from oslo_messaging.notify import notifier
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
from stevedore import dispatch
|
from stevedore import dispatch
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging._i18n import _
|
from oslo_messaging._i18n import _
|
||||||
from oslo_messaging.notify import notifier
|
from oslo_messaging.notify import notifier
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ and eventlet executors available.
|
||||||
|
|
||||||
A simple example of a notification listener with multiple endpoints might be::
|
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
|
import oslo_messaging
|
||||||
|
|
||||||
class NotificationEndpoint(object):
|
class NotificationEndpoint(object):
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
class LoggingErrorNotificationHandler(logging.Handler):
|
class LoggingErrorNotificationHandler(logging.Handler):
|
||||||
|
|
|
@ -16,7 +16,8 @@ Driver for the Python logging package that sends log records as a notification.
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from oslo_messaging.notify import notifier
|
from oslo_messaging.notify import notifier
|
||||||
from oslo_messaging import transport
|
from oslo_messaging import transport
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ import os.path
|
||||||
import sys
|
import sys
|
||||||
import traceback as tb
|
import traceback as tb
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_middleware import base
|
||||||
import six
|
import six
|
||||||
import webob.dec
|
import webob.dec
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.middleware import base
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging._i18n import _LE
|
from oslo_messaging._i18n import _LE
|
||||||
from oslo_messaging import notify
|
from oslo_messaging import notify
|
||||||
|
|
|
@ -19,11 +19,11 @@ import abc
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_utils import timeutils
|
||||||
import six
|
import six
|
||||||
from stevedore import named
|
from stevedore import named
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
|
||||||
from oslo_messaging import serializer as msg_serializer
|
from oslo_messaging import serializer as msg_serializer
|
||||||
|
|
||||||
_notifier_opts = [
|
_notifier_opts = [
|
||||||
|
@ -104,7 +104,7 @@ class Notifier(object):
|
||||||
:param publisher_id: field in notifications sent, for example
|
:param publisher_id: field in notifications sent, for example
|
||||||
'compute.host1'
|
'compute.host1'
|
||||||
:type publisher_id: str
|
: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
|
:type driver: str
|
||||||
:param topic: the topic which to send messages on
|
:param topic: the topic which to send messages on
|
||||||
:type topic: str
|
:type topic: str
|
||||||
|
|
|
@ -23,9 +23,9 @@ __all__ = [
|
||||||
'RemoteError',
|
'RemoteError',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging._drivers import base as driver_base
|
from oslo_messaging._drivers import base as driver_base
|
||||||
from oslo_messaging import _utils as utils
|
from oslo_messaging import _utils as utils
|
||||||
from oslo_messaging import exceptions
|
from oslo_messaging import exceptions
|
||||||
|
|
|
@ -42,7 +42,7 @@ complete.
|
||||||
|
|
||||||
A simple example of an RPC server with multiple endpoints might be::
|
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
|
import oslo_messaging
|
||||||
|
|
||||||
class ServerControlEndpoint(object):
|
class ServerControlEndpoint(object):
|
||||||
|
|
|
@ -21,11 +21,11 @@ import uuid
|
||||||
import fixtures
|
import fixtures
|
||||||
import kombu
|
import kombu
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
from oslotest import mockpatch
|
from oslotest import mockpatch
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging._drivers import amqpdriver
|
from oslo_messaging._drivers import amqpdriver
|
||||||
from oslo_messaging._drivers import common as driver_common
|
from oslo_messaging._drivers import common as driver_common
|
||||||
|
|
|
@ -18,9 +18,9 @@ import socket
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_utils import importutils
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import importutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
# 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 importutils
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import importutils
|
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
# NOTE(jamespage) matchmaker tied directly to eventlet
|
# NOTE(jamespage) matchmaker tied directly to eventlet
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
# 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 importutils
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import importutils
|
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
redis = importutils.try_import('redis')
|
redis = importutils.try_import('redis')
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
# 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 importutils
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import importutils
|
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
# NOTE(jamespage) matchmaker tied directly to eventlet
|
# NOTE(jamespage) matchmaker tied directly to eventlet
|
||||||
|
|
|
@ -17,9 +17,9 @@ import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
|
from oslo_config import cfg
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.notify import notifier
|
from oslo_messaging.notify import notifier
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_utils import timeutils
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.utils import timeutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.notify import dispatcher as notify_dispatcher
|
from oslo_messaging.notify import dispatcher as notify_dispatcher
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
|
@ -17,9 +17,9 @@ import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_config import cfg
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.notify import dispatcher
|
from oslo_messaging.notify import dispatcher
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
|
@ -19,10 +19,10 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_utils import timeutils
|
||||||
import testscenarios
|
import testscenarios
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import timeutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests.notify import test_notifier
|
from oslo_messaging.tests.notify import test_notifier
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
@ -56,7 +56,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||||
# eventlet
|
# eventlet
|
||||||
logging.logThreads = 0
|
logging.logThreads = 0
|
||||||
|
|
||||||
@mock.patch('oslo.utils.timeutils.utcnow')
|
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||||
def test_logger(self, mock_utcnow):
|
def test_logger(self, mock_utcnow):
|
||||||
with mock.patch('oslo_messaging.transport.get_transport',
|
with mock.patch('oslo_messaging.transport.get_transport',
|
||||||
return_value=test_notifier._FakeTransport(self.conf)):
|
return_value=test_notifier._FakeTransport(self.conf)):
|
||||||
|
@ -99,7 +99,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||||
|
|
||||||
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
||||||
"Need logging.config.dictConfig (Python >= 2.7)")
|
"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):
|
def test_logging_conf(self, mock_utcnow):
|
||||||
with mock.patch('oslo_messaging.transport.get_transport',
|
with mock.patch('oslo_messaging.transport.get_transport',
|
||||||
return_value=test_notifier._FakeTransport(self.conf)):
|
return_value=test_notifier._FakeTransport(self.conf)):
|
||||||
|
|
|
@ -20,13 +20,13 @@ import uuid
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
|
from oslo_utils import timeutils
|
||||||
from stevedore import dispatch
|
from stevedore import dispatch
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
import testscenarios
|
import testscenarios
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from oslo.serialization import jsonutils
|
|
||||||
from oslo.utils import timeutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.notify import _impl_log
|
from oslo_messaging.notify import _impl_log
|
||||||
from oslo_messaging.notify import _impl_messaging
|
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(_impl_messaging, 'LOG', self.logger)
|
||||||
self.stubs.Set(msg_notifier, '_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):
|
def test_notifier(self, mock_utcnow):
|
||||||
drivers = []
|
drivers = []
|
||||||
if self.v1:
|
if self.v1:
|
||||||
|
@ -223,7 +223,7 @@ class TestSerializer(test_utils.BaseTestCase):
|
||||||
super(TestSerializer, self).setUp()
|
super(TestSerializer, self).setUp()
|
||||||
self.addCleanup(_impl_test.reset)
|
self.addCleanup(_impl_test.reset)
|
||||||
|
|
||||||
@mock.patch('oslo.utils.timeutils.utcnow')
|
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||||
def test_serializer(self, mock_utcnow):
|
def test_serializer(self, mock_utcnow):
|
||||||
transport = _FakeTransport(self.conf)
|
transport = _FakeTransport(self.conf)
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ class TestSerializer(test_utils.BaseTestCase):
|
||||||
|
|
||||||
class TestLogNotifier(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):
|
def test_notifier(self, mock_utcnow):
|
||||||
self.config(notification_driver=['log'])
|
self.config(notification_driver=['log'])
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
# 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
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging import exceptions
|
from oslo_messaging import exceptions
|
||||||
from oslo_messaging import serializer as msg_serializer
|
from oslo_messaging import serializer as msg_serializer
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_config import cfg
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@ import threading
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from oslo_utils import importutils
|
||||||
from six import moves
|
from six import moves
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo.utils import importutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.serialization import jsonutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging._drivers import common as exceptions
|
from oslo_messaging._drivers import common as exceptions
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
from six.moves import mox
|
from six.moves import mox
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
from oslo_messaging import transport
|
from oslo_messaging import transport
|
||||||
|
|
|
@ -19,12 +19,10 @@
|
||||||
|
|
||||||
"""Common utilities used in testing"""
|
"""Common utilities used in testing"""
|
||||||
|
|
||||||
import six
|
from oslo_config import cfg
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
|
|
||||||
from oslotest import base
|
from oslotest import base
|
||||||
from oslotest import moxstubout
|
from oslotest import moxstubout
|
||||||
|
import six
|
||||||
|
|
||||||
TRUE_VALUES = ('true', '1', 'yes')
|
TRUE_VALUES = ('true', '1', 'yes')
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,11 @@ __all__ = [
|
||||||
'set_transport_defaults',
|
'set_transport_defaults',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse
|
from six.moves.urllib import parse
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_messaging import exceptions
|
from oslo_messaging import exceptions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_utils import timeutils
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.messaging.notify import dispatcher as notify_dispatcher
|
from oslo.messaging.notify import dispatcher as notify_dispatcher
|
||||||
from oslo.utils import timeutils
|
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
|
||||||
load_tests = testscenarios.load_tests_apply_scenarios
|
load_tests = testscenarios.load_tests_apply_scenarios
|
||||||
|
|
|
@ -19,11 +19,11 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_utils import timeutils
|
||||||
import testscenarios
|
import testscenarios
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.utils import timeutils
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_messaging.tests.notify import test_notifier
|
from oslo_messaging.tests.notify import test_notifier
|
||||||
from oslo_messaging.tests import utils as test_utils
|
from oslo_messaging.tests import utils as test_utils
|
||||||
|
@ -57,7 +57,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||||
# eventlet
|
# eventlet
|
||||||
logging.logThreads = 0
|
logging.logThreads = 0
|
||||||
|
|
||||||
@mock.patch('oslo.utils.timeutils.utcnow')
|
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||||
def test_logger(self, mock_utcnow):
|
def test_logger(self, mock_utcnow):
|
||||||
with mock.patch('oslo_messaging.transport.get_transport',
|
with mock.patch('oslo_messaging.transport.get_transport',
|
||||||
return_value=test_notifier._FakeTransport(self.conf)):
|
return_value=test_notifier._FakeTransport(self.conf)):
|
||||||
|
@ -100,7 +100,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||||
|
|
||||||
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
||||||
"Need logging.config.dictConfig (Python >= 2.7)")
|
"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):
|
def test_logging_conf(self, mock_utcnow):
|
||||||
with mock.patch('oslo_messaging.transport.get_transport',
|
with mock.patch('oslo_messaging.transport.get_transport',
|
||||||
return_value=test_notifier._FakeTransport(self.conf)):
|
return_value=test_notifier._FakeTransport(self.conf)):
|
||||||
|
|
|
@ -20,6 +20,8 @@ import uuid
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
import mock
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
|
from oslo_utils import timeutils
|
||||||
from stevedore import dispatch
|
from stevedore import dispatch
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
@ -27,8 +29,6 @@ import yaml
|
||||||
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.messaging import serializer as msg_serializer
|
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_log
|
||||||
from oslo_messaging.notify import _impl_messaging
|
from oslo_messaging.notify import _impl_messaging
|
||||||
from oslo_messaging.notify import _impl_test
|
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(_impl_messaging, 'LOG', self.logger)
|
||||||
self.stubs.Set(msg_notifier, '_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):
|
def test_notifier(self, mock_utcnow):
|
||||||
drivers = []
|
drivers = []
|
||||||
if self.v1:
|
if self.v1:
|
||||||
|
@ -223,7 +223,7 @@ class TestSerializer(test_utils.BaseTestCase):
|
||||||
super(TestSerializer, self).setUp()
|
super(TestSerializer, self).setUp()
|
||||||
self.addCleanup(_impl_test.reset)
|
self.addCleanup(_impl_test.reset)
|
||||||
|
|
||||||
@mock.patch('oslo.utils.timeutils.utcnow')
|
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||||
def test_serializer(self, mock_utcnow):
|
def test_serializer(self, mock_utcnow):
|
||||||
transport = _FakeTransport(self.conf)
|
transport = _FakeTransport(self.conf)
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ class TestSerializer(test_utils.BaseTestCase):
|
||||||
|
|
||||||
class TestLogNotifier(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):
|
def test_notifier(self, mock_utcnow):
|
||||||
self.config(notification_driver=['log'])
|
self.config(notification_driver=['log'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue