diff options
author | liu-sheng <liusheng@huawei.com> | 2015-06-23 20:42:22 +0800 |
---|---|---|
committer | liu-sheng <liusheng@huawei.com> | 2015-06-24 16:52:21 +0800 |
commit | 3942c72dae57bcb54c4aec413e1bfae5d377447f (patch) | |
tree | 24473b87cda7e47122b246803a7f85fcf4e56689 /ceilometer/agent | |
parent | 1ffc1c4664656bc9637c3928a7254755648f215b (diff) | |
download | ceilometer-3942c72dae57bcb54c4aec413e1bfae5d377447f.tar.gz |
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
Diffstat (limited to 'ceilometer/agent')
-rw-r--r-- | ceilometer/agent/plugin_base.py | 13 |
1 files changed, 1 insertions, 12 deletions
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. |