Commit Graph

37 Commits

Author SHA1 Message Date
Hasan Acar a24fd834d0 fix: migrate CI to jammy
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
2024-02-22 14:35:03 +00:00
yangyawei 3d43cbec0f setup.cfg: Replace dashes with underscores
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
2021-06-07 20:35:03 +00:00
Sean McGinnis 827e88b929
Add py38 package metadata
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>
2020-05-02 07:48:13 -05:00
Andreas Jaeger 80b59f7a44 Cleanup py27 support
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
2020-04-05 11:35:05 +02:00
Ghanshyam Mann e2789e8a9d [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-api is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I5daa9bb079d0373d0e1379d20e98dd5c0880d312
2019-12-10 13:58:58 +01:00
Adrian Czarnecki 4e927484bb Exclude influxdb 5.2.3 for python
This version of influxdb client does not handle correctly unicode
characters with Python 2 [1].

git issue: https://github.com/influxdata/influxdb-python/issues/633
global-requirements change: https://review.opendev.org/#/c/679608/

Change-Id: I4007069bcfd5544b20d8bf56ecb752bb0da270f1

Depends-On: https://review.opendev.org/680412/
2019-09-09 10:03:10 +00:00
Shubham82 6cc6c9ba4f Switch python3 versions of test jobs to match Train PTI
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
2019-07-26 14:31:42 +05:30
Doug Szumski a9cc4bb482 Add support for using Falcon 2.0.0
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
2019-05-29 16:10:53 +02:00
Ghanshyam Mann b33c46baac Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: If4c9008f126d30c4aed72aa752a07de17dc6a6b4
2019-04-14 23:40:30 +00:00
Adrian Czarnecki c9cb514a28 Add python3.5 classifier to setup.cfg
Story: 2000975
Task: 28476

Change-Id: Ib83a6a10aa88a24eb91308fb137a403cc4580f25
2018-12-19 09:45:53 +00:00
melissaml 4a5be7b2c0 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I04667af24847874c8fc9c6181e4ef0051bdc3ebc
2018-12-05 01:30:14 +08:00
Joseph Davis 22be5aa57f Add "monasca-status upgrade check" for pre-upgrade
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
2018-11-12 11:24:21 -08:00
Johannes Grassler 0250f81cdc Add monasca_db command line tool
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
2018-08-01 11:10:14 +00:00
Denis Poisson 2af7bddaeb Convert README.md to ReStructuredText format
Change-Id: Ib03230de5a20fa0c036a2aa9031dad9815ec6e98
story: 2002163
task: 22232
2018-06-20 15:14:06 +02:00
Zuul ddbc1c4efb Merge "Enable uWSGI support in devstack" 2018-06-15 09:26:56 +00:00
Adrian Czarnecki 5359e4e633 Enable uWSGI support in devstack
Story: 2001464
Task: 6181
Change-Id: If4329e51feebeb68538917d7a68aad53ae469b07
2018-06-12 14:36:46 +02:00
Amir Mofakhar 3ca4b057dd Using oslo.policy for monasca-api
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>
2018-06-05 12:25:07 +00:00
Witold Bedyk a449b1355e Fix lower-constraints job
* 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
2018-04-09 14:15:47 +02:00
Chandan Kumar 80b4f18e1e Remove bundled intree monasca-api tempest plugin
* 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
2018-01-31 11:50:16 +05:30
Tomasz Trębski 5d27af4079 Config-generator for monasca-api
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
2017-08-28 06:58:57 +00:00
Tomasz Trębski 332634f74f Prepare foundation for doc migration
Commit aims at providing the foundation to launch
doc migration for monasca-api:

* api-ref
* releasenotes
* doc

Extra:
* fixed documentation errors to enable codebase documentation

Story: 2001058
Task: 4768

Change-Id: Ic7af65a154dba7e52ffb90d0e6dbf0ae87d5d699
2017-07-31 10:43:49 +00:00
Tomasz Trębski d898c756a9 Add missing api-logging.conf to setup.cfg
File api-logging.conf, which describes logging
configuration, for monasca-api was not specified
in setup.cfg

Change-Id: I589e44e55d55d3ad692fada0868f3a279a665d73
2017-01-16 08:10:17 +01:00
Deepak 6c8745a5ef Changed the home-page url link
Set the correct url  link for home-page

Change-Id: Ie25fdcd79014fcc875158aa5c16c5c008d4f559c
2016-10-07 00:24:46 +05:30
Laszlo Hegedus c8670354d1 Use absolute path for /etc/monasca
By default the config files end up in /usr/loca/etc/monasca instead of
/etc/monasca.

Change-Id: Ib98677409879939fb839f0432da63649c0b5e67d
Closes-Bug: #1613163
2016-09-02 08:14:06 +00:00
OpenStack Proposal Bot 29c6c6f95c Updated from global requirements
Change-Id: I50baa49c8edd8feab768f18d07936a2684c06755
2016-09-01 21:54:46 +00:00
Roland Hochmuth dc4a8868ae Add Monasca Tempest Tests
To run the tests see monasca_tempest_tests/README.md.

Change-Id: I7d1df1b88b63ccc2f1a66deaf439c032b1175d99
2015-10-16 17:44:16 -06:00
Roland Hochmuth 89731de2a6 Updated for Falcon 0.2 and clean-up
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
2015-06-06 21:47:03 -06:00
Ryan Brandt b377991913 Update documentation for dimension keys and values
Change-Id: I94c055222c2648d7a76bd95405c8c4557dc7a3cb
2015-05-01 16:09:26 -06:00
cindy oneill f4f14c77fd streams definition POST, GET, GET (id), DELETE
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
2015-04-24 15:55:20 -06:00
Joe Keen a4154ea85f Added two GET api methods for events
Change-Id: I5fdbee17dd7c1b171b6cd099537d33b8146400ef
2015-04-20 13:57:33 -06:00
Tong Li 7eeacb686a enable microservice
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
2014-12-04 14:07:28 -05:00
Deklan Dieterly fcaf0f8a8e Add alarm list resource
Change-Id: Ic0906f1b498644116f43c0fa18608ccc38239619
2014-11-11 13:45:29 -07:00
Deklan Dieterly 9a31307470 Add Alarms resources files
Change-Id: If2305a636b0b5eedc09a8f49ab9466c7bcc476ed
2014-11-07 14:34:34 -07:00
Deklan Dieterly ba39188b2f Add alarm definition create resource
Change-Id: I65e1c9f8697632e3c2004282bb624ed814828864
2014-10-31 09:45:01 -06:00
cindy oneill 4c585dc46e Notifications resource support, helpers.py link functions
Change-Id: I09e69529fe1cd09f824b837887251921f060f640
2014-10-24 09:04:14 -06:00
Roland Hochmuth c5f5fba741 Start of initial reference implementation and re-factored
Change-Id: I90d09331a41f15c47870cd7690b22405087ff7a4
2014-10-02 13:56:47 -06:00
Tong Li ed99a4edb3 initial python implementation
Change-Id: I25ca78414cd26340a4a640cb4f9ee92dda650037
2014-09-15 13:18:10 -04:00