Merge "add unit test for pdpstatistics provider"
[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: |
7             Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant
8             Policy Types. This does NOT support the legacy Policy YAML policy type.
9         properties:
10             id:
11                 type: string
12                 description: The unique control loop id.
13                 required: true
14             timeout:
15                 type: integer
16                 description: |
17                     Overall timeout for executing all the operations. This timeout should equal or exceed the total
18                     timeout for each operation listed.
19                 required: true
20             abatement:
21                 type: boolean
22                 description: Whether an abatement event message will be expected for the control loop from DCAE.
23                 required: true
24                 default: false
25             trigger:
26                 type: string
27                 description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
28                 required: true
29             operations:
30                 type: list
31                 description: List of operations to be performed when Control Loop is triggered.
32                 required: true
33                 entry_schema:
34                     type: onap.datatype.controlloop.Operation
35
36 data_types:
37     onap.datatype.controlloop.Target:
38         derived_from: tosca.datatypes.Root
39         description: Definition for a entity in A&AI to perform a control loop operation on
40         properties:
41             targetType:
42                 type: string
43                 description: Category for the target type
44                 required: true
45                 constraints:
46                 - valid_values: [VNF, VM, VFMODULE, PNF]
47             entityIds:
48                 type: map
49                 description: |
50                     Map of values that identify the resource. If none are provided, it is assumed that the
51                     entity that generated the ONSET event will be the target.
52                 required: false
53                 entry_schema:
54                     type: string
55
56     onap.datatype.controlloop.Actor:
57         derived_from: tosca.datatypes.Root
58         description: An actor/operation/target definition
59         properties:
60             actor:
61                 type: string
62                 description: The actor performing the operation.
63                 required: true
64             operation:
65                 type: string
66                 description: The operation the actor is performing.
67                 required: true
68             target:
69                 type: onap.datatype.controlloop.Target
70                 description: The resource the operation should be performed on.
71                 required: true
72                 metadata:
73                     clamp_possible_values: <string:see clamp project for syntax>
74             payload:
75                 type: map
76                 description: Name/value pairs of payload information passed by Policy to the actor
77                 required: false
78                 entry_schema:
79                     type: string
80
81     onap.datatype.controlloop.Operation:
82         derived_from: tosca.datatypes.Root
83         description: An operation supported by an actor
84         properties:
85             id:
86                 type: string
87                 description: Unique identifier for the operation
88                 required: true
89             description:
90                 type: string
91                 description: A user-friendly description of the intent for the operation
92                 required: false
93             operation:
94                 type: onap.datatype.controlloop.Actor
95                 description: The definition of the operation to be performed.
96                 required: true
97                 metadata:
98                     clamp_possible_values: <string:see clamp project for syntax>
99             timeout:
100                 type: integer
101                 description: The amount of time for the actor to perform the operation.
102                 required: true
103             retries:
104                 type: integer
105                 description: The number of retries the actor should attempt to perform the operation.
106                 required: true
107                 default: 0
108             success:
109                 type: string
110                 description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
111                 required: false
112                 default: final_success
113             failure:
114                 type: string
115                 description: Points to the operation to invoke on Actor operation failure.
116                 required: false
117                 default: final_failure
118             failure_timeout:
119                 type: string
120                 description: Points to the operation to invoke when the time out for the operation occurs.
121                 required: false
122                 default: final_failure_timeout
123             failure_retries:
124                 type: string
125                 description: Points to the operation to invoke when the current operation has exceeded its max retries.
126                 required: false
127                 default: final_failure_retries
128             failure_exception:
129                 type: string
130                 description: Points to the operation to invoke when the current operation causes an exception.
131                 required: false
132                 default: final_failure_exception
133             failure_guard:
134                 type: string
135                 description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
136                 required: false
137                 default: final_failure_guard