Replace messaging.get_transport with get_rpc_transport
The get_transport method was deprecated in the oslo.messaging 5.24.2 release in favor of get_rpc_transport and get_notification_transport. We are already using get_notification_transport, we just need to change to use get_rpc_transport. Change-Id: I6fd8f4a23a15f93029edd2b13723266581fffe3f
This commit is contained in:
parent
7878fde9e5
commit
331e8e5fa2
|
@ -34,7 +34,7 @@ NOTIFIER = None
|
|||
|
||||
def init():
|
||||
global TRANSPORT, NOTIFIER
|
||||
TRANSPORT = messaging.get_transport(CONF)
|
||||
TRANSPORT = messaging.get_notification_transport(CONF)
|
||||
NOTIFIER = messaging.Notifier(TRANSPORT,
|
||||
publisher_id=CONF.notifications.publisher_id)
|
||||
|
||||
|
|
|
@ -37,8 +37,9 @@ class NotifierTestCase(tests.TestCase):
|
|||
# Fake Oslo notifier
|
||||
self.fake_notifier = self.patch(messaging, 'Notifier')
|
||||
self.fake_notifier.return_value = FakeNotifier()
|
||||
self.fake_transport = self.patch(messaging,
|
||||
'get_transport').return_value
|
||||
self.fake_transport = self.patch(
|
||||
messaging,
|
||||
'get_notification_transport').return_value
|
||||
|
||||
self.info_method = self.patch(FakeNotifier, 'info')
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class RPCClient(object):
|
|||
super(RPCClient, self).__init__()
|
||||
self._client = messaging.RPCClient(
|
||||
target=target,
|
||||
transport=messaging.get_transport(cfg.CONF),
|
||||
transport=messaging.get_rpc_transport(cfg.CONF),
|
||||
)
|
||||
|
||||
def cast(self, name, **kwargs):
|
||||
|
@ -50,7 +50,7 @@ class RPCServer(service.Service):
|
|||
super(RPCServer, self).__init__()
|
||||
self._server = messaging.get_rpc_server(
|
||||
target=target,
|
||||
transport=messaging.get_transport(cfg.CONF),
|
||||
transport=messaging.get_rpc_transport(cfg.CONF),
|
||||
endpoints=[ContextEndpointHandler(self, target)],
|
||||
executor='eventlet',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue