From 65e14843767c5331505e9efc8e1eb540379a52cb Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Fri, 24 Aug 2018 16:21:56 +0100 Subject: [PATCH] Updates CLMC service documentation --- docs/clmc-service.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/clmc-service.md b/docs/clmc-service.md index 531ec77..7879761 100644 --- a/docs/clmc-service.md +++ b/docs/clmc-service.md @@ -47,20 +47,20 @@ configuration files of the service can be found in the **src/service** folder. * Request: - Expects a YAML-formatted file in the request body referenced with ID *alert-spec* representing the alert specification + Expects a YAML-formatted file in the request referenced with ID ***alert-spec*** representing the alert specification document. This document is then parsed with the openstack TOSCA parser (https://github.com/openstack/tosca-parser/tree/master/toscaparser) - and validated against the CLMC alerts specification schema. + and validated against the CLMC alerts specification schema (again check [documentation](AlertsSpecification.md) for more info on this). - * Request example for sending such request with curl: + * Example for sending a request with curl: `curl -F "alert-spec=@alert-specification.yaml" http://loclahost:9080/alerts` - where **alert-specification.yaml** is the path to the specification file. + where **alert-specification.yaml** is the path to the alerts specification file. * Response: The response of this request is a JSON-formatted content, which contains the SFC and SFC instance identifiers - from the alert specification along with errors encountered when interacting with Kapacitor. + from the alert specification along with any errors encountered when interacting with Kapacitor. Returns a 400 Bad Request if the request does not contain a yaml file referenced with ID **alert-spec**. @@ -81,7 +81,9 @@ configuration files of the service can be found in the **src/service** folder. ``` If the CLMC service encounters any errors when creating alerts and handlers in Kapacior, they will - be reported in the response as two lists of error objects (one for alert tasks and one for alert handlers): + be reported in the response as two lists of error objects. The **triggers_specification_errors** list contains + any errors encountered while trying to create the alert tasks; the **triggers_action_errors** list contains + any errors encountered while trying to subscribe the HTTP handlers to the created tasks. ```json { -- GitLab