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>
Additionally, temporarily set build-monasca-docker-image as non-voting
due to problems with buggy confluent-kafka 1.4.0 release, which prevents
building the Docker image.
Change-Id: I561ea633a09eb3d7468d2d55aa46d6fb3b2380ff
Story: 2007549
Task: 39390
* Set max line length to 100
* Clean up code for pep8 checks
Change-Id: Ie00dc204f522fb2112f02f4151ec8a15d5523459
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
In Python3, assertRegexpMatches & assertNotRegexpMatches
are deprecated in favor of assertRegex and assertNotRegex
Change-Id: I52b84fd49bed43902f0a57983710c0fb08649b12
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
Python3.5 tests were not running because Python3 has not
Queue module (instead have queue module). Commit
does not fix failing tests but gives an insight in what
exactly is failing and allows to fix them in future.
Also applied sixer utility to fix common Py2-Py3 compatybility
issues.
Additionally:
* removed unconstrained mysql and psycopg drivers from tox.ini.
Instead added them to test-requirements to be picked up
by requirements bot. That also allowed to remove 3 tox
environments.
* added removing .testrepository/times.dbm (may cause py3 environment
to fail if present)
Change-Id: I9bcc33dad80fdfbf60d95c4bb0ce7f79f642a414
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
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
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
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
This will ensure a unique timestamp. Influx V9 will only keep one
entry with the same timestamp
Some of the tests weren't using a numerica timestamp which caused
problems when the code tried to divide the timestamp by 1000
Change-Id: Ie0fefc61abe9a95503fa7611971a21ed2cb56224
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