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:
parent
2afc370b4c
commit
84f045c20c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user