# yardstick comment: this is a modified copy of
# ceilometer/ceilometer/dispatcher/__init__.py
+from __future__ import absolute_import
import abc
import six
@staticmethod
def get_cls(dispatcher_type):
- '''Return class of specified type.'''
+ """Return class of specified type."""
for dispatcher in utils.itersubclasses(Base):
if dispatcher_type == dispatcher.__dispatcher_type__:
return dispatcher
def get(config):
"""Returns instance of a dispatcher for dispatcher type.
"""
- return Base.get_cls(config["type"])(config)
+ list_dispatcher = \
+ [Base.get_cls(out_type.capitalize())(config)
+ for out_type in config['DEFAULT']['dispatcher']]
- @abc.abstractmethod
- def record_result_data(self, data):
- """Recording result data interface."""
+ return list_dispatcher
@abc.abstractmethod
- def flush_result_data(self):
+ def flush_result_data(self, data):
"""Flush result data into permanent storage media interface."""