From a6008e6fb638a5b1a8a4f4002bc075bb0a4a218a Mon Sep 17 00:00:00 2001 From: Guoqiang Ding Date: Wed, 6 Dec 2017 13:09:10 +0800 Subject: [PATCH] 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 --- vitrage/datasources/collectd/collectd_vitrage/vitrageplugin.py | 2 +- vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vitrage/datasources/collectd/collectd_vitrage/vitrageplugin.py b/vitrage/datasources/collectd/collectd_vitrage/vitrageplugin.py index 92dc20a8a..7043a297f 100644 --- a/vitrage/datasources/collectd/collectd_vitrage/vitrageplugin.py +++ b/vitrage/datasources/collectd/collectd_vitrage/vitrageplugin.py @@ -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, diff --git a/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py b/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py index cf519b666..50a5e4da8 100644 --- a/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py +++ b/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py @@ -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,