From cd317485eedd8ceafe721dbb4c34d67921b3950c Mon Sep 17 00:00:00 2001 From: Helena McGough Date: Fri, 15 Sep 2017 16:32:48 +0100 Subject: [PATCH] Updated the OpenStack plugins - Updated the alarm notifier instance Signed-off-by: Helena McGough --- core/__init__.py | 0 core/message_bus/__init__.py | 0 plugins/OpenStack/Aodh/notifier.py | 2 +- plugins/OpenStack/Aodh/plugin_instance.py | 6 ------ plugins/OpenStack/Gnocchi/plugin_instance.py | 5 ----- 5 files changed, 1 insertion(+), 12 deletions(-) create mode 100644 core/__init__.py create mode 100644 core/message_bus/__init__.py 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 -- 2.25.1