Commit Graph

10 Commits

Author SHA1 Message Date
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
rajat29 92bfb5a0de Replacing six.iteritems() with .items()
We should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3* as well. And dict.items/keys will be more readable.

Change-Id: Ic532dc08e7712721e8be5eda83fc8fa2beb415e2
2017-04-04 16:24:44 +05:30
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
Tomasz Trębski 5de3ee9f23 Migrate tests to ostestr
Following commits migrates running
monasca-notification tests from nosetest
to ostestr, similar to other openstack projects.
Additionally, it enables calculating coverage
and py35 tests.

Extra:
* added debug environment with oslo_debug_helper

Change-Id: I555176b7f2ed54c3222312da341d433f429c5c6a
2017-01-19 06:15:40 +01: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 8f05261e6a Add in HP Copyrights
Change-Id: I54d8bb19e6cd44557cf4757bb1283c8b9821ba35
2016-01-27 12:56:23 -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