Refactored the Aodh notifier class
- Included alarm actions to send notification to SO
- Utilizes Aodh's webhook option for alarm_actions
- Included additional tests for this change
- Updated documentation
Change-Id: Ia3f2e2fa2ffee0cc66a80d5098d52b7da2be2dbe
Signed-off-by: Helena McGough <helena.mcgough@intel.com>
diff --git a/osm_mon/test/OpenStack/test_alarming.py b/osm_mon/test/OpenStack/test_alarming.py
index 557a93d..6570570 100644
--- a/osm_mon/test/OpenStack/test_alarming.py
+++ b/osm_mon/test/OpenStack/test_alarming.py
@@ -52,6 +52,8 @@
class TestAlarming(unittest.TestCase):
"""Tests for alarming class functions."""
+ maxDiff = None
+
def setUp(self):
"""Setup for tests."""
super(TestAlarming, self).setUp()
@@ -219,7 +221,8 @@
"resource_type": "generic"},
"severity": "low",
"state": "ok",
- "type": "gnocchi_resources_threshold"})
+ "type": "gnocchi_resources_threshold",
+ "alarm_actions": ["http://localhost:8662"]})
def test_check_valid_state_payload(self):
"""Test the check payload function for a valid payload with state."""
@@ -241,7 +244,8 @@
"resource_type": "generic"},
"severity": "low",
"state": "alarm",
- "type": "gnocchi_resources_threshold"})
+ "type": "gnocchi_resources_threshold",
+ "alarm_actions": ["http://localhost:8662"]})
def test_check_invalid_payload(self):
"""Test the check payload function for an invalid payload."""