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