Remove deprecated oslo_messaging.get_transport
DeprecationWarning: Using function/method 'oslo_messaging.transport.get_transport()' is deprecated: use get_rpc_transport or get_notification_transport. Replace get_transport with get_rpc_transport. Change-Id: I13455842235a16463e61e5500c9e250a5cc9f86e
This commit is contained in:
@@ -53,11 +53,10 @@ JsonPayloadSerializer = messaging.JsonPayloadSerializer
|
|||||||
def init(conf):
|
def init(conf):
|
||||||
global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER
|
global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER
|
||||||
exmods = get_allowed_exmods()
|
exmods = get_allowed_exmods()
|
||||||
TRANSPORT = messaging.get_transport(conf,
|
TRANSPORT = messaging.get_rpc_transport(
|
||||||
allowed_remote_exmods=exmods)
|
conf, allowed_remote_exmods=exmods)
|
||||||
NOTIFICATION_TRANSPORT = messaging.get_notification_transport(
|
NOTIFICATION_TRANSPORT = messaging.get_notification_transport(
|
||||||
conf,
|
conf, allowed_remote_exmods=exmods)
|
||||||
allowed_remote_exmods=exmods)
|
|
||||||
|
|
||||||
serializer = RequestContextSerializer(JsonPayloadSerializer())
|
serializer = RequestContextSerializer(JsonPayloadSerializer())
|
||||||
if not conf.notification_level:
|
if not conf.notification_level:
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ class Service(service.ServiceBase):
|
|||||||
@property
|
@property
|
||||||
def transport(self):
|
def transport(self):
|
||||||
if self._transport is None:
|
if self._transport is None:
|
||||||
self._transport = om.get_transport(CONF)
|
self._transport = om.get_rpc_transport(CONF)
|
||||||
return self._transport
|
return self._transport
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user