Replace deprecated oslo.messaging.get_transport with get_notification_transport

DeprecationWarning: Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport

Change-Id: If985e18fabaf99173844601057e5a8f0a1191721
This commit is contained in:
Ngo Quoc Cuong 2017-06-02 08:12:34 +07:00
parent 2afc370b4c
commit 84f045c20c

View File

@ -46,9 +46,10 @@ def setup(conf, binary, host):
backend_type = parsed_connection.scheme
if backend_type == "messaging":
import oslo_messaging
_notifier = notifier.create(backend_uri, oslo_messaging, {},
oslo_messaging.get_transport(conf),
"Zaqar", binary, host)
_notifier = notifier.create(
backend_uri, oslo_messaging, {},
oslo_messaging.get_notification_transport(conf),
"Zaqar", binary, host)
else:
_notifier = notifier.create(backend_uri, project="Zaqar",
service=binary, host=host)