d1244f9dd78b1fbce014e7c0b06d1f89876e8df1
[policy/parent.git] / docs / development / devtools / tosca / smoke-test-participants.yaml
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   org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest:
13     version: 1.0.0
14     derived_from: tosca.datatypes.Root
15     properties:
16       restRequestId:
17         type:  onap.datatypes.ToscaConceptIdentifier
18         type_version: 0.0.0
19         required: true
20         description: The name and version of a REST request to be sent to a REST endpoint
21       httpMethod:
22         type: string
23         required: true
24         constraints:
25           - valid_values: [POST, PUT, GET, DELETE]
26         description: The REST method to use
27       path:
28         type: string
29         required: true
30         description: The path of the REST request relative to the base URL
31       body:
32         type: string
33         required: false
34         description: The body of the REST request for PUT and POST requests
35       expectedResponse:
36         type: integer
37         required: true
38         constraints:
39           - in_range: [100, 599]
40         description: THe expected HTTP status code for the REST request
41   org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
42     version: 1.0.0
43     derived_from: tosca.datatypes.Root
44     properties:
45       configurationEntityId:
46         type:  onap.datatypes.ToscaConceptIdentifier
47         type_version: 0.0.0
48         required: true
49         description: The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element
50       restSequence:
51         type: list
52         entry_schema:
53           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
54           type_version: 1.0.0
55         description: A sequence of REST commands to send to the REST endpoint
56 node_types:
57   org.onap.policy.clamp.acm.Participant:
58     version: 1.0.1
59     derived_from: tosca.nodetypes.Root
60     properties:
61       provider:
62         type: string
63         required: false
64   org.onap.policy.clamp.acm.AutomationCompositionElement:
65     version: 1.0.1
66     derived_from: tosca.nodetypes.Root
67     properties:
68       provider:
69         type: string
70         requred: false
71       participant_id:
72         type: onap.datatypes.ToscaConceptIdentifier
73         requred: true
74       participantType:
75         type: onap.datatypes.ToscaConceptIdentifier
76         required: true
77         metadata:
78           common: true
79         description: The identity of the participant type that hosts this type of Automation Composition Element
80       startPhase:
81         type: integer
82         required: false
83         constraints:
84           - greater_or_equal: 0
85         metadata:
86           common: true
87         description: A value indicating the start phase in which this ACM element will be started, the
88           first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
89           in reverse start phase order. Automation Composition Elements with the same start phase are started and
90           stopped simultaneously
91       uninitializedToPassiveTimeout:
92         type: integer
93         required: false
94         constraints:
95           - greater_or_equal: 0
96         default: 60
97         metadata:
98           common: true
99         description: The maximum time in seconds to wait for a state chage from uninitialized to passive
100       passiveToRunningTimeout:
101         type: integer
102         required: false
103         constraints:
104           - greater_or_equal: 0
105         default: 60
106         metadata:
107           common: true
108         description: The maximum time in seconds to wait for a state chage from passive to running
109       runningToPassiveTimeout:
110         type: integer
111         required: false
112         constraints:
113           - greater_or_equal: 0
114         default: 60
115         metadata:
116           common: true
117         description: The maximum time in seconds to wait for a state chage from running to passive
118       passiveToUninitializedTimeout:
119         type: integer
120         required: false
121         constraints:
122           - greater_or_equal: 0
123         default: 60
124         metadata:
125           common: true
126         description: The maximum time in seconds to wait for a state chage from passive to uninitialized
127   org.onap.policy.clamp.acm.AutomationComposition:
128     version: 1.0.1
129     derived_from: tosca.nodetypes.Root
130     properties:
131       provider:
132         type: string
133         requred: false
134       elements:
135         type: list
136         required: true
137         entry_schema:
138           type: onap.datatypes.ToscaConceptIdentifier
139   org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
140     version: 1.0.1
141     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
142     properties:
143       chart:
144         type: string
145         required: true
146       configs:
147         type: list
148         required: false
149       requirements:
150         type: string
151         requred: false
152       templates:
153         type: list
154         required: false
155         entry_schema:
156       values:
157         type: string
158         required: true
159   org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
160     version: 1.0.1
161     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
162     properties:
163       baseUrl:
164         type: string
165         required: true
166         description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
167       httpHeaders:
168         type: map
169         required: false
170         entry_schema:
171           type: string
172         description: HTTP headers to send on REST requests
173       configurationEntities:
174         type: map
175         required: true
176         entry_schema:
177           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
178           type_version: 1.0.0
179         description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
180 topology_template:
181   node_templates:
182     org.onap.policy.clamp.acm.KubernetesParticipant:
183       version: 2.3.4
184       type: org.onap.policy.clamp.acm.Participant
185       type_version: 1.0.1
186       description: Participant for K8S
187       properties:
188         provider: ONAP
189     org.onap.policy.clamp.Local_K8SMicroserviceAutomationCompositionElement:
190       # Chart installation without passing repository info
191       version: 1.2.3
192       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
193       type_version: 1.0.0
194       description: Automation Composition element for the K8S microservice for local chart
195       properties:
196         provider: ONAP
197         participant_id:
198           name: K8sParticipant0
199           version: 1.0.0
200         participantType:
201           name: org.onap.policy.clamp.acm.KubernetesParticipant
202           version: 2.3.4
203         chart:
204           chartId:
205             name: nginx-ingress
206             version: 0.11.0
207           releaseName: nginxapp
208           namespace: onap
209     org.onap.policy.clamp.acm.HttpParticipant:
210       version: 2.3.4
211       type: org.onap.policy.clamp.acm.Participant
212       type_version: 1.0.1
213       description: Participant for Http requests
214       properties:
215         provider: ONAP
216
217     org.onap.policy.clamp.Http_AutomationCompositionElement:
218       version: 1.2.3
219       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
220       type_version: 1.0.1
221       description: Automation composition element for the http requests of PMSH microservice
222       properties:
223         provider: ONAP
224         participant_id:
225           name: HttpParticipant0
226           version: 1.0.0
227         participantType:
228           name: org.onap.policy.clamp.acm.HttpParticipant
229           version: 2.3.4
230         uninitializedToPassiveTimeout: 180
231         startPhase: 1
232         baseUrl: http://httpbin.org
233         httpHeaders:
234           Content-Type: application/json
235         configurationEntities:
236           - configurationEntityId:
237               name: entity1
238               version: 1.0.1
239             restSequence:
240               - restRequestId:
241                   name: request1
242                   version: 1.0.1
243                 httpMethod: POST
244                 path: post
245                 body: 'Dummy data for smoke testing'
246                 expectedResponse: 200
247
248
249     org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition:
250       version: 1.2.3
251       type: org.onap.policy.clamp.acm.AutomationComposition
252       type_version: 1.0.0
253       description: Automation compostion for smoke testing participants
254       properties:
255         provider: ONAP
256         elements:
257         - name: org.onap.policy.clamp.Local_K8SMicroserviceAutomationCompositionElement
258           version: 1.2.3
259         - name: org.onap.policy.clamp.Http_AutomationCompositionElement
260           version: 1.2.3