vitrage notifier param change

Change-Id: I72eb60b06c83dbac21b9155140f0b81dcbeb93ff
This commit is contained in:
Idan Hefetz 2018-02-28 13:18:37 +00:00
parent 5f5f11089d
commit 9d8022e552
5 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ class VitrageApiHandlerService(os_service.Service):
self.conf = conf
self.entity_graph = e_graph
self.notifier = VitrageNotifier(self.conf, "vitrage.api",
EVALUATOR_TOPIC)
[EVALUATOR_TOPIC])
self.db = storage.get_connection_from_config(conf)
def start(self):

View File

@ -32,7 +32,7 @@ class VitrageConsistencyService(os_service.Service):
self.conf = conf
self.entity_graph = entity_graph
self.actions_notifier = VitrageNotifier(
conf, 'vitrage_consistency', EVALUATOR_TOPIC)
conf, 'vitrage_consistency', [EVALUATOR_TOPIC])
def start(self):
LOG.info("Vitrage Consistency Service - Starting...")

View File

@ -84,7 +84,7 @@ class EvaluatorWorker(base.GraphCloneWorkerBase):
actions_callback = VitrageNotifier(
conf=self._conf,
publisher_id='vitrage_evaluator',
topic=EVALUATOR_TOPIC).notify
topics=[EVALUATOR_TOPIC]).notify
self._evaluator = ScenarioEvaluator(
self._conf,
self._entity_graph,

View File

@ -86,7 +86,7 @@ class TemplateLoaderWorker(base.GraphCloneWorkerBase):
actions_callback = VitrageNotifier(
conf=self._conf,
publisher_id='vitrage_evaluator',
topic=EVALUATOR_TOPIC).notify
topics=[EVALUATOR_TOPIC]).notify
self._evaluator = ScenarioEvaluator(
self._conf,
self._entity_graph,

View File

@ -65,13 +65,13 @@ def get_notification_listener(transport, targets, endpoints,
class VitrageNotifier(object):
"""Allows writing to message bus"""
def __init__(self, conf, publisher_id, topic):
def __init__(self, conf, publisher_id, topics):
transport = get_transport(conf)
self.notifier = oslo_msg.Notifier(
transport,
driver='messagingv2',
publisher_id=publisher_id,
topics=[topic])
topics=topics)
def notify(self, event_type, data):
LOG.debug('notify : ' + event_type + ' ' + str(data))