Merge "oslo: migrate namespace-less import paths"
This commit is contained in:
commit
24b2e060f4
@ -17,9 +17,9 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
import glance_store
|
import glance_store
|
||||||
from oslo import messaging
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
import oslo_messaging
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
import six
|
import six
|
||||||
@ -60,7 +60,7 @@ _ALIASES = {
|
|||||||
|
|
||||||
|
|
||||||
def get_transport():
|
def get_transport():
|
||||||
return messaging.get_transport(CONF, aliases=_ALIASES)
|
return oslo_messaging.get_transport(CONF, aliases=_ALIASES)
|
||||||
|
|
||||||
|
|
||||||
class Notifier(object):
|
class Notifier(object):
|
||||||
@ -69,8 +69,8 @@ class Notifier(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
publisher_id = CONF.default_publisher_id
|
publisher_id = CONF.default_publisher_id
|
||||||
self._transport = get_transport()
|
self._transport = get_transport()
|
||||||
self._notifier = messaging.Notifier(self._transport,
|
self._notifier = oslo_messaging.Notifier(self._transport,
|
||||||
publisher_id=publisher_id)
|
publisher_id=publisher_id)
|
||||||
|
|
||||||
def warn(self, event_type, payload):
|
def warn(self, event_type, payload):
|
||||||
self._notifier.warn({}, event_type, payload)
|
self._notifier.warn({}, event_type, payload)
|
||||||
|
@ -18,8 +18,8 @@ import datetime
|
|||||||
|
|
||||||
import glance_store
|
import glance_store
|
||||||
import mock
|
import mock
|
||||||
from oslo import messaging
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
import oslo_messaging
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
@ -98,8 +98,8 @@ class TaskRepoStub(object):
|
|||||||
|
|
||||||
class TestNotifier(utils.BaseTestCase):
|
class TestNotifier(utils.BaseTestCase):
|
||||||
|
|
||||||
@mock.patch.object(messaging, 'Notifier')
|
@mock.patch.object(oslo_messaging, 'Notifier')
|
||||||
@mock.patch.object(messaging, 'get_transport')
|
@mock.patch.object(oslo_messaging, 'get_transport')
|
||||||
def _test_load_strategy(self,
|
def _test_load_strategy(self,
|
||||||
mock_get_transport, mock_notifier,
|
mock_get_transport, mock_notifier,
|
||||||
url, driver):
|
url, driver):
|
||||||
|
Loading…
Reference in New Issue
Block a user