diff options
author | Darren Hague <d.hague@sap.com> | 2017-03-10 10:38:41 +0000 |
---|---|---|
committer | Darren Hague <d.hague@sap.com> | 2017-03-10 15:39:27 +0000 |
commit | 379f10fc739358b85b031761fad7d9cd2658af77 (patch) | |
tree | e5639d191e006c8acdb5baa2669747ce3262b951 /ceilometer/messaging.py | |
parent | f11ec8d8762051e0692090ae091828a7344ac91c (diff) | |
download | ceilometer-379f10fc739358b85b031761fad7d9cd2658af77.tar.gz |
Bugfix: use transport_url from [oslo_messaging_notifications] if present
According to https://docs.openstack.org/developer/oslo.messaging/opts.html#oslo-messaging-notifications
a transport_url defined in [oslo_messaging_notifications] should be used, if
present. In Ceilometer, this is ignored in favour of the transport_url defined
in [DEFAULT], which is a bug. This change fixes the bug.
Change-Id: I12a559ebbbc1edd18c6833943bb5e9af7adf4666
Diffstat (limited to 'ceilometer/messaging.py')
-rw-r--r-- | ceilometer/messaging.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ceilometer/messaging.py b/ceilometer/messaging.py index 8f8211be..8c147314 100644 --- a/ceilometer/messaging.py +++ b/ceilometer/messaging.py @@ -14,6 +14,7 @@ # under the License. import oslo_messaging +from oslo_messaging.notify import notifier from oslo_messaging import serializer as oslo_serializer DEFAULT_URL = "__default__" @@ -31,7 +32,7 @@ def get_transport(conf, url=None, optional=False, cache=True): transport = TRANSPORTS.get(cache_key) if not transport or not cache: try: - transport = oslo_messaging.get_transport(conf, url) + transport = notifier.get_notification_transport(conf, url) except (oslo_messaging.InvalidTransportURL, oslo_messaging.DriverLoadFailure): if not optional or url: |