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
This commit is contained in:
Davanum Srinivas
2015-12-02 23:43:34 -05:00
committed by Julien Danjou
parent b98c2dbd53
commit 155d4fa894
9 changed files with 22 additions and 22 deletions

View File

@@ -30,8 +30,7 @@ cfg.CONF.register_opts(OPTS)
class ComputeNotificationBase(plugin_base.NotificationBase):
@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
@@ -39,4 +38,4 @@ class ComputeNotificationBase(plugin_base.NotificationBase):
"""
return [oslo_messaging.Target(topic=topic,
exchange=conf.nova_control_exchange)
for topic in conf.notification_topics]
for topic in self.get_notification_topics(conf)]