From ebdfbe8513ae32d67f952c80dd9461d5b8258541 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Cuong Date: Mon, 5 Jun 2017 09:19:12 +0700 Subject: [PATCH] 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_notification_transport. Change-Id: I7282791cac28bea31daa78945ab2a4343d948f86 --- .../openstack/notification_listener/notification_listener.py | 2 +- valet/api/common/messaging.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/valet/openstack/notification_listener/notification_listener.py b/etc/valet/openstack/notification_listener/notification_listener.py index 764fd89..357da55 100644 --- a/etc/valet/openstack/notification_listener/notification_listener.py +++ b/etc/valet/openstack/notification_listener/notification_listener.py @@ -36,7 +36,7 @@ class NotificationEndpoint(object): """Error.""" None -transport = oslo_messaging.get_transport(cfg.CONF) +transport = oslo_messaging.get_notification_transport(cfg.CONF) targets = [oslo_messaging.Target(topic='notifications')] endpoints = [NotificationEndpoint()] diff --git a/valet/api/common/messaging.py b/valet/api/common/messaging.py index af2f743..999980b 100644 --- a/valet/api/common/messaging.py +++ b/valet/api/common/messaging.py @@ -23,7 +23,7 @@ from pecan import conf def _messaging_notifier_from_config(config): """Initialize the messaging engine based on supplied config.""" transport_url = config.get('transport_url') - transport = messaging.get_transport(cfg.CONF, transport_url) + transport = messaging.get_notification_transport(cfg.CONF, transport_url) notifier = messaging.Notifier(transport, driver='messaging', publisher_id='valet', topic='notifications', retry=10)