Updated the OpenStack plugins 83/2183/1
authorHelena McGough <helena.mcgough@intel.com>
Fri, 15 Sep 2017 15:32:48 +0000 (16:32 +0100)
committerHelena McGough <helena.mcgough@intel.com>
Fri, 15 Sep 2017 16:06:12 +0000 (17:06 +0100)
 - Updated the alarm notifier instance

Signed-off-by: Helena McGough <helena.mcgough@intel.com>
core/__init__.py [new file with mode: 0644]
core/message_bus/__init__.py [new file with mode: 0644]
plugins/OpenStack/Aodh/notifier.py
plugins/OpenStack/Aodh/plugin_instance.py
plugins/OpenStack/Gnocchi/plugin_instance.py

diff --git a/core/__init__.py b/core/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/core/message_bus/__init__.py b/core/message_bus/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
index bd36f18..2068f03 100644 (file)
@@ -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."""
index 5b8bbd0..847d44b 100644 (file)
 """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):
index 40dc251..8e4296f 100644 (file)
 """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