fix: change tox.ini
fix: change queries for list_dimension_names and list_dimension_values because of influxdb time filter problem
fix: remove build_sphinx group from setup.cfg
fix: handle hashlib security problem
Change-Id: I0d31a8db5ed71c70e7b878ce5e7940e041d0fa43
Change-Id: I6f7066da10e834550cbf0c053c7bf425ac0ead93
Change-Id: If9575aee73d600bbc84fcdf58deb1c57b508d9c2
Change-Id: If515eaeee7539da3ca49997e88785dc65572b334
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: I9f43416f6f1121b39518555ccaa2a4d5452fea91
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.
Change-Id: Iff271226c0a15d004a4a1fd14c86f6eb30a78e11
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore
Change-Id: I906bb9d9465d6e29686bb224c817c86ef7ec3822
In Train, we will use python 3.6 and 3.7 for python3 runtime
in our gate jobs [1]. This commit also adds python 3.7.
In Python3.7 async is a reserved keyword so replacing it with is_async.
[1] https://governance.openstack.org/tc/reference/runtimes/train.html
Change-Id: I05f40c4a9304cad551cefd4f10c3ba9a72d69a6f
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
Add a tool to run before upgrading a Monasca installation
that will check for potential issues and report on readiness to upgrade.
For Monasca, this initial version effectively does nothing, but gives a
framework for future checks to be included.
This is a community-wide story for Stein [1].
Story: 2003657
Task: 26142
[1] https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html
Change-Id: I799602caa4029d67f59307bf1ca0d1e8f254d415
This commit adds a schema management tool for the Monasca
configuration database. Apart from the usual OpenStack schema
management tool subcommands (stamp, upgrade, version) it has
two extra subcommands:
* fingerprint: for computing a SHA1 fingerprint of the
currently currently active database schema.
* detect-revision: for identifiying the Alembic revision
(if any) corresponding to a database
schema that was created with one of the
legacy SQL scripts.
The data provided by the detect-revision subcommand can be
used for stamping the database with Alembic version metadata
when transitioning an existing Monasca configuration database
to Alembic based database migrations.
Story: 2001654
Task: 14341
Change-Id: Ibdd877a23ab5d6d1bbf8d83515c0197554098526
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>
* bump lower-constraint for cassandra-driver version to 3.3.0
* add cassandra-driver and influxdb to extras
* execute lower-constraints job with python 2.7
* move common commands to [testenv]
* fix lower-constraint for sphinx
* add funcsigs to lower-constraints.txt
Depends-On: https://review.openstack.org/555402
Change-Id: Idc2351e597ce933fa5c83a6c872ae241ce4b0220
* https://review.openstack.org/#/c/526844/ move the intree
bundled tempest plugin to a new repo monasca-tempest-plugin.
Let's use it and remove the bundled tempest plugin from repo.
* Moved post_host script to main root directory
* Removed dummy gate_hook.sh script
* Fixed the jobs for the same
Story: 2001400
Task: 6085
Depends-On: I2ce2bd8238d44a451faeba9ddbfe27d900e9adef
Change-Id: I79cea368271bbef33914dba7b95f5546a1b8d3c1
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
File api-logging.conf, which describes logging
configuration, for monasca-api was not specified
in setup.cfg
Change-Id: I589e44e55d55d3ad692fada0868f3a279a665d73
By default the config files end up in /usr/loca/etc/monasca instead of
/etc/monasca.
Change-Id: Ib98677409879939fb839f0432da63649c0b5e67d
Closes-Bug: #1613163
Upgraded to Falcon 0.2
Converted from stevedore to simport
Converted from monasca to monasca_api
Removed events. Events api is in monasca-events-api
Removed references to elastic search
Removed support for message format translations
Removed unused and dead code
Removed author tags
Change-Id: I5034ea256372d22b9f824e301c379da81f82b4e2
This depends on ansible-monasca-schema changes here:
https://github.com/hpcloud-mon/ansible-monasca-schema/pull/17
Here are sample curl commands for POST, GET, and DELETE:
curl -i -X POST -H 'X-Auth-User: mini-mon' -H 'X-Auth-Token: 8c959d0296344c27a47b8e78dbf912ac' -H 'X-Auth-Key: password' -H 'Accept: application/json' -H 'User-Agent: python-monascaclient' -H 'Content-Tye: application/json' -d '{"fire_criteria": [{"event_type": "compute.instance.create.start"}, {"event_type": "compute.instance.create.end"}], "description": "provisioning duration", "name": "panda", "group_by": ["instance_id"], "expiration": 3, "select": [{"traits": {"tenant_id": "406904"}, "event_type": "compute.instance.create.*"}], "fire_actions": ["ed469bb9-2b4a-457a-9926-9da9f6ac75da"], "expire_actions":["ed469bb9-2b4a-457a-9926-9da9f6ac75da"]}' http://127.0.0.1:8080/v2.0/events/stream-definitions
curl -i -X GET -H 'X-Auth-User: mini-mon' -H 'X-Auth-Token: 8c959d0296344c27a47b8e78dbf912ac' -H 'X-Auth-Key: password' -H 'Accept: application/json' -H 'User-Agent: python-monascaclient' -H 'Content-Type: application/json' http://127.0.0.1:8080/v2.0/events/stream-definitions/
curl -i -X DELETE -H 'X-Auth-User: mini-mon' -H 'X-Auth-Token: 8c959d0296344c27a47b8e78dbf912ac' -H 'X-Auth-Key: password' -H 'Accept: application/json' -H 'User-Agent: python-monascaclient' -H 'Content-Type: application/json' http://127.0.0.1:8080/v2.0/events/stream-definitions/86177f0e-f811-4c42-a91a-1813251bf93f
Note: the limit parameter is passed into the streams_repository method for listing streams, but not yet used. We will open a separate Jira to to handle pagination with a user input limit parameter.
Note: fixed a few events problems. stevedore wasn't loading the driver, and missing some abstact function defs. I tested stream-defintions and events, they both work now. Had to change the URI for stream-definitions because it conflicted with events, and now is more RESTful.
Change-Id: I0b6dc385e1d095c1bd33867a038fe170ca277bfe
move implementation specific configurations in server.py to
v2/reference module. Making the server.py only responsible
for loading dispatchers which are configured in monasca.conf
file. This change will enable any dispatcher to be loaded
according to the configuration file. For example, to config
two dispatchers to be served on a server, a monasca.conf
file can look like the following:
[DEFAULT]
dispatcher = v2_ref_metrics
dispatcher = v2_ref_alarms
If all the reference dispatchers should be served out of
one server, then the configuration file may look like this:
[DEFAULT]
dispatcher = v2_ref_metrics
dispatcher = v2_ref_alarms
dispatcher = v2_ref_alarm_definitions
dispatcher = v2_ref_events
dispatcher = v2_ref_transforms
dispatcher = v2_ref_notifications
One can use the configuration to load any dispatchers which
may be developed by third party. This way, to load new
dispatchers, one only needs to change the configuration file.
This patch set makes the API server a true miscroservice
server.
Change-Id: I87005f8ff4807e4c818057f1e7866001482a50e1