Add cofig-assign and config-deploy to cds workflow
[demo.git] / heat / vFW_CNF_CDS / templates / cba / Definitions / vFW_CNF_CDS.json
1 {
2     "tosca_definitions_version": "controller_blueprint_1_0_0",
3     "metadata": {
4         "template_author": "Samuli Silvius <s.silvius@partner.samsung.com>",
5         "author-email": "lukasz.rajewski@orange.com",
6         "user-groups": "ADMIN, OPERATION",
7         "template_name": "vFW_CNF_CDS",
8         "template_version": "7.0.0",
9         "template_tags": "Samuli Silvius, Lukasz Rajewski, vFW_CNF_CDS",
10         "template_type": "DEFAULT"
11     },
12     "imports": [
13         {
14             "file": "Definitions/data_types.json"
15         },
16         {
17             "file": "Definitions/relationship_types.json"
18         },
19         {
20             "file": "Definitions/artifact_types.json"
21         },
22         {
23             "file": "Definitions/node_types.json"
24         },
25         {
26             "file": "Definitions/policy_types.json"
27         }
28     ],
29     "dsl_definitions": {
30         "vpkg-rest-api": {
31             "type": "basic-auth",
32             "url": "http://",
33             "username": "admin",
34             "password": "admin"
35         },
36         "config-deploy-properties": {
37             "resolution-key": {
38                 "get_input": "resolution-key"
39             }
40         }
41     },
42     "topology_template": {
43         "workflows": {
44             "resource-assignment": {
45                 "steps": {
46                     "resource-assignment": {
47                         "description": "Resource Assign Workflow",
48                         "target": "resource-assignment",
49                         "activities": [
50                             {
51                                 "call_operation": "ResourceResolutionComponent.process"
52                             }
53                         ],
54                         "on_success": [
55                             "profile-upload"
56                         ]
57                     },
58                     "profile-upload": {
59                         "description": "Generate and upload K8s Profile",
60                         "target": "k8s-profile-upload",
61                         "activities": [
62                             {
63                                 "call_operation": "ComponentScriptExecutor.process"
64                             }
65                         ]
66                     }
67                 },
68                 "inputs": {
69                     "template-prefix": {
70                         "required": true,
71                         "type": "list",
72                         "entry_schema": {
73                             "type": "string"
74                         }
75                     },
76                     "resolution-key": {
77                         "required": false,
78                         "type": "string",
79                         "entry_schema": {
80                             "type": ""
81                         }
82                     },
83                     "resource-assignment-properties": {
84                         "description": "Dynamic PropertyDefinition for workflow(resource-assignment).",
85                         "required": true,
86                         "type": "dt-resource-assignment-properties"
87                     }
88                 },
89                 "outputs": {
90                     "meshed-template": {
91                         "type": "json",
92                         "value": {
93                             "get_attribute": [
94                                 "resource-assignment",
95                                 "assignment-params"
96                             ]
97                         }
98                     }
99                 }
100             },
101             "config-assign": {
102                 "steps": {
103                     "config-assign": {
104                         "description": "Create a message",
105                         "target": "config-assign-process",
106                         "activities": [
107                             {
108                                 "call_operation": ""
109                             }
110                         ]
111                     }
112                 },
113                 "inputs": {
114                     "resolution-key": {
115                         "required": true,
116                         "type": "string"
117                     },
118                     "store-result": {
119                         "required": true,
120                         "type": "boolean"
121                     },
122                     "config-assign-properties": {
123                         "description": "Dynamic PropertyDefinition for workflow(config-assign).",
124                         "required": true,
125                         "type": "dt-config-assign-properties"
126                     }
127                 }
128             },
129             "config-deploy": {
130                 "steps": {
131                     "config-deploy": {
132                         "description": "Run kotlin script",
133                         "target": "config-deploy-process"
134                     }
135                 },
136                 "inputs": {
137                     "resolution-key": {
138                         "required": true,
139                         "type": "string"
140                     },
141                     "config-deploy-properties": {
142                         "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
143                         "required": true,
144                         "type": "dt-config-deploy-properties"
145                     }
146                 }
147             }
148         },
149         "node_templates": {
150             "resource-assignment": {
151                 "type": "component-resource-resolution",
152                 "interfaces": {
153                     "ResourceResolutionComponent": {
154                         "operations": {
155                             "process": {
156                                 "inputs": {
157                                     "artifact-prefix-names": {
158                                         "get_input": "template-prefix"
159                                     }
160                                 }
161                             }
162                         }
163                     }
164                 },
165                 "artifacts": {
166                     "helm_base_template-template": {
167                         "type": "artifact-template-velocity",
168                         "file": "Templates/base_template-template.vtl"
169                     },
170                     "helm_base_template-mapping": {
171                         "type": "artifact-mapping-resource",
172                         "file": "Templates/base_template-mapping.json"
173                     },
174                     "helm_vpkg-template": {
175                         "type": "artifact-template-velocity",
176                         "file": "Templates/vpkg-template.vtl"
177                     },
178                     "helm_vpkg-mapping": {
179                         "type": "artifact-mapping-resource",
180                         "file": "Templates/vpkg-mapping.json"
181                     },
182                     "helm_vfw-template": {
183                         "type": "artifact-template-velocity",
184                         "file": "Templates/vfw-template.vtl"
185                     },
186                     "helm_vfw-mapping": {
187                         "type": "artifact-mapping-resource",
188                         "file": "Templates/vfw-mapping.json"
189                     },
190                     "vnf-template": {
191                         "type": "artifact-template-velocity",
192                         "file": "Templates/vnf-template.vtl"
193                     },
194                     "vnf-mapping": {
195                         "type": "artifact-mapping-resource",
196                         "file": "Templates/vnf-mapping.json"
197                     },
198                     "helm_vsn-template": {
199                         "type": "artifact-template-velocity",
200                         "file": "Templates/vsn-template.vtl"
201                     },
202                     "helm_vsn-mapping": {
203                         "type": "artifact-mapping-resource",
204                         "file": "Templates/vsn-mapping.json"
205                     }
206                 }
207             },
208             "k8s-profile-upload": {
209                 "type": "component-k8s-profile-upload",
210                 "interfaces": {
211                     "K8sProfileUploadComponent": {
212                         "operations": {
213                             "process": {
214                                 "inputs": {
215                                     "artifact-prefix-names": {
216                                         "get_input": "template-prefix"
217                                     },
218                                     "resource-assignment-map": {
219                                         "get_attribute": [
220                                             "resource-assignment",
221                                             "assignment-map"
222                                         ]
223                                     }
224                                 }
225                             }
226                         }
227                     }
228                 },
229                 "artifacts": {
230                     "vfw-cnf-cds-base-profile": {
231                         "type": "artifact-k8sprofile-content",
232                         "file": "Templates/k8s-profiles/vfw-cnf-cds-base-profile.tar.gz"
233                     },
234                     "vfw-cnf-cds-vpkg-profile": {
235                         "type": "artifact-k8sprofile-content",
236                         "file": "Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile"
237                     },
238                     "vfw-cnf-cds-vpkg-profile-mapping": {
239                         "type": "artifact-mapping-resource",
240                         "file": "Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json"
241                     }
242                 }
243             },
244             "config-assign-process": {
245                 "type": "component-resource-resolution",
246                 "interfaces": {
247                     "ResourceResolutionComponent": {
248                         "operations": {
249                             "process": {
250                                 "inputs": {
251                                     "resolution-key": {
252                                         "get_input": "resolution-key"
253                                     },
254                                     "store-result": true,
255                                     "artifact-prefix-names": [
256                                         "cnf"
257                                     ]
258                                 },
259                                 "outputs": {
260                                     "resource-assignment-params": {
261                                         "get_attribute": [
262                                             "SELF",
263                                             "assignment-params"
264                                         ]
265                                     },
266                                     "status": "success"
267                                 }
268                             }
269                         }
270                     }
271                 },
272                 "artifacts": {
273                     "cnf-template": {
274                         "type": "artifact-template-velocity",
275                         "file": "Templates/cnf-template.vtl"
276                     },
277                     "cnf-mapping": {
278                         "type": "artifact-mapping-resource",
279                         "file": "Templates/cnf-mapping.json"
280                     }
281                 }
282             },
283             "config-deploy-process": {
284                 "type": "component-script-executor",
285                 "interfaces": {
286                     "ComponentScriptExecutor": {
287                         "operations": {
288                             "process": {
289                                 "inputs": {
290                                     "script-type": "kotlin",
291                                     "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
292                                     "dynamic-properties": "*config-deploy-properties"
293                                 }
294                             }
295                         }
296                     }
297                 }
298             }
299         }
300     }
301 }