diff options
author | Davanum Srinivas <davanum@gmail.com> | 2015-12-02 23:43:34 -0500 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2015-12-07 14:06:25 +0100 |
commit | 155d4fa894ea07264c03db73ba0828d3b96de1ae (patch) | |
tree | 0697fafb307fb6adefd9aaf8018835b0136a840f /ceilometer/middleware.py | |
parent | b98c2dbd530e96accfbb6bacab608bf22699a15c (diff) | |
download | ceilometer-155d4fa894ea07264c03db73ba0828d3b96de1ae.tar.gz |
oslo.messaging option group/name change for notification topics
In Ib51e2839f9035d0cc0e3f459939d9f9003a8c810, oslo.messaging
is introducing a new group for the notifiction options. This
review is the minimum needed to support both old and
newer oslo.messaging versions. (In other words, next
oslo.messaging release will break ceilometer unless we
work around for the new option group)
Change-Id: I4765b3b9627983a245aa5521a85ad89e83ab8551
Diffstat (limited to 'ceilometer/middleware.py')
-rw-r--r-- | ceilometer/middleware.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ceilometer/middleware.py b/ceilometer/middleware.py index 8fa9456a..3901c3e2 100644 --- a/ceilometer/middleware.py +++ b/ceilometer/middleware.py @@ -44,15 +44,14 @@ class HTTPRequest(plugin_base.NotificationBase, plugin_base.NonMetricNotificationBase): event_types = ['http.request'] - @staticmethod - def get_targets(conf): + def get_targets(self, conf): """Return a sequence of oslo_messaging.Target This sequence is defining the exchange and topics to be connected for this plugin. """ return [oslo_messaging.Target(topic=topic, exchange=exchange) - for topic in conf.notification_topics + for topic in self.get_notification_topics(conf) for exchange in conf.http_control_exchanges] def process_notification(self, message): |