oslo: migrate namespace-less import paths

This patch migrates oslo.messaging to oslo_messaging

Change-Id: I2c0befa48924c6641c8d3af96e7f35ff92e73e4c
Closes-bug: #1409733
changes/28/165028/2
liyingjun 8 years ago
parent cafbe9e69d
commit 927ac7cf14
  1. 8
      glance/notifier.py
  2. 6
      glance/tests/unit/test_notifier.py

@ -17,9 +17,9 @@
import abc
import glance_store
from oslo import messaging
from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging
from oslo_utils import excutils
from oslo_utils import timeutils
import six
@ -60,7 +60,7 @@ _ALIASES = {
def get_transport():
return messaging.get_transport(CONF, aliases=_ALIASES)
return oslo_messaging.get_transport(CONF, aliases=_ALIASES)
class Notifier(object):
@ -69,8 +69,8 @@ class Notifier(object):
def __init__(self):
publisher_id = CONF.default_publisher_id
self._transport = get_transport()
self._notifier = messaging.Notifier(self._transport,
publisher_id=publisher_id)
self._notifier = oslo_messaging.Notifier(self._transport,
publisher_id=publisher_id)
def warn(self, event_type, payload):
self._notifier.warn({}, event_type, payload)

@ -18,8 +18,8 @@ import datetime
import glance_store
import mock
from oslo import messaging
from oslo_config import cfg
import oslo_messaging
from oslo_utils import timeutils
import webob
@ -98,8 +98,8 @@ class TaskRepoStub(object):
class TestNotifier(utils.BaseTestCase):
@mock.patch.object(messaging, 'Notifier')
@mock.patch.object(messaging, 'get_transport')
@mock.patch.object(oslo_messaging, 'Notifier')
@mock.patch.object(oslo_messaging, 'get_transport')
def _test_load_strategy(self,
mock_get_transport, mock_notifier,
url, driver):

Loading…
Cancel
Save