e7f14730051c96655b6fd59ea057455eff4b76d0
[policy/drools-applications.git] / controlloop / common / model-impl / events / src / main / resources / definitions.yaml
1 # Copyright 2018 AT&T Intellectual Property. All rights reserved
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 AAI:
15   type: object
16   properties:
17     AICVServerSelfLink:
18       type: string
19     VNF_NAME:
20       type: string
21     AICVMID:
22       type: string
23     AICTenantID:
24       type: string
25     LOC_ID:
26       type: string
27     in_maint:
28       type: boolean
29     AICIdentity:
30       type: string
31     Prov_status:
32       type: string
33     OAM_IPV4:
34       type: string
35     is_closed_loop_disabled:
36       type: boolean
37     VM_NAME:
38       type: string
39     OAM_IPV6:
40       type: string
41   required:
42     - AICVServerSelfLink
43     - AICIdentity
44     - is_closed_loop_disabled
45 ControlLoop:
46   type: object
47   description: Common fields for control loop events and notifications
48   properties:
49     closedLoopControlName:
50       type: string
51       description: A UNIQUE string identifying the Closed Loop ID this event is for. There are no semantics behind this string.
52     serviceInstance:
53       $ref: '../../../../sdc/src/main/resources/definitions.yaml#/serviceInstance'
54     resourceInstance:
55       $ref: '../../../../sdc/src/main/resources/definitions.yaml#/resourceInstance'
56     requestID:
57       type: string
58       description: This is required via ONAP Platform Logging Requirements.
59       pattern: /[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/
60     triggerID:
61       type: string
62       description: ID that maps back to Highland Park. Concatenation between eventID and firstEPOCH.
63     triggerSourceName:
64       type: string
65       description: pulled from eventSourceName of trigger H.P. alarm. The contents of this field should also be contained in the AAI Json sub-tag (see below).
66     closedLoopAlarmStart:
67       type: string
68       description: firstEpoch. UTC Timestamp when this event was detected by DCAE. Conform to ONAP Logging requirements.
69     closedLoopAlarmEnd:
70       type: string
71       description: lastEpoch.  UTC Timestamp when this event was detected as cleared by DCAE. Conform to ONAP Logging requirements.
72     closedLoopEventClient:
73       type: string
74       description: Open DCAE sub-system that detected the event and published this event message.
75     target:
76       type: string
77       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.
78     AAI:
79       $ref: '#/AAI'
80     from:
81       type: string
82     policyScope:
83       type: string
84     policyName:
85       type: string
86     policyVersion:
87       type: string
88   required:
89     - closedLoopControlName
90     - requestID
91     - triggerID
92     - triggerSourceName
93     - closedLoopAlarmStart
94     - closedLoopEventClient
95     - target
96     - AAI
97     - from
98     - policyScope
99     - policyName
100     - policyVersion
101 Event:
102   allOf:
103     - $ref: '#/ControlLoop'
104     - properties:
105       closedLoopEventStatus:
106         type: string
107         description: The status for the event within Open DCAE. A value of “ONSET” indicates the event has been encountered. “ABATED” indicates the event has been abated.
108         valid_values:
109           - ONSET
110           - ABATEMENT
111     - required:
112       - closedLoopEventStatus
113 Notification:
114     - $ref: '#/ControlLoop'
115     - properties:
116       notification:
117         type: string
118       notificationTime:
119         type: string
120       message:
121         type: string
122       OPS_CL_timer:
123         type: int
124     - required:
125       - notification
126       - notificationTime
127       - OPS_CL_timer