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