Data dictionary fixes and improvements from vFW CNF demo
[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                "status": {
218                   "description": "Status of the Component Execution ( success or failure )",
219                   "required": true,
220                   "type": "string"
221                }
222             }
223          },
224          "ScaleOutReconfiguration": {
225             "steps": {
226          
227                "imperative-workflow-step-0": {
228                   "description": "Config Assign Workflow",
229                   "target": "ScaleOutReconfiguration",
230                   "activities": [
231                      {
232                         "call_operation": "ResourceResolutionComponent.process"
233                      }
234                   ],
235                   "on_success": [
236                      "imperative-workflow-step-1"
237                   ]
238                },
239                                  "imperative-workflow-step-1": {
240                   "description": "resolve ip for vlb",
241                   "target": "nf-account-collection",
242                   "activities": [
243                      {
244                         "call_operation": "ResourceResolutionComponent.process"
245                      }
246                   ],
247                   "on_success": [
248                      "imperative-workflow-step-2"
249                   ]
250                },
251                "imperative-workflow-step-2": {
252                   "description": "execute restconf",
253                   "target": "execute",
254                   "activities": [
255                      {
256                         "call_operation": "ComponentScriptExecutor.process"
257                      }
258                   ]
259                }
260             },
261             "inputs": {
262                "resolution-key": {
263                   "required": false,
264                   "type": "string"
265                },
266                "service-instance-id": {
267                   "required": false,
268                   "type": "string"
269                },
270                "ScaleOutReconfiguration-properties": {
271                   "description": "Dynamic PropertyDefinition for workflow(ScaleOutReconfiguration).",
272                   "required": true,
273                   "type": "dt-ScaleOutReconfiguration-properties"
274                }
275             }
276          },
277          "vf-config-assign": {
278             "steps": {
279                "config-assign": {
280                   "description": "Config Assign Workflow",
281                   "target": "config-assign",
282                   "activities": [
283                      {
284                         "call_operation": ""
285                      }
286                   ]
287                }
288             },
289             "inputs": {
290                "resolution-key": {
291                   "required": true,
292                   "type": "string"
293                },
294                "config-assign-properties": {
295                   "description": "Dynamic PropertyDefinition for workflow(config-assign).",
296                   "required": true,
297                   "type": "dt-config-assign-properties"
298                }
299             },
300             "outputs": {
301                "dry-run": {
302                   "type": "json",
303                   "value": {
304                      "get_attribuxte": [
305                         "config-assign",
306                         "assignment-params"
307                      ]
308                   }
309                }
310             }
311          },
312          "vf-config-deploy": {
313             "steps": {
314                "imperative-workflow-step-1": {
315                   "description": "resolve ip for vlb",
316                   "target": "nf-account-collection",
317                   "activities": [
318                      {
319                         "call_operation": "ResourceResolutionComponent.process"
320                      }
321                   ],
322                   "on_success": [
323                      "imperative-workflow-step-2"
324                   ]
325                },
326                "imperative-workflow-step-2": {
327                   "description": "execute restconf",
328                   "target": "execute",
329                   "activities": [
330                      {
331                         "call_operation": "ComponentScriptExecutor.process"
332                      }
333                   ]
334                }
335             },
336             "inputs": {
337                "resolution-key": {
338                   "required": false,
339                   "type": "string"
340                },
341                "service-instance-id": {
342                   "required": false,
343                   "type": "string"
344                },
345                "config-deploy-properties": {
346                   "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
347                   "required": true,
348                   "type": "dt-config-deploy-properties"
349                }
350             }
351          }
352       },
353       "node_templates": {
354          "resource-assignment": {
355             "type": "component-resource-resolution",
356             "interfaces": {
357                "ResourceResolutionComponent": {
358                   "operations": {
359                      "process": {
360                         "inputs": {
361                            "resolution-summary": true,
362                            "artifact-prefix-names": {
363                               "get_input": "template-prefix"
364                            }
365                         }
366                      }
367                   }
368                }
369             },
370             "artifacts": {
371                "base_template-mapping": {
372                   "type": "artifact-mapping-resource",
373                   "file": "Templates/base_template-mapping.json"
374                },
375                "vpkg-mapping": {
376                   "type": "artifact-mapping-resource",
377                   "file": "Templates/vpkg-mapping.json"
378                },
379                "vdns-mapping": {
380                   "type": "artifact-mapping-resource",
381                   "file": "Templates/vdns-mapping.json"
382                },
383                "vnf-mapping": {
384                   "type": "artifact-mapping-resource",
385                   "file": "Templates/vnf-mapping.json"
386                },
387                "vlb-mapping": {
388                   "type": "artifact-mapping-resource",
389                   "file": "Templates/vlb-mapping.json"
390                }
391             }
392          },
393          "config-assign": {
394             "type": "component-resource-resolution",
395             "interfaces": {
396                "ResourceResolutionComponent": {
397                   "operations": {
398                      "process": {
399                         "inputs": {
400                            "resolution-key": {
401                               "get_input": "resolution-key"
402                            },
403                            "store-result": true,
404                            "artifact-prefix-names": [
405                               "baseconfig"
406                            ]
407                         }
408                      }
409                   }
410                }
411             },
412             "artifacts": {
413                "baseconfig-template": {
414                   "type": "artifact-template-velocity",
415                   "file": "Templates/baseconfig-template.vtl"
416                },
417                "baseconfig-mapping": {
418                   "type": "artifact-mapping-resource",
419                   "file": "Templates/baseconfig-mapping.json"
420                }
421             }
422          },
423          "ScaleOutReconfiguration": {
424             "type": "component-resource-resolution",
425             "interfaces": {
426                "ResourceResolutionComponent": {
427                   "operations": {
428                      "process": {
429                         "inputs": {
430                            "resolution-key": {
431                               "get_input": "resolution-key"
432                                                           },
433                            "store-result": true,
434                            "artifact-prefix-names": [
435                               "baseconfig"
436                            ]
437                         }
438                      }
439                   }
440                }
441             },
442             "artifacts": {
443                "baseconfig-template": {
444                   "type": "artifact-template-velocity",
445                   "file": "Templates/baseconfig-template.vtl"
446                },
447                "baseconfig-mapping": {
448                   "type": "artifact-mapping-resource",
449                   "file": "Templates/baseconfig-mapping.json"
450                }
451             }
452          },
453          "netconf-device": {
454             "type": "vnf-netconf-device",
455             "capabilities": {
456                "netconf": {
457                   "properties": {
458                      "login-key": "admin",
459                      "login-account": "admin",
460                      "target-ip-address": {
461                         "get_attribute": [
462                            "nf-account-collection",
463                            "",
464                            "assignment-params",
465                            "nf-params"
466                         ]
467                      },
468                      "port-number": 2831,
469                      "connection-time-out": 5
470                   }
471                },
472                "restconf": {
473                   "properties": {
474                      "login-key": "admin",
475                      "login-account": "admin",
476                      "target-ip-address": {
477                         "get_attribute": [
478                            "nf-account-collection",
479                            "",
480                            "assignment-params",
481                            "nf-params"
482                         ]
483                      },
484                      "port-number": 8183,
485                      "connection-time-out": 5
486                   }
487                }
488             }
489          },
490          "nf-account-collection": {
491             "type": "component-resource-resolution",
492             "interfaces": {
493                "ResourceResolutionComponent": {
494                   "operations": {
495                      "process": {
496                         "inputs": {
497                            "artifact-prefix-names": [
498                               "nf-params"
499                            ]
500                         }
501                      }
502                   }
503                }
504             },
505             "artifacts": {
506                "nf-params-template": {
507                   "type": "artifact-template-velocity",
508                   "file": "Templates/nf-params-template.vtl"
509                },
510                "nf-params-mapping": {
511                   "type": "artifact-mapping-resource",
512                   "file": "Templates/nf-params-mapping.json"
513                }
514             }
515          },
516          "execute": {
517             "type": "component-script-executor",
518             "requirements": {
519                "restconf-connection": {
520                   "capability": "restconf",
521                   "node": "netconf-device",
522                   "relationship": "tosca.relationships.ConnectsTo"
523                }
524             },
525             "interfaces": {
526                "ComponentScriptExecutor": {
527                   "operations": {
528                      "process": {
529                         "inputs": {
530                            "script-type": "kotlin",
531                            "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
532                            "instance-dependencies": [],
533                            "dynamic-properties": "*config-deploy-properties"
534                         }
535                      }
536                   }
537                }
538             }
539          },
540          "executeHealthCheck": {
541             "type": "component-script-executor",
542             "requirements": {
543                "restconf-connection": {
544                   "capability": "restconf",
545                   "node": "netconf-device",
546                   "relationship": "tosca.relationships.ConnectsTo"
547                }
548             },
549             "interfaces": {
550                "ComponentScriptExecutor": {
551                   "operations": {
552                      "process": {
553                         "inputs": {
554                            "script-type": "kotlin",
555                            "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.HealthCheck",
556                            "instance-dependencies": [],
557                            "dynamic-properties": "*HealthCheck-properties"
558                         }
559                      }
560                   }
561                }
562             }
563          }
564       }
565    }
566 }