Add new Operational Policy Type
[policy/models.git] / models-examples / src / main / resources / policytypes / onap.policies.controlloop.operational.Common.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 policy_types:
3     onap.policies.controlloop.operational.Common:
4         derived_from: tosca.policies.Root
5         version: 1.0.0
6         description: Operational Policy for Control Loop execution
7         properties:
8             id:
9                 type: String
10                 description: The unique control loop id.
11                 required: true
12             timeout:
13                 type: Integer
14                 description: |
15                     Overall timeout for executing all the operations. This timeout should equal or exceed the total
16                     timeout for each operation listed.
17                 required: true
18             abatement:
19                 type: Boolean
20                 description: Whether an abatement event message will be expected for the control loop from DCAE.
21                 required: true
22                 default: false
23             trigger:
24                 type: String
25                 description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
26                 required: true
27             operations:
28                 type: List
29                 description: List of operations to be performed when Control Loop is triggered.
30                 required: true
31                 entry_schema:
32                     type: onap.datatype.controlloop.Operation
33
34     onap.policies.controlloop.operational.common.Apex:
35         derived_from: onap.policies.controlloop.operational.Common
36         type_version: 1.0.0
37         version: 1.0.0
38         description: Operational policies for Apex PDP
39         properties:
40
41     onap.policies.controlloop.operational.common.Drools:
42         derived_from: onap.policies.controlloop.operational.Common
43         type_version: 1.0.0
44         version: 1.0.0
45         description: Operational policies for Drools PDP
46         properties:
47             controllerName:
48                 type: String
49                 description: Drools controller properties
50                 required: false
51
52 data_types:
53     # TBD if this is needed
54     onap.datatype.controlloop.operation.Failure:
55         derived_from: tosca.datatypes.Root
56         description: Captures information of an operational failure performed for control loop
57         properties:
58             messages:
59                 type: String
60                 description: error message
61                 required: true
62             category:
63                 type: String
64                 description: |
65                     The category the error occurred in. Whether this is a general error from the actor, or the operation
66                     timed out, retries were exhausted in trying to execute the operation, a guard policy prevented the
67                     operation from occuring, or an exception in the system caused the failure.
68                 constraints:
69                 - valid_values: [error, timeout, retries, guard, exception]
70
71     onap.datatype.controlloop.Target:
72         derived_from: tosca.datatypes.Root
73         description: Definition for a entity in A&AI to perform a control loop operation on
74         properties:
75             targetType:
76                 type: String
77                 description: Category for the target type
78                 required: true
79                 constraints:
80                 - valid_values: [VNF, VM, VFMODULE, PNF]
81             entityIds:
82                 type: Map
83                 description: |
84                     Map of values that identify the resource. If none are provided, it is assumed that the
85                     entity that generated the ONSET event will be the target.
86                 required: false
87
88     onap.datatype.controlloop.Actor:
89         derived_from: tosca.datatypes.Root
90         description: An actor/operation/target definition
91         properties:
92             actor:
93                 type: String
94                 description: The actor performing the operation.
95                 required: true
96             operation:
97                 type: String
98                 description: The operation the actor is performing.
99                 required: true
100             target:
101                 type: String
102                 description: The resource the operation should be performed on.
103                 required: true
104                 metadata:
105                     clamp_possible_values: <string:see clamp project for syntax>
106             payload:
107                 type: Map
108                 description: Name/value pairs of payload information passed by Policy to the actor
109                 required: false
110                 entry_schema:
111                     type: String
112
113     onap.datatype.controlloop.Operation:
114         derived_from: tosca.datatypes.Root
115         description: An operation supported by an actor
116         properties:
117             id:
118                 type: String
119                 description: Unique identifier for the operation
120                 required: true
121             description:
122                 type: String
123                 description: A user-friendly description of the intent for the operation
124                 required: false
125             operation:
126                 type: onap.datatype.controlloop.Actor
127                 description: The definition of the operation to be performed.
128                 required: true
129                 metadata:
130                     clamp_possible_values: <string:see clamp project for syntax>
131             timeout:
132                 type: Integer
133                 description: The amount of time for the actor to perform the operation.
134                 required: true
135             retries:
136                 type: Integer
137                 description: The number of retries the actor should attempt to perform the operation.
138                 required: true
139                 default: 0
140             success:
141                 type: String
142                 description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
143                 required: false
144                 default: final_success
145             failure:
146                 type: String
147                 description: Points to the operation to invoke on Actor operation failure.
148                 required: false
149                 default: final_failure
150             failure_timeout:
151                 type: String
152                 description: Points to the operation to invoke when the time out for the operation occurs.
153                 required: false
154                 default: final_failure_timeout
155             failure_retries:
156                 type: String
157                 description: Points to the operation to invoke when the current operation has exceeded its max retries.
158                 required: false
159                 default: final_failure_retries
160             failure_exception:
161                 type: String
162                 description: Points to the operation to invoke when the current operation causes an exception.
163                 required: false
164                 default: final_failure_exception
165             failure_guard:
166                 type: String
167                 description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
168                 required: false
169                 default: final_failure_guard