13016ef5a0579f8c45efd9e26ad2d37d6a897b8d
[policy/drools-applications.git] / controlloop / src / main / resources / definitions.yaml
1 ###
2 # ============LICENSE_START=======================================================
3 # controlloop
4 # ================================================================================
5 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10
11 #      http://www.apache.org/licenses/LICENSE-2.0
12
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
19 ###
20
21 ControlLoop:
22   type: object
23   description: Common fields for control loop events and notifications
24   properties:
25     closedLoopControlName:
26       type: string
27       description: A UNIQUE string identifying the Closed Loop ID this event is for. There are no semantics behind this string.
28     requestID:
29       type: string
30       description: This is required via ECOMP Platform Logging Requirements.
31       pattern: /[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/
32     closedLoopAlarmStart:
33       type: string
34       description: firstEpoch. UTC Timestamp when this event was detected by DCAE. Conform to ECOMP Logging requirements.
35     closedLoopAlarmEnd:
36       type: string
37       description: lastEpoch.  UTC Timestamp when this event was detected as cleared by DCAE. Conform to ECOMP Logging requirements.
38     closedLoopEventClient:
39       type: string
40       description: Open DCAE sub-system that detected the event and published this event message.
41     target:
42       type: string
43       description: The target entity that is being administered. This could be VM_NAME, VNF_NAME, etc. This should map to a field name in the AAI sub-tag shown below.
44     AAI:
45       type: object
46       description: Fields of node.attribute and their values that map to AAI topology.
47     from:
48       type: string
49       description: The ECOMP component generating this message.
50     policyScope:
51       type: string
52       description: The policy scope driving the generation of this message.
53     policyName:
54       type: string
55       description: The policy name driving the generation of this message.
56     policyVersion:
57       type: string
58       description: The policy version driving the generation of this message.
59   required:
60     - closedLoopControlName
61     - requestID
62     - closedLoopAlarmStart
63     - closedLoopEventClient
64     - target
65     - AAI
66     - from
67     - policyScope
68     - policyName
69     - policyVersion
70 Event:
71   allOf:
72     - $ref: '#/ControlLoop'
73     - properties:
74       closedLoopEventStatus:
75         type: string
76         description: The status for the event within Open DCAE. A value of â\80\9cONSETâ\80? indicates the event has been encountered. â\80\9cABATEDâ\80? indicates the event has been abated.
77         valid_values:
78           - ONSET
79           - ABATEMENT
80     - required:
81       - closedLoopEventStatus
82 Notification:
83     - $ref: '#/ControlLoop'
84     - properties:
85       notification:
86         type: string
87       notificationTime:
88         type: string
89       message:
90         type: string
91       OPS_CL_timer:
92         type: int
93     - required:
94       - notification
95       - notificationTime
96       - OPS_CL_timer