From: Helena McGough Date: Fri, 15 Sep 2017 15:32:48 +0000 (+0100) Subject: Updated the OpenStack plugins X-Git-Tag: v4.0.0~86^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=cd317485eedd8ceafe721dbb4c34d67921b3950c;p=osm%2FMON.git Updated the OpenStack plugins - Updated the alarm notifier instance Signed-off-by: Helena McGough --- diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/message_bus/__init__.py b/core/message_bus/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plugins/OpenStack/Aodh/notifier.py b/plugins/OpenStack/Aodh/notifier.py index bd36f18..2068f03 100644 --- a/plugins/OpenStack/Aodh/notifier.py +++ b/plugins/OpenStack/Aodh/notifier.py @@ -53,7 +53,7 @@ class Notifier(object): """Initialize alarm notifier.""" self._response = OpenStack_Response() - self._producer = KafkaProducer("alarm_response", None) + self._producer = KafkaProducer("alarm_response") def notify(self, alarming): """Send alarm notifications responses to the SO.""" diff --git a/plugins/OpenStack/Aodh/plugin_instance.py b/plugins/OpenStack/Aodh/plugin_instance.py index 5b8bbd0..847d44b 100644 --- a/plugins/OpenStack/Aodh/plugin_instance.py +++ b/plugins/OpenStack/Aodh/plugin_instance.py @@ -22,11 +22,6 @@ """Aodh plugin for the OSM monitoring module.""" import logging as log -# import sys - -# path = "/opt/stack/MON" -# if path not in sys.path: -# sys.path.append(path) from plugins.OpenStack.Aodh.alarming import Alarming from plugins.OpenStack.Aodh.notifier import Notifier @@ -45,7 +40,6 @@ def register_plugin(): instance = Plugin(config=config, notifier=notifier) instance.config() instance.alarm() - instance.notify() class Plugin(object): diff --git a/plugins/OpenStack/Gnocchi/plugin_instance.py b/plugins/OpenStack/Gnocchi/plugin_instance.py index 40dc251..8e4296f 100644 --- a/plugins/OpenStack/Gnocchi/plugin_instance.py +++ b/plugins/OpenStack/Gnocchi/plugin_instance.py @@ -22,11 +22,6 @@ """Gnocchi plugin for the OSM monitoring module.""" import logging as log -import sys - -path = "/root/MON" -if path not in sys.path: - sys.path.append(path) from plugins.OpenStack.Gnocchi.metrics import Metrics from plugins.OpenStack.settings import Config