Commit Graph

11 Commits

Author SHA1 Message Date
Sean McGinnis db7377f476 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I380f25044c8f7b496d485aabf09215468f955818
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-23 10:29:22 +00:00
Joe Keen 1d680f1739 Make default notifiers pluggable
Erasing distinction between plugins that are an inherent part of the
notification engine and plugins that can be specified via the config file.
Fixing broken tests.

Story: 2003801
Task: 26532
Change-Id: I360cc2ad0782f209606706bf1869570fdae2260d
2019-01-17 11:58:45 +01:00
Tomasz Trębski e1a9b9a96a Integrate with oslo.conf and oslo.log
Change upgrades the monasca-notification to leverage
the capabilities of both oslo.log and oslo.conf:

- configuration of logging separated from application settings
- ability to enforce data types for application settings
- ability to use oslo.config-generator capabilities
- automatic configuration parsing done by oslo.cfg

That change will bring it closer to the rest of monasca
components where such transition has happened already.
However, in the rest of monasca, oslo.cfg was partially
or fully implemented whereas monasca-notification has
been relying on YAML based configuration file.

Therefore backward compatybility for such format will
be kept for now.

Story: 2000959
Task: 4093
Task: 4092

Change-Id: Ia75c3b60d0fada854178f21ca5ccb9e6a880f37f
2017-10-20 09:32:11 +02:00
Artur Basiak eb6a5a487b Remove plugins from possible notifiers
Remove plugins keyword from possible notifiers. Monasca notification
was throwing a warning: "No notifiers found for plugins" if
plugins section was defined in notification_types.

Change-Id: I7ccacba0624322bf912bbb088ed7c993ed32db02
2017-01-24 06:46:12 +01:00
Cao Xuan Hoang 69f4c2b8e3 Clean imports in code
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: I3c5c7368fb006f3691d07cef9557c20a42cc5b76
2016-10-06 15:27:06 +07:00
Michael James Hoppal 063c4f1d1d Query database to see if the periodic notificiation changes
Also added notification id to notification object we construct in the
alarm processor

Change-Id: I6ccfffc9102bec8f670df13268e244cb0c998950
2016-08-29 15:11:20 -06:00
haali1 be6fb21e19 Add HipChat and Slack Notification types
This patch
   1. Supports for loading new notification types as plugins.
   2) Adds new plugins for HipChat and Slack
   3) Insert Notification types during startup

Partially-implements: blueprint notification-engine-plugin
Change-Id: I246ced3fe22a9797a3c8384f7bda166797cfac3a
2016-07-29 07:59:32 -07:00
Michael James Hoppal 79189ca811 Adding support for periodic notifications
New periodic notification engine that will take a notification send it, and then
place it back onto the periodic notification topic. Once the alarm associated
with the notification has transitioned to a state that is different from the
original state the notification is removed from the queue.

Change-Id: Ie3103a0ec30abcd8dfc53869b1c3135953aabf3a
2016-05-09 08:18:11 -06:00
Ryan Brandt 97a401027a Change email notification format
Add severity to the subject line
Add up to 10 unique dimension sets in body
Add link and lifecycle state to email body

Change-Id: I85e2e9f2382c6ebadde072967e098e8109f65bfe
2016-01-29 16:42:56 -07:00
Joe Keen 9f0e65028f Added retry engine to notification system
Change-Id: Iea1a05c1b7336b9e3e8aeb972e0f9ba1b7f74d69
2015-02-09 11:40:02 -07:00
Joe Keen ebc1ed72d6 Refactored notification engine types
Added more test coverage for email notifications.

Moved notification methods from notification_processor to new types directory.

types/interface.py now automatically records statsd information for configured
types.

Configuration for a type is now optional.  Uncofigured types are not able to
send notifications.  Notifications that come across for unconfigured types
generate a warning.

Email notification type now explicity exits when unable to connect to an SMTP
server.

Change-Id: I213d815965761736eb3680b5e14206ba7bef7e90
2015-01-21 10:07:00 -07:00