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>
The change introduces the possibility to run the persister with the new
confluent-kafka client. It has to be enabled in the configuration file.
Story: 2003705
Task: 35858
Depends-On: https://review.opendev.org/675297
Change-Id: I8d9e173e9a252712fb285c0676c26334e1f677a7
* Set max line length to 100
* Clean up code for pep8 checks
Change-Id: Ie00dc204f522fb2112f02f4151ec8a15d5523459
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
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
Add new section to config file with configuration for statsd
host and port. Add modification in notification engines.
According to the monasca-agent change:
https://review.openstack.org/#/c/381417
Change-Id: I6e99bae5e50f3670ae8b4a0c7ac5af3c747bcd68
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
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
This is necessary in some installations to specify a non-default
mysql port (something other than 3306). All of the other monasca
packages allow overriding this in the config file, this change
brings monasca-notification inline with the others.
Change-Id: Ibe6ffca9e5adb13e44594531358e2a8e5da46b9d
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
We used sqlalchemy.core for execute query for orm.
The configuration of db is based on monasca-api.
The default mode is mysql connection so we can use old configuration.
Change-Id: Iebb4d6dfca6d43298ced407178e7f9673a83a7ca
The test 'test_old_timestamp' was not able to pass in different
timezones due to hardcoded expected datetime
Change `test_alarm_processor.py` permissions
`test_alarm_processor.py` had different permissions than other test
files. While `unittest` module could collect tests in this file,
nosetests could't do it. Nose can collect tests in this file after
permissions change
Change-Id: I2b5791e7b352fbb0c05bc665b4000c412b63f1ef
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
Squished the notification down to one process in preparation for making
multiple engine instances able to talk to the same topic.
Added HA capabilities to the KafkaConsumer object.
Change-Id: Id4799d690c7caf10ae7ba89c2d4e0aeb76c54375
Use alarmDefintionId instead of alarmId to find the right notificaion.
Further changes are needed to complete this change.
Change-Id: I577559fd085261f01a36355095fa1c04a72fb9c9
Removed manual tests which are no longer valid with a modern mini-mon
Removed debian creation bits all distribution is with pypi now
Minor pep8 fixes
Change-Id: I1f2fc4d0ad6375f4c39446f9627247945066e4ad