monasca-api/monasca/v2/common/schemas
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
..
__init__.py Start of initial reference implementation and re-factored 2014-10-02 13:56:47 -06:00
alarm_definition_request_body_schema.py Add alarm definition update and alarm definition patch resources 2014-12-09 09:23:10 -07:00
dimensions_schema.py Add alarm history resource 2014-11-17 15:38:47 -07:00
events_request_body_schema.py Add alarm history resource 2014-11-17 15:38:47 -07:00
exceptions.py Add alarm definition create resource 2014-10-31 09:45:01 -06:00
metric_name_schema.py Add alarm history resource 2014-11-17 15:38:47 -07:00
metrics_request_body_schema.py Add alarm history resource 2014-11-17 15:38:47 -07:00
notifications_request_body_schema.py Fixed Pagerduty missing information, schema, and added some tests 2015-02-06 09:31:57 +01:00
stream_definition_request_body_schema.py streams definition POST, GET, GET (id), DELETE 2015-04-24 15:55:20 -06:00
transforms_request_body_schema.py Add alarm history resource 2014-11-17 15:38:47 -07:00