Change parameter topic

Oslo.messaging has deprecated topic for long time and
used topics instead.

Change-Id: Ie7c96dcdf1418c63d55041dc30eb4befa2e04c83
This commit is contained in:
Hanxi Liu 2017-02-24 02:00:54 +08:00
parent 7d451e6113
commit 5d287b916d
5 changed files with 5 additions and 5 deletions

View File

@ -57,6 +57,6 @@ class EventApis(EntityGraphApisBase):
get_transport(self.conf),
driver='messagingv2',
publisher_id=self.publisher,
topic='vitrage_notifications')
topics=['vitrage_notifications'])
except Exception as e:
LOG.info('Failed to initialize oslo notifier %s', str(e))

View File

@ -54,7 +54,7 @@ class VitrageNotifier(CollectDPlugin):
self.notifier = messaging.Notifier(transport,
driver='messagingv2',
publisher_id='collectd',
topic='vitrage_notifications')
topics=['vitrage_notifications'])
self.add_notification_callback(self.notify)
def notify(self, notification):

View File

@ -74,7 +74,7 @@ def main():
notifier = messaging.Notifier(transport,
driver=driver,
publisher_id=publisher,
topic='vitrage_notifications')
topics=['vitrage_notifications'])
alarm_status = args.topic.lower()
event_type = '%s.%s' % (ZABBIX_EVENT_TYPE, alarm_status)

View File

@ -39,7 +39,7 @@ class GraphNotifier(object):
get_transport(conf),
driver='messagingv2',
publisher_id='vitrage.graph',
topic=topic)
topics=[topic])
except Exception as e:
LOG.info('Graph Notifier - missing configuration %s' % str(e))

View File

@ -64,7 +64,7 @@ class VitrageNotifier(object):
transport,
driver='messagingv2',
publisher_id=publisher_id,
topic=topic)
topics=[topic])
def notify(self, event_type, data):
LOG.debug('notify : ' + event_type + ' ' + str(data))