SwaggerConfig,ResourceAssignmentInitializer-Sonar
[ccsdk/cds.git] / ms / controllerblueprints / application / load / blueprints / baseconfiguration / Definitions / activation-blueprint.json
1 {
2   "metadata": {
3     "template_author": "Brinda Santh Muthuramalingam",
4     "author-email": "brindasanth@gmail.com",
5     "user-groups": "ADMIN, OPERATION",
6     "template_name": "baseconfiguration",
7     "template_version": "1.0.0",
8     "template_tags": "brinda, tosca"
9   },
10   "topology_template": {
11     "inputs": {
12       "request-id": {
13         "required": true,
14         "type": "string"
15       },
16       "action-name": {
17         "required": true,
18         "type": "string"
19       },
20       "scope-type": {
21         "required": true,
22         "type": "string"
23       },
24       "hostname": {
25         "required": true,
26         "type": "string"
27       }
28     },
29     "node_templates": {
30       "activate-process": {
31         "type": "bpmn-activate",
32         "properties": {
33           "process-name": {
34             "get_input": "action-name"
35           },
36           "version": {
37             "get_property": [
38               "SELF",
39               "process-name"
40             ]
41           },
42           "content": {
43             "get_artifact": [
44               "SELF",
45               "activate-process"
46             ]
47           }
48         },
49         "artifacts": {
50           "activate-process": {
51             "type": "artifact-bpmn-camunda",
52             "file": "Plans/ActivateProcess.bpmn"
53           }
54         }
55       },
56       "resource-assignment": {
57         "type": "component-resource-assignment",
58         "properties": {
59           "request-id": "1234"
60         },
61         "interfaces": {
62           "DefaultComponentNode": {
63             "operations": {
64               "process": {
65                 "inputs": {
66                   "action-name": {
67                     "get_input": "action-name"
68                   },
69                   "resource-type": "vnf-type",
70                   "request-id": {
71                     "get_input": "request-id"
72                   },
73                   "resource-id": {
74                     "get_input": "hostname"
75                   },
76                   "template-content": {
77                     "get_artifact": [
78                       "SELF",
79                       "baseconfig-template"
80                     ]
81                   },
82                   "mapping-content": {
83                     "get_artifact": [
84                       "SELF",
85                       "baseconfig-mapping"
86                     ]
87                   }
88                 },
89                 "outputs": {
90                   "resource-assignment-params": "",
91                   "status": ""
92                 }
93               }
94             }
95           }
96         },
97         "artifacts": {
98           "baseconfig-template": {
99             "type": "artifact-template-velocity",
100             "file": "Templates/baseconfig-template.vtl"
101           },
102           "baseconfig-mapping": {
103             "type": "artifact-mapping-resource",
104             "file": "Mappings/baseconfig-mapping.json"
105           }
106         }
107       },
108       "resource-assignment-py": {
109         "type": "component-resource-assignment",
110         "properties": {
111           "request-id": "1234"
112         },
113         "interfaces": {
114           "DefaultComponentNode": {
115             "operations": {
116               "process": {
117                 "implementation": {
118                   "primary": "component-script"
119                 },
120                 "inputs": {
121                   "action-name": {
122                     "get_input": "action-name"
123                   }
124                 },
125                 "outputs": {
126                   "resource-assignment-params": "",
127                   "status": ""
128                 }
129               }
130             }
131           }
132         },
133         "artifacts": {
134           "component-script": {
135             "type": "artifact-script-python",
136             "file": "Scripts/baseconfig-template.vtl"
137           }
138         }
139       }
140     },
141     "workflows": {
142       "activate-process": {
143         "steps": {
144           "call-resource-assignment": {
145             "description": "Invoke Resource Assignment Component",
146             "target": "resource-assignment",
147             "activities": [
148               {
149                 "call_operation": "ResourceAssignmentNode.process"
150               }
151             ],
152             "on_success": [
153               "download-baseconfig"
154             ]
155           },
156           "download-baseconfig": {
157             "description": "Call Download Base Config Component",
158             "target": "activate-netconf",
159             "activities": [
160               {
161                 "call_operation": "NetconfTransactionNode.process"
162               }
163             ],
164             "on_success": [
165               "download-licence"
166             ]
167           },
168           "download-licence": {
169             "description": "Call Download Licence Component",
170             "target": "activate-netconf",
171             "activities": [
172               {
173                 "call_operation": "NetconfTransactionNode.process"
174               }
175             ]
176           }
177         }
178       }
179     }
180   },
181   "artifact_types": {
182     "artifact-template-velocity": {
183       "description": " Velocity Template used for Configuration",
184       "version": "1.0.0",
185       "file_ext": [
186         "vtl"
187       ],
188       "derived_from": "tosca.artifacts.Implementation"
189     },
190     "artifact-mapping-resource": {
191       "description": " Velocity Template Resource Mapping File used along with Configuration template",
192       "version": "1.0.0",
193       "file_ext": [
194         "json"
195       ],
196       "derived_from": "tosca.artifacts.Implementation"
197     },
198     "artifact-script-kotlin": {
199       "description": " Kotlin Script Template used for Configuration",
200       "version": "1.0.0",
201       "file_ext": [
202         "kt"
203       ],
204       "derived_from": "tosca.artifacts.Implementation"
205     },
206     "artifact-script-python": {
207       "description": " Kotlin Script Template used for Configuration",
208       "version": "1.0.0",
209       "file_ext": [
210         "py"
211       ],
212       "derived_from": "tosca.artifacts.Implementation"
213     },
214     "artifact-bpmn-camunda": {
215       "description": " Camunda BPM File",
216       "version": "1.0.0",
217       "file_ext": [
218         "bpmn"
219       ],
220       "derived_from": "tosca.artifacts.Implementation"
221     },
222     "artifact-component-jar": {
223       "description": "Component Jar",
224       "version": "1.0.0",
225       "file_ext": [
226         "jar"
227       ],
228       "derived_from": "tosca.artifacts.Implementation"
229     }
230   },
231   "node_types": {
232     "bpmn-activate": {
233       "description": "This is BPMN Activate node type",
234       "version": "1.0.0",
235       "properties": {
236         "content": {
237           "required": false,
238           "type": "string"
239         },
240         "process-name": {
241           "required": false,
242           "type": "string"
243         },
244         "version": {
245           "required": false,
246           "type": "string",
247           "default": "LATEST"
248         }
249       },
250       "derived_from": "tosca.nodes.DG"
251     },
252     "tosca.nodes.Component": {
253       "description": "This is Resource Assignment Component API",
254       "version": "1.0.0",
255       "derived_from": "tosca.nodes.Root"
256     },
257     "tosca.nodes.DG": {
258       "description": "This is Directed Graph Node Type",
259       "version": "1.0.0",
260       "derived_from": "tosca.nodes.Root"
261     },
262     "tosca.nodes.component.Python": {
263       "description": "This is Resource Assignment Python Component API",
264       "version": "1.0.0",
265       "derived_from": "tosca.nodes.Root"
266     },
267     "component-resource-assignment": {
268       "description": "This is Resource Assignment Component API",
269       "version": "1.0.0",
270       "properties": {
271         "request-id": {
272           "description": "Request Id used to store the generated configuration, in the database along with the template-name",
273           "required": true,
274           "type": "string"
275         }
276       },
277       "interfaces": {
278         "DefaultComponentNode": {
279           "operations": {
280             "process": {
281               "inputs": {
282                 "action-name": {
283                   "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
284                   "required": false,
285                   "type": "string"
286                 },
287                 "resource-type": {
288                   "required": false,
289                   "type": "string"
290                 },
291                 "request-id": {
292                   "description": "Request Id used to store the generated configuration, in the database along with the template-name",
293                   "required": true,
294                   "type": "string"
295                 },
296                 "resource-id": {
297                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
298                   "required": true,
299                   "type": "string"
300                 },
301                 "template-content": {
302                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
303                   "required": true,
304                   "type": "string"
305                 },
306                 "mapping-content": {
307                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
308                   "required": true,
309                   "type": "string"
310                 }
311               },
312               "outputs": {
313                 "resource-assignment-params": {
314                   "required": true,
315                   "type": "string"
316                 },
317                 "status": {
318                   "required": true,
319                   "type": "string"
320                 }
321               }
322             }
323           }
324         }
325       },
326       "derived_from": "tosca.nodes.Component"
327     },
328     "component-resource-assignment-python": {
329       "description": "This is Resource Assignment Component API",
330       "version": "1.0.0",
331       "properties": {
332         "request-id": {
333           "description": "Request Id used to store the generated configuration, in the database along with the template-name",
334           "required": true,
335           "type": "string"
336         }
337       },
338       "interfaces": {
339         "DefaultComponentNode": {
340           "operations": {
341             "process": {
342               "inputs": {
343                 "action-name": {
344                   "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
345                   "required": false,
346                   "type": "string"
347                 }
348               },
349               "outputs": {
350                 "resource-assignment-params": {
351                   "required": true,
352                   "type": "string"
353                 },
354                 "status": {
355                   "required": true,
356                   "type": "string"
357                 }
358               }
359             }
360           }
361         }
362       },
363       "derived_from": "tosca.nodes.component.Python"
364     }
365   },
366   "data_types": {
367     "sample-property": {
368       "description": "This is sample data type",
369       "version": "1.0.0",
370       "properties": {
371         "content": {
372           "required": false,
373           "type": "string"
374         },
375         "process-name": {
376           "required": false,
377           "type": "string"
378         },
379         "version": {
380           "required": false,
381           "type": "string",
382           "default": "LATEST"
383         }
384       },
385       "derived_from": "tosca.datatypes.Root"
386     }
387   }
388 }