K8s Profile Upload
[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" : "abdelmuhaimen.seaudi@orange.com",
6     "user-groups" : "ADMIN, OPERATION",
7     "template_name" : "vFW_CNF_CDS",
8     "template_version" : "1.0.0",
9     "template_tags" : "Samuli Silvius, vFW_CNF_CDS",
10     "template_type" : "DEFAULT"
11   },
12   "imports" : [ {
13     "file" : "Definitions/data_types.json"
14   }, {
15     "file" : "Definitions/relationship_types.json"
16   }, {
17     "file" : "Definitions/artifact_types.json"
18   }, {
19     "file" : "Definitions/node_types.json"
20   }, {
21     "file" : "Definitions/policy_types.json"
22   } ],
23   "dsl_definitions" : {
24     "ipam-1" : {
25       "type" : "token-auth",
26       "url" : "http://netbox-nginx:8080",
27       "token" : "Token 0123456789abcdef0123456789abcdef01234567"
28     },
29     "vpkg-rest-api" : {
30       "type" : "basic-auth",
31       "url" : "http://",
32       "username" : "admin",
33       "password" : "admin"
34     },
35     "multicloud-k8s-api" : {
36       "type" : "basic-auth",
37       "username" : "admin",
38       "password" : "admin",
39       "url" : "http://multicloud-k8s:9015"
40     },
41     "profile-upload-properties" : {
42       "resolution-key" : {
43         "get_input" : "resolution-key"
44       },
45       "api-access": "*multicloud-k8s-api"
46     },
47     "config-deploy-properties" : {
48       "resolution-key" : {
49         "get_input" : "resolution-key"
50       }
51     },
52     "dynamic-db-source" : {
53       "type" : "maria-db",
54       "url" : "jdbc:mysql://mariadb-galera:3306/sdnctl",
55       "username" : "root",
56       "password" : "secretpassword"
57     }
58   },
59   "topology_template" : {
60     "workflows" : {
61       "resource-assignment" : {
62         "steps" : {
63           "resource-assignment" : {
64             "description" : "Resource Assign Workflow",
65             "target" : "resource-assignment",
66             "activities": [
67               {
68                 "call_operation": "ResourceResolutionComponent.process"
69               }
70             ],
71             "on_success": [
72               "profile-upload"
73             ]
74           },
75           "profile-upload" : {
76             "description" : "Upload K8s Profile",
77             "target" : "profile-upload",
78             "activities": [
79               {
80                 "call_operation": "ComponentScriptExecutor.process"
81               }
82             ]
83           }
84         },
85         "inputs" : {
86           "template-prefix" : {
87             "required" : true,
88             "type" : "list",
89             "entry_schema" : {
90               "type" : "string"
91             }
92           },
93           "resolution-key" : {
94             "required" : false,
95             "type" : "string",
96             "entry_schema" : {
97               "type" : ""
98             }
99           },
100           "resource-assignment-properties" : {
101             "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).",
102             "required" : true,
103             "type" : "dt-resource-assignment-properties"
104           }
105         },
106         "outputs" : {
107           "meshed-template" : {
108             "type" : "json",
109             "value" : {
110               "get_attribute" : [ "resource-assignment", "assignment-params" ]
111             }
112           }
113         }
114       },
115       "config-deploy" : {
116         "steps" : {
117           "config-deploy" : {
118             "description" : "Config Deploy Workflow",
119             "target" : "config-deploy-process"
120           }
121         },
122         "inputs" : {
123           "config-deploy-properties" : {
124             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
125             "required" : true,
126             "type" : "dt-config-deploy-properties"
127           }
128         },
129         "outputs" : {
130           "dry-run" : {
131             "type" : "json",
132             "value" : {
133               "get_attribute" : [ "config-deploy-process", "assignment-params" ]
134             }
135           }
136         }
137       }
138     },
139     "node_templates" : {
140       "resource-assignment" : {
141         "type" : "component-resource-resolution",
142         "interfaces" : {
143           "ResourceResolutionComponent" : {
144             "operations" : {
145               "process" : {
146                 "inputs" : {
147                   "artifact-prefix-names" : {
148                     "get_input" : "template-prefix"
149                   }
150                 },
151                 "store-result": true,
152                 "resolution-key": {
153                   "get_input" : "resolution-key"
154                 }
155               }
156             }
157           }
158         },
159         "artifacts" : {
160           "base_template-template" : {
161             "type" : "artifact-template-velocity",
162             "file" : "Templates/base_template-template.vtl"
163           },
164           "base_template-mapping" : {
165             "type" : "artifact-mapping-resource",
166             "file" : "Templates/base_template-mapping.json"
167           },
168           "vpkg-template" : {
169             "type" : "artifact-template-velocity",
170             "file" : "Templates/vpkg-template.vtl"
171           },
172           "vpkg-mapping" : {
173             "type" : "artifact-mapping-resource",
174             "file" : "Templates/vpkg-mapping.json"
175           },
176           "vfw-template" : {
177             "type" : "artifact-template-velocity",
178             "file" : "Templates/vfw-template.vtl"
179           },
180           "vfw-mapping" : {
181             "type" : "artifact-mapping-resource",
182             "file" : "Templates/vfw-mapping.json"
183           },
184           "vnf-template" : {
185             "type" : "artifact-template-velocity",
186             "file" : "Templates/vnf-template.vtl"
187           },
188           "vnf-mapping" : {
189             "type" : "artifact-mapping-resource",
190             "file" : "Templates/vnf-mapping.json"
191           },
192           "vsn-template" : {
193             "type" : "artifact-template-velocity",
194             "file" : "Templates/vsn-template.vtl"
195           },
196           "vsn-mapping" : {
197             "type" : "artifact-mapping-resource",
198             "file" : "Templates/vsn-mapping.json"
199           }
200         }
201       },
202       "profile-upload" : {
203         "type" : "component-script-executor",
204         "interfaces" : {
205           "ComponentScriptExecutor" : {
206             "operations" : {
207               "process" : {
208                 "inputs" : {
209                   "script-type" : "kotlin",
210                   "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.K8sProfileUpload",
211                   "instance-dependencies" : [ ],
212                   "dynamic-properties" : "*profile-upload-properties"
213                 }
214               }
215             }
216           }
217         }
218       },
219       "config-deploy-process" : {
220         "type" : "component-resource-resolution",
221         "interfaces" : {
222           "ResourceResolutionComponent" : {
223             "operations" : {
224               "process" : {
225                 "inputs" : {
226                   "artifact-prefix-names" : [ "nf-params" ]
227                 }
228               }
229             }
230           }
231         },
232         "artifacts" : {
233           "nf-params-template" : {
234             "type" : "artifact-template-velocity",
235             "file" : "Templates/nf-params-template.vtl"
236           },
237           "nf-params-mapping" : {
238             "type" : "artifact-mapping-resource",
239             "file" : "Templates/nf-params-mapping.json"
240           }
241         }
242       }
243     }
244   }
245 }