Change metadata for clamp
[policy/models.git] / models-examples / src / main / resources / policytypes / onap.policies.controlloop.operational.Common.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_1_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                 metadata:
54                     clamp_possible_values: ClampExecution:CSAR_RESOURCES
55                 entry_schema:
56                     type: string
57
58     onap.datatype.controlloop.Actor:
59         derived_from: tosca.datatypes.Root
60         description: An actor/operation/target definition
61         properties:
62             actor:
63                 type: string
64                 description: The actor performing the operation.
65                 required: true
66                 metadata:
67                     clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
68             operation:
69                 type: string
70                 description: The operation the actor is performing.
71                 metadata:
72                     clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operations
73                 required: true
74             target:
75                 type: onap.datatype.controlloop.Target
76                 description: The resource the operation should be performed on.
77                 required: true
78             payload:
79                 type: map
80                 description: Name/value pairs of payload information passed by Policy to the actor
81                 required: false
82                 metadata:
83                     clamp_possible_values: ClampExecution:CDS/payload
84                 entry_schema:
85                     type: string
86
87     onap.datatype.controlloop.Operation:
88         derived_from: tosca.datatypes.Root
89         description: An operation supported by an actor
90         properties:
91             id:
92                 type: string
93                 description: Unique identifier for the operation
94                 required: true
95             description:
96                 type: string
97                 description: A user-friendly description of the intent for the operation
98                 required: false
99             operation:
100                 type: onap.datatype.controlloop.Actor
101                 description: The definition of the operation to be performed.
102                 required: true
103             timeout:
104                 type: integer
105                 description: The amount of time for the actor to perform the operation.
106                 required: true
107             retries:
108                 type: integer
109                 description: The number of retries the actor should attempt to perform the operation.
110                 required: true
111                 default: 0
112             success:
113                 type: string
114                 description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
115                 required: false
116                 default: final_success
117             failure:
118                 type: string
119                 description: Points to the operation to invoke on Actor operation failure.
120                 required: false
121                 default: final_failure
122             failure_timeout:
123                 type: string
124                 description: Points to the operation to invoke when the time out for the operation occurs.
125                 required: false
126                 default: final_failure_timeout
127             failure_retries:
128                 type: string
129                 description: Points to the operation to invoke when the current operation has exceeded its max retries.
130                 required: false
131                 default: final_failure_retries
132             failure_exception:
133                 type: string
134                 description: Points to the operation to invoke when the current operation causes an exception.
135                 required: false
136                 default: final_failure_exception
137             failure_guard:
138                 type: string
139                 description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
140                 required: false
141                 default: final_failure_guard