Fix the deprecated usage of "get_transport"

As log says, 'oslo_messaging.transport.get_transport()' is deprecated.
The reference link of oslo_messaging is at [1].

[1] https://review.openstack.org/#/c/454194/

Change-Id: Ib260641ee7082cb731ee143542fb2f5fde11c121
This commit is contained in:
Guoqiang Ding 2017-12-06 13:09:10 +08:00
parent c044180f00
commit a6008e6fb6
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class VitrageNotifier(CollectDPlugin):
"""Set up the Vitrage API client and add the notification callback. """
url = self.config['transport_url']
transport = messaging.get_transport(cfg.CONF, url)
transport = messaging.get_notification_transport(cfg.CONF, url)
self.notifier = messaging.Notifier(transport,
driver='messagingv2',
publisher_id=COLLECTD_DATASOURCE,

View File

@ -66,7 +66,7 @@ def main():
args.sendto, args.topic, args.body)
transport_url = args.sendto
transport = messaging.get_transport(cfg.CONF, transport_url)
transport = messaging.get_notification_transport(cfg.CONF, transport_url)
driver = 'messagingv2'
publisher = 'zabbix_%s' % socket.gethostname()
notifier = messaging.Notifier(transport,