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:
Vu Cong Tuan 2017-06-06 13:19:13 +07:00
parent 2d39957057
commit df6b22212a
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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