Commit Graph

22 Commits

Author SHA1 Message Date
Ghanshyam Mann 67ee8e5c66 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-event-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: I1ea3a93bdd2cd6d5e95b7fefaca6a26c682aebc0
2019-12-02 09:45:09 +00:00
Corey Bryant c8b38fe98a Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ib97c4d05a9bee29808cbc1f37f9a7fe89d23d0c6
Story: #2005924
Task: #34223
2019-07-14 14:08:57 +00:00
Ghanshyam Mann be016896dd 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: I810c1731659213457558eec31873ab4807a8d1c3
2019-04-15 18:17:27 +00:00
melissaml 82dee1cb80 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I6f88fd87a4672411b89ef29d4fc7c62da43982c2
2018-12-05 01:49:02 +08:00
Adrian Czarnecki 3c5e504ede Refactor devstack-plugin
* Make monasca-event-api devstack plugin compatible
with monaca devstack metrics and logs plugins
* Add monasca-ui
* Enable events visualization in kibana
* By default metrics and logs pipelines are disabled
* Change deployment mode from gunicorn to uwsgi

Story: 2003815
Task: 26569

Depends-On: https://review.openstack.org/#/c/593602/
Change-Id: I7efb969d89f0733bf27517d393cd024750e278a7
2018-11-19 11:43:13 +01:00
Artur Basiak 620a477df0 Add events endpoint
Provide basic endpoint:
/v1.0/events/
/healthcheck
/version
Endpoint reads request and returns HTTP code 200.
Provide code to run application in gunicorn mode.

Story: 2001112
Task: 4863

Change-Id: Ic7c344360b5acec5af7751a825e2dff8346cf1f7
Depends-On: I18d9f4ec543c76bfe1311ed1ee940827d4162298
2017-12-18 13:42:02 +01:00
Artur Basiak 32c4560c3b Provide oslo.policies
Add policies to the api based on oslo.policies.
Small changes in documentation. Provide generator for
sample policies file.
Add policies for agent and admin.

Story: 200112
Task: 4807

Depends-On: I76d737bf9d1216b041bc1a518cc2098f28e7da7b
Change-Id: Idf5c4ec1b663ad9ed3ab25744bdf0b7f28cdb1a2
2017-08-01 13:24:09 +02:00
Tomasz Trębski 5321635049 Preparing infrastructure for events-api
Following change aims at setting up the
tooling for events-api againts latest
requirements and guideliness from OpenStack.
Removing old code , add basic structure of the python
modules. Add basic documentation and release notes.
Prepare to use oslo-config-generator.
Add devstack basic setup to the project.

Story: 2001112
Task: 4798

Change-Id: I76d737bf9d1216b041bc1a518cc2098f28e7da7b
2017-07-12 12:08:35 +02:00
Joe Keen 27306cba7c Updated tox setup
Removed version string from setup.cfg
2015-05-04 15:38:59 -06:00
Joe Keen 837d45ef98 Removed unused code 2015-05-01 17:05:03 -06:00
Joe Keen 3c0c2e6b9e Refactorig API structure
Replaced stevedore with simport

Updated documentation
Updated config files for simport
Updated config defaults for simport
2015-04-30 13:35:42 -06:00
Joe Keen 9ebf70a81d Cleanup
Fixed imports
Removed repositories not specific to events
Removed some unused sample objects
2015-04-28 11:09:23 -06:00
Joe Keen d8270168e9 Cleanup
Python packge will now build
2015-04-27 14:59:55 -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