Design Operational Policy Type for Apex
[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.Drools:
35         derived_from: onap.policies.controlloop.operational.Common
36         type_version: 1.0.0
37         version: 1.0.0
38         description: Operational policies for Drools PDP
39         properties:
40             controllerName:
41                 type: String
42                 description: Drools controller properties
43                 required: false
44
45 data_types:
46     # TBD if this is needed
47     onap.datatype.controlloop.operation.Failure:
48         derived_from: tosca.datatypes.Root
49         description: Captures information of an operational failure performed for control loop
50         properties:
51             messages:
52                 type: String
53                 description: error message
54                 required: true
55             category:
56                 type: String
57                 description: |
58                     The category the error occurred in. Whether this is a general error from the actor, or the operation
59                     timed out, retries were exhausted in trying to execute the operation, a guard policy prevented the
60                     operation from occuring, or an exception in the system caused the failure.
61                 constraints:
62                 - valid_values: [error, timeout, retries, guard, exception]
63
64     onap.datatype.controlloop.Target:
65         derived_from: tosca.datatypes.Root
66         description: Definition for a entity in A&AI to perform a control loop operation on
67         properties:
68             targetType:
69                 type: String
70                 description: Category for the target type
71                 required: true
72                 constraints:
73                 - valid_values: [VNF, VM, VFMODULE, PNF]
74             entityIds:
75                 type: Map
76                 description: |
77                     Map of values that identify the resource. If none are provided, it is assumed that the
78                     entity that generated the ONSET event will be the target.
79                 required: false
80
81     onap.datatype.controlloop.Actor:
82         derived_from: tosca.datatypes.Root
83         description: An actor/operation/target definition
84         properties:
85             actor:
86                 type: String
87                 description: The actor performing the operation.
88                 required: true
89             operation:
90                 type: String
91                 description: The operation the actor is performing.
92                 required: true
93             target:
94                 type: String
95                 description: The resource the operation should be performed on.
96                 required: true
97                 metadata:
98                     clamp_possible_values: <string:see clamp project for syntax>
99             payload:
100                 type: Map
101                 description: Name/value pairs of payload information passed by Policy to the actor
102                 required: false
103                 entry_schema:
104                     type: String
105
106     onap.datatype.controlloop.Operation:
107         derived_from: tosca.datatypes.Root
108         description: An operation supported by an actor
109         properties:
110             id:
111                 type: String
112                 description: Unique identifier for the operation
113                 required: true
114             description:
115                 type: String
116                 description: A user-friendly description of the intent for the operation
117                 required: false
118             operation:
119                 type: onap.datatype.controlloop.Actor
120                 description: The definition of the operation to be performed.
121                 required: true
122                 metadata:
123                     clamp_possible_values: <string:see clamp project for syntax>
124             timeout:
125                 type: Integer
126                 description: The amount of time for the actor to perform the operation.
127                 required: true
128             retries:
129                 type: Integer
130                 description: The number of retries the actor should attempt to perform the operation.
131                 required: true
132                 default: 0
133             success:
134                 type: String
135                 description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
136                 required: false
137                 default: final_success
138             failure:
139                 type: String
140                 description: Points to the operation to invoke on Actor operation failure.
141                 required: false
142                 default: final_failure
143             failure_timeout:
144                 type: String
145                 description: Points to the operation to invoke when the time out for the operation occurs.
146                 required: false
147                 default: final_failure_timeout
148             failure_retries:
149                 type: String
150                 description: Points to the operation to invoke when the current operation has exceeded its max retries.
151                 required: false
152                 default: final_failure_retries
153             failure_exception:
154                 type: String
155                 description: Points to the operation to invoke when the current operation causes an exception.
156                 required: false
157                 default: final_failure_exception
158             failure_guard:
159                 type: String
160                 description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
161                 required: false
162                 default: final_failure_guard