1bb7f59f3b707edeb9c633434fbeca9394bb658d
[policy/parent.git] / docs / clamp / acm / design-impl / participants / tosca / tosca-k8s-participant.yml
1 tosca_definitions_version: tosca_simple_yaml_1_3
2 data_types:
3   onap.datatypes.ToscaConceptIdentifier:
4     derived_from: tosca.datatypes.Root
5     properties:
6       name:
7         type: string
8         required: true
9       version:
10         type: string
11         required: true
12   onap.datatype.acm.Target:
13     derived_from: tosca.datatypes.Root
14     description: Definition for a entity in A&AI to perform a automation composition operation on
15     properties:
16       targetType:
17         type: string
18         description: Category for the target type
19         required: true
20         constraints:
21           - valid_values:
22               - VNF
23               - VM
24               - VFMODULE
25               - PNF
26       entityIds:
27         type: map
28         description: |
29           Map of values that identify the resource. If none are provided, it is assumed that the
30           entity that generated the ONSET event will be the target.
31         required: false
32         metadata:
33           clamp_possible_values: ClampExecution:CSAR_RESOURCES
34         entry_schema:
35           type: string
36   onap.datatype.acm.Actor:
37     derived_from: tosca.datatypes.Root
38     description: An actor/operation/target definition
39     properties:
40       actor:
41         type: string
42         description: The actor performing the operation.
43         required: true
44         metadata:
45           clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
46       operation:
47         type: string
48         description: The operation the actor is performing.
49         metadata:
50           clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
51         required: true
52       target:
53         type: onap.datatype.acm.Target
54         description: The resource the operation should be performed on.
55         required: true
56       payload:
57         type: map
58         description: Name/value pairs of payload information passed by Policy to the actor
59         required: false
60         metadata:
61           clamp_possible_values: ClampExecution:CDS/payload
62         entry_schema:
63           type: string
64   onap.datatype.acm.Operation:
65     derived_from: tosca.datatypes.Root
66     description: An operation supported by an actor
67     properties:
68       id:
69         type: string
70         description: Unique identifier for the operation
71         required: true
72       description:
73         type: string
74         description: A user-friendly description of the intent for the operation
75         required: false
76       operation:
77         type: onap.datatype.acm.Actor
78         description: The definition of the operation to be performed.
79         required: true
80       timeout:
81         type: integer
82         description: The amount of time for the actor to perform the operation.
83         required: true
84       retries:
85         type: integer
86         description: The number of retries the actor should attempt to perform the operation.
87         required: true
88         default: 0
89       success:
90         type: string
91         description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
92         required: false
93         default: final_success
94       failure:
95         type: string
96         description: Points to the operation to invoke on Actor operation failure.
97         required: false
98         default: final_failure
99       failure_timeout:
100         type: string
101         description: Points to the operation to invoke when the time out for the operation occurs.
102         required: false
103         default: final_failure_timeout
104       failure_retries:
105         type: string
106         description: Points to the operation to invoke when the current operation has exceeded its max retries.
107         required: false
108         default: final_failure_retries
109       failure_exception:
110         type: string
111         description: Points to the operation to invoke when the current operation causes an exception.
112         required: false
113         default: final_failure_exception
114       failure_guard:
115         type: string
116         description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
117         required: false
118         default: final_failure_guard
119 node_types:
120   org.onap.policy.clamp.acm.Participant:
121     version: 1.0.1
122     derived_from: tosca.nodetypes.Root
123     properties:
124       provider:
125         type: string
126         required: false
127   org.onap.policy.clamp.acm.AutomationCompositionElement:
128     version: 1.0.1
129     derived_from: tosca.nodetypes.Root
130     properties:
131       provider:
132         type: string
133         required: false
134         metadata:
135           common: true
136         description: Specifies the organization that provides the automation composition element
137       participant_id:
138         type: onap.datatypes.ToscaConceptIdentifier
139         required: true
140         metadata:
141           common: true
142       participantType:
143         type: onap.datatypes.ToscaConceptIdentifier
144         required: true
145         metadata:
146           common: true
147         description: The identity of the participant type that hosts this type of automation composition Element
148       startPhase:
149         type: integer
150         required: false
151         constraints:
152           - greater_or_equal: 0
153         metadata:
154           common: true
155         description: A value indicating the start phase in which this automation composition element will be started, the
156           first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
157           in reverse start phase order. Automation Composition Elements with the same start phase are started and
158           stopped simultaneously
159       uninitializedToPassiveTimeout:
160         type: integer
161         required: false
162         constraints:
163           - greater_or_equal: 0
164         default: 60
165         metadata:
166           common: true
167         description: The maximum time in seconds to wait for a state chage from uninitialized to passive
168       passiveToRunningTimeout:
169         type: integer
170         required: false
171         constraints:
172           - greater_or_equal: 0
173         default: 60
174         metadata:
175           common: true
176         description: The maximum time in seconds to wait for a state chage from passive to running
177       runningToPassiveTimeout:
178         type: integer
179         required: false
180         constraints:
181           - greater_or_equal: 0
182         default: 60
183         metadata:
184           common: true
185         description: The maximum time in seconds to wait for a state chage from running to passive
186       passiveToUninitializedTimeout:
187         type: integer
188         required: false
189         constraints:
190           - greater_or_equal: 0
191         default: 60
192         metadata:
193           common: true
194         description: The maximum time in seconds to wait for a state chage from passive to uninitialized
195   org.onap.policy.clamp.acm.AutomationComposition:
196     version: 1.0.1
197     derived_from: tosca.nodetypes.Root
198     properties:
199       provider:
200         type: string
201         required: false
202         metadata:
203           common: true
204         description: Specifies the organization that provides the automation composition element
205       elements:
206         type: list
207         required: true
208         metadata:
209           common: true
210         entry_schema:
211           type: onap.datatypes.ToscaConceptIdentifier
212         description: Specifies a list of automation composition element definitions that make up this automation composition definition
213   org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
214     version: 1.0.1
215     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
216     properties:
217       chart:
218         type: string
219         required: true
220       configs:
221         type: list
222         required: false
223       requirements:
224         type: string
225         required: false
226       templates:
227         type: list
228         required: false
229         entry_schema:
230       values:
231         type: string
232         required: true
233
234 topology_template:
235   node_templates:
236     org.onap.k8s.acm.K8SAutomationCompositionParticipant:
237       version: 2.3.4
238       type: org.onap.policy.clamp.acm.Participant
239       type_version: 1.0.1
240       description: Participant for K8S
241       properties:
242         provider: ONAP
243     org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement:
244       # Chart from new repository
245       version: 1.2.3
246       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
247       type_version: 1.0.0
248       description: Automation composition element for the K8S microservice for PMSH
249       properties:
250         provider: ONAP
251         participant_id:
252           name: K8sParticipant0
253           version: 1.0.0
254         participantType:
255           name: org.onap.k8s.acm.K8SAutomationCompositionParticipant
256           version: 2.3.4
257         chart:
258           chartId:
259             name: dcae-pmsh
260             version: 8.0.0
261           namespace: onap
262           releaseName: pmshms
263           repository:
264             repoName: chartmuseum
265             protocol: http
266             address: chart-museum
267             port: 80
268             userName: onapinitializer
269             password: demo123456!
270           overrideParams:
271             global.masterPassword: test
272
273     org.onap.domain.database.Local_K8SMicroserviceAutomationCompositionElement:
274       # Chart installation without passing repository info
275       version: 1.2.3
276       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
277       type_version: 1.0.0
278       description: Automation composition element for the K8S microservice for local chart
279       properties:
280         provider: ONAP
281         participant_id:
282           name: K8sParticipant0
283           version: 1.0.0
284         participantType:
285           name: org.onap.k8s.acm.K8SAutomationCompositionParticipant
286           version: 2.3.4
287         chart:
288           chartId:
289             name: nginx-ingress
290             version: 0.9.1
291           releaseName: nginxms
292           namespace: test
293     org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition:
294       version: 1.2.3
295       type: org.onap.policy.clamp.acm.AutomationComposition
296       type_version: 1.0.0
297       description: Automation composition for Hello World
298       properties:
299         provider: ONAP
300         elements:
301           - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement
302             version: 1.2.3
303           - name: org.onap.domain.database.Local_K8SMicroserviceAutomationCompositionElement
304             version: 1.2.3