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
This commit is contained in:
Ngo Quoc Cuong 2017-06-05 09:19:12 +07:00
parent 2ea460f044
commit ebdfbe8513
2 changed files with 2 additions and 2 deletions

View File

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

View File

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