Commit Graph

5 Commits

Author SHA1 Message Date
wangzihao 3b91b33784 Remove six
Remove all six usage.

Change-Id: Ib2f0f6cf3b7f5d9ec20440fb81b09c1c083c67b0
Story: 2008305
Task: 41295
2020-11-20 09:35:23 +00:00
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
Doug Szumski 39a906b8fb Templates for Slack notifications
This change adds an optional, user configurable template which
may be used to format the text contained in Slack notifications.

Story: 2001308
Task: 5859
Change-Id: Id936c3dc8b4f3e2430de20c8b69d0e703b1cf9ef
2019-05-02 09:49:42 +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
Koji Nakazono 4cfcf0803f Fix slack notification
This patch fixes 2 issues in slack notification.
First, incoming webhook supports the JSON request, however Slack
API to post a message to chat doesn't support JSON request.
Change to use "data" for posting a message to chat.
Second, incoming webhook returns the response as text.
Change to check the content type of response before parsing it.

Change-Id: Ic81cc1d99496774a16f91569022d5e4fe0aff795
Story: 2001041
Task: 4597
2017-07-25 15:17:19 +09:00