Replace oslo.messaging.get_transport with get_notification_transport
DeprecationWarning: Using function/method 'oslo_messaging.get_transport()' is deprecated: use get_rpc_transport or get_notification_transport Change-Id: I797683cca360ec36feaaf4ee83aa72527605a2ed
This commit is contained in:
parent
2d39957057
commit
df6b22212a
|
@ -161,7 +161,7 @@ class ListenerService(os_service.Service):
|
|||
|
||||
def start(self):
|
||||
super(ListenerService, self).start()
|
||||
transport = oslo_messaging.get_transport(CONF)
|
||||
transport = oslo_messaging.get_notification_transport(CONF)
|
||||
targets = [
|
||||
oslo_messaging.Target(topic=pl_topic, exchange=pl_exchange)
|
||||
for pl_topic, pl_exchange in self.topics_exchanges_set
|
||||
|
|
|
@ -40,7 +40,7 @@ CONF.register_opts(notifier_opts)
|
|||
|
||||
|
||||
def get_transport():
|
||||
return oslo_messaging.get_transport(CONF)
|
||||
return oslo_messaging.get_notification_transport(CONF)
|
||||
|
||||
|
||||
class Notifier(object):
|
||||
|
|
|
@ -51,7 +51,7 @@ def main():
|
|||
exchange = sys.argv[1]
|
||||
pool = sys.argv[2] if len(sys.argv) > 2 else None
|
||||
|
||||
transport = oslo_messaging.get_transport(
|
||||
transport = oslo_messaging.get_notification_transport(
|
||||
cfg.CONF,
|
||||
url='rabbit://%s:%s@%s' % (username, password, host))
|
||||
targets = [oslo_messaging.Target(topic=topic, exchange=exchange)]
|
||||
|
|
Loading…
Reference in New Issue