The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Remove hacking and friends from lower-constraints, they are not needed
there at all.
Align lower-constraints for new pip [1]
Fix flake8 E305 and E117 and set W504 as ignored
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html
Change-Id: Idae87291f4556eee77d40ab49f0d151435d70875
We change the default value of kafka.legacy_kafka_client_enabled from
True to False. The use of new Confluent Kafka client is recommended.
Change-Id: Ie6a15474ebc1f04b8555ee44d413c19ee26a9227
Story: 2007924
Task: 40339
This was marked for removal after the Pike release.
Updating Docker file is leftover and will done in a separate change.
Story: 2003180
Task: 23326
Change-Id: I583eab7b3ea2efd5d9bcd3ef433e68b49684e343
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
YAML configuration support has been deprecated and will be removed. We
don't need this option for starting the service.
Depends-On: https://review.opendev.org/709389
Change-Id: I6d473d54a97abfb91e73c0e47cd7536639bb14e2
Story: 2007318
Task: 38827
In some cases, users may want to send periodic notifications for
notification types other than webhooks.
Story: 2006837
Task: 37412
Change-Id: Icd1b12f4b1e452f8285b8402f49815dd7f72b1ea
- Removes the hard-coded magic number of 60 seconds allowing users to
choose the period that they require.
- Standardise on strings for DictOpt dict keys. When loaded from a config
file, the DictOpt keys are parsed as strings, which was conflicting with
the default integer dict keys. This caused the periodic engine to silently
fail to load when configured via a config file.
- Remove unused variable
Story: 2006783
Task: 37313
Change-Id: Ibd61c45fc1ade37022150d34a5b00c56fdf69814
There can be lot of possibility for IPv6 address with port,
for example [::1]:80 or [2001:db8:85a3::8a2e:370]:7334.
Parsing that in more standard way is provided by oslo_uilts.netutils
parse_host_port() method[1].
Story: #2006309
Task: #36030
[1] 1b8bafb391/oslo_utils/netutils.py (L37)
Change-Id: Ie7a3bd3074c02430c754deaebfde6d174563b31e
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
Pyhton version below 3.6,function json.loads() throw decoder error.
3.6 version input option can bytes or bytearray,below 3.6 version
type of bytes not cimpatible.
Task: 35991
Story: 2006285
Change-Id: Ib1dba51a57fdce028a6b20da06201f0597085047
In the past email, pagerduty and webhook notification plugins had been
hard coded and always enabled. This situation is still reflected in the
deprecated YAML configuration file [1]. These notification method types
are also expected by tempest tests.
This change sets email, pagerduty and webhook as the default list of
enabled notifiers. This corresponds to the old behavior and testing but
can be easily modified by overwriting the list in the configuration
file.
[1] https://opendev.org/openstack/monasca-api/src/branch/master/devstack/files/monasca-notification/notification.yaml#L51-L54
Change-Id: Icb91feaf7821fe014542350125c5011bab530103
Story: 2000959
Task: 35644
Bandit B105 hardcoded_password_string[1] is causing gate failure,
which is false positive.
Added a # nosec comment to skip Bandit testing of that line.
[1] https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html
Add local bindep.txt to include PostgreSQL dependendencies for testing.
Story: 2006058
Task: 34771
Change-Id: I579754a0e093e192366ad2783bd766473227e761
The 'insert_configured_plugins' function occasionally gets into an infinite loop.
This patch ensures the loop fails properly after max_retries is met.
Story: 2005540
Task: 30680
Change-Id: I99d7750fac6d0355d182df1612c6a5abbbad7fc6
Inconsistent naming of plugins can cause an import error. This
commit standardises the naming so that all imports are parsed
correctly.
Story: 2005545
Task: 30689
Change-Id: Ife27fed83d28d47cc99ee07c4a8c0c4dac32c2da
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
The Jira module is now available in global-requirements:
https://review.openstack.org/#/c/562151/
Since the Jira module is now loaded by default, it always
needs to be installed. If a future change prevents loading
of the Jira module unless the Jira plugin is enabled then
this change can be reverted.
Change-Id: I3fea82e681cd49aab5cd6afc29c60302af7b63b7
Story: 2005400
Task: 30394
notification.conf is the deprecated path for the configuration file.
The new path is /etc/monasca/monasca-notification.conf .
Note: devstack is still using the deprecated configuration file. This
will be change in another changeset (against openstack/monasca-api).
Change-Id: I9ef1d7149308893544ad4d6fef4f3281da676171
Story: 2004862
Task: 29103
Successfully parses configuration options for enabled notifiers.
IMPORTANT: This requires the built-in notifiers be "enabled"
in the configuration.
This patch is compliant with `https://review.openstack.org/#/c/435136/`
that in summary makes every notifier pluggable as apposed distinguished
built-in and pluggable notifiers.
Change-Id: I818212344268de5e90e72c5493a8632476ba254b
Story: #2003794
Task: #26507
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
This commit adds functionality of sending webhook notifications to
various projects that require keystone authentications. For which user
need to set auth credentials in conf under keystone header.
By default it is disabled, which can be enabled in conf.
Change-Id: I3e773af8c3ebe0cf1d57e8fa1351b1e725a9cfa0
Partially-Implements: blueprint add-monasca-push-driver
Story: 2003105
Task: 23220
* 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
Georgia-Anna Farmaki found the import of logging.config to be
required. I see the same thing while testing. I should have
tested instead of just inspecting this code when I approved
Ibd2f64f464af1f501d45c43c0f438f5c74027f6c.
Change-Id: If73576882cf29588d6a4b395b04b3168ff2b84ea
Retrieve the grafana_url field from notification.yaml
and append the query for metric info and timestamp.
Unit tests for method get_link_url,
adjust existing unit tests, python3 tests.
Change-Id: Ie0e98f3df48eb68caad232e5b9293222d7c946c8
Story: 2001052
Task: 4652
Add adjustments:
- read configuration file in binary mode
- remove extra encoding
- check if string is binary class and convert it to
standard string
Change-Id: I5f73b6b0e8b5592539e07fe66debf917540ce24c
Story: 2001124
Task: 4816
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