- Support to new Falcon 3.0.0 and 3.0.1 keeping compatibility
for version 2.0.0
- Remove Falcon's class OptionalRepresentation
Starting from Falcon 3.0.0 version the class OptionalRepresentation
was removed. [1]
- Remove unnecessary URL slashes which are not compatible
with Falcon >= 3.0.0
- Keep facon.API instead of new falcon.App to keep support for
version 2.0.0
- Disable temporary docker-build and docker-publish Zuul jobs.
[1] https://falcon.readthedocs.io/en/stable/changes/3.0.0.html#breaking-changes
Change-Id: Ifb067429dd66fd350110187ac3a8b6a9977bad90
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.
Change-Id: I35d848e9af297d3561ea2838a4808166d1c36601
The change updates the imports to use simplejson library and
monasca_api.common.rest instead of monasca_common.rest, since
it was moved to this project during the API's merge.
Temporarily set following jobs as non-voting:
* monasca-tempest-python3-influxdb
* build-monasca-docker-image
* publish-monasca-api-docker-image
Change-Id: Ife3d2c9795a9dc406c2927cc9a077dda01c183c6
Story: 2007549
Task: 39389
In some cases, users may want to send periodic notifications for
notification types other than webhooks.
Story: 2006837
Task: 37417
Depends-On: https://review.opendev.org/#/c/694596
Change-Id: Ia2c50e623aa79e06d2d35df4735fb2805fbf40ed
When a large post (> 10s of MB) is made to the Monasca API an attempt
is made to write these metrics to the metrics topic in Kafka. However, due to
the large size of the write, this can fail with a number of obscure errors
which depend on exactly how much data is written. This change supports
splitting the post into chunks so that they can be written to Kafka in
sequence. A default has been chosen so that the maximum write to Kafka
should be comfortably under 1MB.
A future extension could support splitting the post by size, rather than the
number of measurements. A better time to look at this may be after the
Python Kafka library has been upgraded.
Story: 2006059
Task: 34772
Change-Id: I588a9bc0a19cd02ebfb8c0c1742896f208941396
At present, dimensions are not scoped by time window, which makes
dimension related queries to large databases timeout because it searches
all of time instead of a time window specified on the grafana app.
This commit implements the server side changes required to scope the
search query by the time window specified on the app.
Change-Id: Ia760c6789ac0063b8a25e52c9e0c3cc3b790ad2d
Story: 2005204
Task: 35790
This change copies the code from monasca-common used by the 3
monasca APIs into monasca-api for the Merge-APIs target.
After mergin the APIs the duplicated code can be removed from
monasca-common.
Change-Id: I52d36fad846637baf10516f5cbbedc541d4c2064
Story: 2003881
Task: 30427
This commit updates hacking version in test-requirements and
fixes some related pep8 issues
Change-Id: I67d85eb5bef72c38cc5360b5625d6b1c37adb40f
Story: 2004930
Task: 29315
Falcon 2.0.0 introduces some breaking changes. The relevant ones here are:
- falcon.testing.TestCase.api property was removed
- falcon.testing.TestBase class was removed
Additionally, the default behaviour for handling trailing slashes on
URIs also changed:
https://falcon.readthedocs.io/en/latest/user/faq.html#how-does-falcon-
handle-a-trailing-slash-in-the-request-path
This commit adds support for using the new release. It currently makes
no effort to be backwards compatible with older releases.
The change also updates the requirements for influxdb and sphinx
libraries to match global requirements.
Until monasca-log-api implementation is not updated to support the new
version of Falcon, `monascalog-python3-tempest` is marked to be
non-voting as agreed in the team meeting.
Story: 2005695
Task: 31015
Change-Id: I03bc8d502a333a7a71d9c12b8ddc7c5dc0a4f588
*future* library is not listed in global-requirements and should not be
used. This commit removes all its occurences and replaces with
oslo_utils.encodeutils module.
Change-Id: I5d0795a1a894c103422f7d63f5d76b29ea6d15a4
Story: 2003193
Task: 23360
Added policies and used policy enforcement engine
from monasca-common.
- Replaced security with oslo.policy
- Updated unit tests and implemented some new tests
- Added a new entry point for generating sample policy file by tox
story: 2001233
task: 6355
Change-Id: I4aa444fe6ec883160c03c201145c77994b6615f9
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
* Python 3 dict.values() returns iterator, must be converted to list
* use `u` prefix for unicode literals
* use builtins.str for handling unicode
* use oslo_serialisation for loading JSON objects
Can be tested with:
tox -e py35 -- -r monasca_api.tests.test_alarms.*
Story: 2001400
Task: 12580
Change-Id: I0cc7018f7d5efedb4937922b6daa2fb59b3d645c
* Update max line length to 100
* Clean up code for pep8 checks
Change-Id: Ibde2939831e6eeaab3db66fbc18255c71592bb41
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
This reverts commit 8781a256f0.
Since this only implements part of the silence / group / inhibit
feature, reverting until the rest is ready to go
Change-Id: Ied34507feb5d3580960c918254f905ab90d9691e
Support Cassandra db installation and Cassandra related
configurations for Monasca api and persister services
in devstack. Add Monasca rest API Cassandra plugin for
retrieving metric, dimension, measurement, statistics
and alarms.
Change-Id: Ie60d668692e1f25f555dda2355f4e513d582736c
story: 2001231
task: 5759
The new silence and inhibit rules will include tags on the alarm
that can be queried via the api. For more information and
documentation see: https://review.openstack.org/#/c/466403
Change-Id: I85b8bfc9338ee17709ec30aeb4b807b3bc12404e
Change migrates the monasca-api to use oslo-config-generator in
order to always build newest configuration file. That removes
the need of maintaning the file along with changes to oslo configuration.
The example of the file is also included in the documentation.
Also:
* ported case for launching api under WSGI and allowing the argument
parsing of oslo to take place
Story: 2000970
Task: 4865
Story: 2000964
Task: 4106
Change-Id: I57547b0e2122e40f58db5f949773900b76214526
Current on_patch and on_put for alarm definitions returns
"links":[
{"href": "http://localhost:8070/v2.0/alarm-definitions/
ca813286-453a-4b63-9b62-c4be0232db6c/ca813286-453a-4b63-9b6",
"rel": "self"}]
It has id on the link twice which is wrong.
Change-Id: Ida1d37a606cd03a0a9c043172c00adf15b6ac74c
Problem: Received HTTP 422 Unprocessible Entity when alarm definition
id is not specified in query instead of HTTP 400 Bad Request.
Solution: Modified on_delete(), on_patch(), and on_put() to return
HTTP 400 Bad Request.
Change-Id: I668d1f7cd257abbdf5d5d6b78552a152bd67aa60
Problem: Received HTTP 500 Internal Server Error when using DELETE in query
without specifying alarm definition id.
Solution: Modified on_delete() so that if alarm definition id
is not specified, query response will be HTTP 422 Unprocessible Entity.
Change-Id: Ie4518cb5a082211190f0364673944ecfca43948e
Problem:
Received HTTP 500 Internal Server Error when using PATCH or
PUT in query without specifying alarm definition id.
Solution:
Modified on_patch() and on_put() so that if alarm definition id
is not specified, query response will be HTTP 422 Unprocessible Entity.
Change-Id: I0a212f09cb76d1b4db6f129fe9ca94ec1fc274df
Provide new healtcheck endpoint to monasca-api.
Add simple check for HEAD and complex check for GET.
Complex check contains information about dependent
services like:
- kafka
- relational database (mariadb, postgresql)
- timeseries database (influxdb, cassandra)
Story: 2000974
Task: 4125
Change-Id: I863071194041a512b144262bbffce5024b97086b
Following replaces usage of standard
json with monasca-common rest layer.
Depends-On: I186abe4cdafd58d998f8aaf36d866795771a9e0a
Change-Id: I2f9d22a2c5e18826c8f9bb1e817ad963731b390f
It was failed that putting multibyte character into
alarm definition name and description by monascaclient.
There were some mistakes about treatment of utf8 encoding.
And mysql connection had no utf8 option, so mysql could not
handle multibyte character.
Change-Id: I8743f89fcc5d5efd4e50f440b76d78abc037e8e7
Monasca-Agent http_check plugin creates
dimensions which contain multiple colon:
url:http://192.168.10.4:5601
This bugfix makes it possible to query for
metrics with such dimensions. Until now an
exception was thrown.
Closes-Bug: 1668937
Change-Id: I39ed6fba99491630f6a7e0c67743b807e3529461
Use create_engine in oslo.db instead of the sqlalchemy one to get
the optimization benefit from oslo.db.
Breaking change would be replacing database.url with
database.connection therefore database.url will be still
supported until Pike is released. database.url
has been marked as deprecated option.
Change-Id: Id3cdafa791a7d2558a5b065022a9afc6ff31e004
Closes-bug: #1640419