Fix service blueprints
[ccsdk/cds.git] / components / model-catalog / blueprint-model / service-blueprint / vLB / Definitions / vLB_CDS.json
1 {
2    "tosca_definitions_version": "controller_blueprint_1_0_0",
3    "metadata": {
4       "template_author": "Abdelmuhaimen Seaudi",
5       "author-email": "abdelmuhaimen.seaudi@orange.com",
6       "user-groups": "ADMIN, OPERATION",
7       "template_name": "vLB_CDS",
8       "template_version": "1.0.0",
9       "template_tags": "vLB, CDS, RESTONF, IMPERATIVE"
10    },
11    "imports": [
12       {
13          "file": "Definitions/data_types.json"
14       },
15       {
16          "file": "Definitions/relationship_types.json"
17       },
18       {
19          "file": "Definitions/artifact_types.json"
20       },
21       {
22          "file": "Definitions/node_types.json"
23       },
24       {
25          "file": "Definitions/policy_types.json"
26       }
27    ],
28    "dsl_definitions": {
29       "ipam-1": {
30          "type": "token-auth",
31          "url": "http://netbox-nginx:8080",
32          "token": "Token 0123456789abcdef0123456789abcdef01234567"
33       },
34       "naming-resolution": {
35          "type": "basic-auth",
36          "url": "http://neng-serv:8080/web/service",
37          "username": "ccsdkapps",
38          "password": "ccsdkapps"
39       },
40       "config-deploy-properties": {
41          "resolution-key": {
42             "get_input": "resolution-key"
43          }
44       },
45       "HealthCheck-properties": {
46          "resolution-key": {
47             "get_input": "resolution-key"
48          }
49       },
50       "ScaleOutReconfiguration-properties": {
51          "resolution-key": {
52             "get_input": "resolution-key"
53          }
54       }
55    },
56    "topology_template": {
57       "workflows": {
58          "resource-assignment": {
59             "steps": {
60                "resource-assignment": {
61                   "description": "Resource Assign Workflow",
62                   "target": "resource-assignment"
63                }
64             },
65             "inputs": {
66                "template-prefix": {
67                   "required": true,
68                   "type": "list",
69                   "entry_schema": {
70                      "type": "string"
71                   }
72                },
73                "resource-assignment-properties": {
74                   "description": "Dynamic PropertyDefinition for workflow(resource-assignment).",
75                   "required": true,
76                   "type": "dt-resource-assignment-properties"
77                }
78             },
79             "outputs": {
80                "resolved-data": {
81                   "type": "json",
82                   "value": {
83                      "get_attribute": [
84                         "resource-assignment",
85                         "assignment-params"
86                      ]
87                   }
88                }
89             }
90          },
91          "config-assign": {
92             "steps": {
93                "config-assign": {
94                   "description": "Config Assign Workflow",
95                   "target": "config-assign",
96                   "activities": [
97                      {
98                         "call_operation": ""
99                      }
100                   ]
101                }
102             },
103             "inputs": {
104                "resolution-key": {
105                   "required": true,
106                   "type": "string"
107                },
108                "config-assign-properties": {
109                   "description": "Dynamic PropertyDefinition for workflow(config-assign).",
110                   "required": true,
111                   "type": "dt-config-assign-properties"
112                }
113             },
114             "outputs": {
115                "dry-run": {
116                   "type": "json",
117                   "value": {
118                      "get_attribuxte": [
119                         "config-assign",
120                         "assignment-params"
121                      ]
122                   }
123                }
124             }
125          },
126          "config-deploy": {
127             "steps": {
128                "imperative-workflow-step-1": {
129                   "description": "resolve ip for vlb",
130                   "target": "nf-account-collection",
131                   "activities": [
132                      {
133                         "call_operation": "ResourceResolutionComponent.process"
134                      }
135                   ],
136                   "on_success": [
137                      "imperative-workflow-step-2"
138                   ]
139                },
140                "imperative-workflow-step-2": {
141                   "description": "execute restconf",
142                   "target": "execute",
143                   "activities": [
144                      {
145                         "call_operation": "ComponentScriptExecutor.process"
146                      }
147                   ]
148                }
149             },
150             "inputs": {
151                "resolution-key": {
152                   "required": false,
153                   "type": "string"
154                },
155                "service-instance-id": {
156                   "required": false,
157                   "type": "string"
158                },
159                "config-deploy-properties": {
160                   "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
161                   "required": true,
162                   "type": "dt-config-deploy-properties"
163                }
164             }
165          },
166          "HealthCheck": {
167             "steps": {
168                "imperative-workflow-step-1": {
169                   "description": "resolve ip for vlb",
170                   "target": "nf-account-collection",
171                   "activities": [
172                      {
173                         "call_operation": "ResourceResolutionComponent.process"
174                      }
175                   ],
176                   "on_success": [
177                      "imperative-workflow-step-2"
178                   ]
179                },
180                "imperative-workflow-step-2": {
181                   "description": "execute restconf",
182                   "target": "executeHealthCheck",
183                   "activities": [
184                      {
185                         "call_operation": "ComponentScriptExecutor.process"
186                      }
187                   ]
188                }
189             },
190             "inputs": {
191                "resolution-key": {
192                   "required": false,
193                   "type": "string"
194                },
195                "service-instance-id": {
196                   "required": false,
197                   "type": "string"
198                },
199                "HealthCheck-properties": {
200                   "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
201                   "required": true,
202                   "type": "dt-HealthCheck-properties"
203                }
204             },
205             "outputs": {
206                "response-data": {
207                   "description": "Execution Response Data.",
208                   "required": false,
209                   "type": "json",
210                   "value": {
211                      "get_attribute": [
212                         "executeHealthCheck",
213                         "response-data"
214                      ]
215                   }
216                }
217             }
218          },
219          "ScaleOutReconfiguration": {
220             "steps": {
221          
222                "imperative-workflow-step-0": {
223                   "description": "Config Assign Workflow",
224                   "target": "ScaleOutReconfiguration",
225                   "activities": [
226                      {
227                         "call_operation": "ResourceResolutionComponent.process"
228                      }
229                   ],
230                   "on_success": [
231                      "imperative-workflow-step-1"
232                   ]
233                },
234                                  "imperative-workflow-step-1": {
235                   "description": "resolve ip for vlb",
236                   "target": "nf-account-collection",
237                   "activities": [
238                      {
239                         "call_operation": "ResourceResolutionComponent.process"
240                      }
241                   ],
242                   "on_success": [
243                      "imperative-workflow-step-2"
244                   ]
245                },
246                "imperative-workflow-step-2": {
247                   "description": "execute restconf",
248                   "target": "execute",
249                   "activities": [
250                      {
251                         "call_operation": "ComponentScriptExecutor.process"
252                      }
253                   ]
254                }
255             },
256             "inputs": {
257                "resolution-key": {
258                   "required": false,
259                   "type": "string"
260                },
261                "service-instance-id": {
262                   "required": false,
263                   "type": "string"
264                },
265                "ScaleOutReconfiguration-properties": {
266                   "description": "Dynamic PropertyDefinition for workflow(ScaleOutReconfiguration).",
267                   "required": true,
268                   "type": "dt-ScaleOutReconfiguration-properties"
269                }
270             }
271          },
272          "vf-config-assign": {
273             "steps": {
274                "config-assign": {
275                   "description": "Config Assign Workflow",
276                   "target": "config-assign",
277                   "activities": [
278                      {
279                         "call_operation": ""
280                      }
281                   ]
282                }
283             },
284             "inputs": {
285                "resolution-key": {
286                   "required": true,
287                   "type": "string"
288                },
289                "config-assign-properties": {
290                   "description": "Dynamic PropertyDefinition for workflow(config-assign).",
291                   "required": true,
292                   "type": "dt-config-assign-properties"
293                }
294             },
295             "outputs": {
296                "dry-run": {
297                   "type": "json",
298                   "value": {
299                      "get_attribuxte": [
300                         "config-assign",
301                         "assignment-params"
302                      ]
303                   }
304                }
305             }
306          },
307          "vf-config-deploy": {
308             "steps": {
309                "imperative-workflow-step-1": {
310                   "description": "resolve ip for vlb",
311                   "target": "nf-account-collection",
312                   "activities": [
313                      {
314                         "call_operation": "ResourceResolutionComponent.process"
315                      }
316                   ],
317                   "on_success": [
318                      "imperative-workflow-step-2"
319                   ]
320                },
321                "imperative-workflow-step-2": {
322                   "description": "execute restconf",
323                   "target": "execute",
324                   "activities": [
325                      {
326                         "call_operation": "ComponentScriptExecutor.process"
327                      }
328                   ]
329                }
330             },
331             "inputs": {
332                "resolution-key": {
333                   "required": false,
334                   "type": "string"
335                },
336                "service-instance-id": {
337                   "required": false,
338                   "type": "string"
339                },
340                "config-deploy-properties": {
341                   "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
342                   "required": true,
343                   "type": "dt-config-deploy-properties"
344                }
345             }
346          }
347       },
348       "node_templates": {
349          "resource-assignment": {
350             "type": "component-resource-resolution",
351             "interfaces": {
352                "ResourceResolutionComponent": {
353                   "operations": {
354                      "process": {
355                         "inputs": {
356                            "resolution-summary": true,
357                            "artifact-prefix-names": {
358                               "get_input": "template-prefix"
359                            }
360                         }
361                      }
362                   }
363                }
364             },
365             "artifacts": {
366                "base_template-mapping": {
367                   "type": "artifact-mapping-resource",
368                   "file": "Templates/base_template-mapping.json"
369                },
370                "vpkg-mapping": {
371                   "type": "artifact-mapping-resource",
372                   "file": "Templates/vpkg-mapping.json"
373                },
374                "vdns-mapping": {
375                   "type": "artifact-mapping-resource",
376                   "file": "Templates/vdns-mapping.json"
377                },
378                "vnf-mapping": {
379                   "type": "artifact-mapping-resource",
380                   "file": "Templates/vnf-mapping.json"
381                },
382                "vlb-mapping": {
383                   "type": "artifact-mapping-resource",
384                   "file": "Templates/vlb-mapping.json"
385                }
386             }
387          },
388          "config-assign": {
389             "type": "component-resource-resolution",
390             "interfaces": {
391                "ResourceResolutionComponent": {
392                   "operations": {
393                      "process": {
394                         "inputs": {
395                            "resolution-key": {
396                               "get_input": "resolution-key"
397                            },
398                            "store-result": true,
399                            "artifact-prefix-names": [
400                               "baseconfig"
401                            ]
402                         }
403                      }
404                   }
405                }
406             },
407             "artifacts": {
408                "baseconfig-template": {
409                   "type": "artifact-template-velocity",
410                   "file": "Templates/baseconfig-template.vtl"
411                },
412                "baseconfig-mapping": {
413                   "type": "artifact-mapping-resource",
414                   "file": "Templates/baseconfig-mapping.json"
415                }
416             }
417          },
418          "ScaleOutReconfiguration": {
419             "type": "component-resource-resolution",
420             "interfaces": {
421                "ResourceResolutionComponent": {
422                   "operations": {
423                      "process": {
424                         "inputs": {
425                            "resolution-key": {
426                               "get_input": "resolution-key"
427                                                           },
428                            "store-result": true,
429                            "artifact-prefix-names": [
430                               "baseconfig"
431                            ]
432                         }
433                      }
434                   }
435                }
436             },
437             "artifacts": {
438                "baseconfig-template": {
439                   "type": "artifact-template-velocity",
440                   "file": "Templates/baseconfig-template.vtl"
441                },
442                "baseconfig-mapping": {
443                   "type": "artifact-mapping-resource",
444                   "file": "Templates/baseconfig-mapping.json"
445                }
446             }
447          },
448          "netconf-device": {
449             "type": "vnf-netconf-device",
450             "capabilities": {
451                "netconf": {
452                   "properties": {
453                      "login-key": "admin",
454                      "login-account": "admin",
455                      "target-ip-address": {
456                         "get_attribute": [
457                            "nf-account-collection",
458                            "",
459                            "assignment-params",
460                            "nf-params"
461                         ]
462                      },
463                      "port-number": 2831,
464                      "connection-time-out": 5
465                   }
466                },
467                "restconf": {
468                   "properties": {
469                      "login-key": "admin",
470                      "login-account": "admin",
471                      "target-ip-address": {
472                         "get_attribute": [
473                            "nf-account-collection",
474                            "",
475                            "assignment-params",
476                            "nf-params"
477                         ]
478                      },
479                      "port-number": 8183,
480                      "connection-time-out": 5
481                   }
482                }
483             }
484          },
485          "nf-account-collection": {
486             "type": "component-resource-resolution",
487             "interfaces": {
488                "ResourceResolutionComponent": {
489                   "operations": {
490                      "process": {
491                         "inputs": {
492                            "artifact-prefix-names": [
493                               "nf-params"
494                            ]
495                         }
496                      }
497                   }
498                }
499             },
500             "artifacts": {
501                "nf-params-template": {
502                   "type": "artifact-template-velocity",
503                   "file": "Templates/nf-params-template.vtl"
504                },
505                "nf-params-mapping": {
506                   "type": "artifact-mapping-resource",
507                   "file": "Templates/nf-params-mapping.json"
508                }
509             }
510          },
511          "execute": {
512             "type": "component-netconf-executor",
513             "requirements": {
514                "netconf-connection": {
515                   "capability": "restconf",
516                   "node": "netconf-device",
517                   "relationship": "tosca.relationships.ConnectsTo"
518                }
519             },
520             "interfaces": {
521                "ComponentNetconfExecutor": {
522                   "operations": {
523                      "process": {
524                         "inputs": {
525                            "script-type": "kotlin",
526                            "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
527                            "instance-dependencies": [],
528                            "dynamic-properties": "*config-deploy-properties"
529                         }
530                      }
531                   }
532                }
533             }
534          },
535          "executeHealthCheck": {
536             "type": "component-netconf-executor",
537             "requirements": {
538                "netconf-connection": {
539                   "capability": "restconf",
540                   "node": "netconf-device",
541                   "relationship": "tosca.relationships.ConnectsTo"
542                }
543             },
544             "interfaces": {
545                "ComponentNetconfExecutor": {
546                   "operations": {
547                      "process": {
548                         "inputs": {
549                            "script-type": "kotlin",
550                            "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.HealthCheck",
551                            "instance-dependencies": [],
552                            "dynamic-properties": "*HealthCheck-properties"
553                         }
554                      }
555                   }
556                }
557             }
558          }
559       }
560    }
561 }