oslo: migrate namespace-less import paths

This patch migrates oslo.messaging to oslo_messaging

Change-Id: I2c0befa48924c6641c8d3af96e7f35ff92e73e4c
Closes-bug: #1409733
This commit is contained in:
liyingjun 2015-03-17 19:14:27 +08:00
parent cafbe9e69d
commit 927ac7cf14
2 changed files with 7 additions and 7 deletions

View File

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

View File

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