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