From 3942c72dae57bcb54c4aec413e1bfae5d377447f Mon Sep 17 00:00:00 2001 From: liu-sheng Date: Tue, 23 Jun 2015 20:42:22 +0800 Subject: Remove the unused get_targets method of plugin base As marked in TODO list, the get_targets method need to be removed in J+2, This change do: * Remove the get_targets method and relevant test * Add a test for info method of plugin base Change-Id: Id4274593ad81b397dd6fcf99737fd349e72ed773 --- ceilometer/agent/plugin_base.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'ceilometer/agent') diff --git a/ceilometer/agent/plugin_base.py b/ceilometer/agent/plugin_base.py index c731b555..814f1862 100644 --- a/ceilometer/agent/plugin_base.py +++ b/ceilometer/agent/plugin_base.py @@ -104,6 +104,7 @@ class NotificationBase(PluginBase): Strings are defining the event types to be given to this plugin. """ + @abc.abstractmethod def get_targets(self, conf): """Return a sequence of oslo.messaging.Target. @@ -112,18 +113,6 @@ class NotificationBase(PluginBase): :param conf: Configuration. """ - # TODO(sileht): Backwards compatibility, remove in J+2 - if hasattr(self, 'get_exchange_topics'): - LOG.warn(_('get_exchange_topics API of NotificationPlugin is' - 'deprecated, implements get_targets instead.')) - - targets = [] - for exchange, topics in self.get_exchange_topics(conf): - targets.extend(oslo_messaging.Target(topic=topic, - exchange=exchange) - for topic in topics) - return targets - @abc.abstractmethod def process_notification(self, message): """Return a sequence of Counter instances for the given message. -- cgit v1.2.1