Description: Create RESTCONF based vLB CBA Blueprint
[ccsdk/cds.git] / components / model-catalog / blueprint-model / service-blueprint / vLB_CDS_RESTCONF / 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_RESTCONF",
8     "template_version" : "1.0.0",
9     "template_tags" : "vLB_CDS, RestConf"
10   },
11   "imports" : [ {
12     "file" : "Definitions/data_types.json"
13   }, {
14     "file" : "Definitions/relationship_types.json"
15   }, {
16     "file" : "Definitions/artifact_types.json"
17   }, {
18     "file" : "Definitions/node_types.json"
19   }, {
20     "file" : "Definitions/policy_types.json"
21   } ],
22   "dsl_definitions" : {
23     "ipam-1" : {
24       "type" : "token-auth",
25       "url" : "http://netbox-nginx:8080",
26       "token" : "Token 0123456789abcdef0123456789abcdef01234567"
27     },
28     "config-deploy-properties" : {
29       "resolution-key" : {
30         "get_input" : "resolution-key"
31       }
32     },
33     "dynamic-db-source" : {
34       "type" : "maria-db",
35       "url" : "jdbc:mysql://mariadb-galera:3306/sdnctl",
36       "username" : "root",
37       "password" : "secretpassword"
38     }
39   },
40   "topology_template" : {
41     "workflows" : {
42       "resource-assignment" : {
43         "steps" : {
44           "resource-assignment" : {
45             "description" : "Resource Assign Workflow",
46             "target" : "resource-assignment"
47           }
48         },
49         "inputs" : {
50           "template-prefix" : {
51             "required" : true,
52             "type" : "list",
53             "entry_schema" : {
54               "type" : "string"
55             }
56           },
57           "resource-assignment-properties" : {
58             "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).",
59             "required" : true,
60             "type" : "dt-resource-assignment-properties"
61           }
62         },
63         "outputs" : {
64           "meshed-template" : {
65             "type" : "json",
66             "value" : {
67               "get_attribute" : [ "resource-assignment", "assignment-params" ]
68             }
69           }
70         }
71       },
72       "config-assign" : {
73         "steps" : {
74           "config-assign" : {
75             "description" : "Config Assign Workflow",
76             "target" : "config-assign",
77             "activities" : [ {
78               "call_operation" : ""
79             } ]
80           }
81         },
82         "inputs" : {
83           "resolution-key" : {
84             "required" : true,
85             "type" : "string"
86           },
87           "config-assign-properties" : {
88             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
89             "required" : true,
90             "type" : "dt-config-assign-properties"
91           }
92         },
93         "outputs" : {
94           "dry-run" : {
95             "type" : "json",
96             "value" : {
97               "get_attribuxte" : [ "config-assign", "assignment-params" ]
98             }
99           }
100         }
101       },
102       "config-deploy" : {
103         "steps" : {
104           "config-deploy" : {
105             "description" : "Resource Assign and Python Netconf Activation Workflow",
106             "target" : "config-deploy-process",
107             "activities" : [ {
108               "call_operation" : ""
109             } ]
110           }
111         },
112         "inputs" : {
113           "resolution-key" : {
114             "required" : false,
115             "type" : "string"
116           },
117           "service-instance-id" : {
118             "required" : false,
119             "type" : "string"
120           },
121           "config-deploy-properties" : {
122             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
123             "required" : true,
124             "type" : "dt-config-deploy-properties"
125           }
126         }
127       }
128     },
129     "node_templates" : {
130       "resource-assignment" : {
131         "type" : "component-resource-resolution",
132         "interfaces" : {
133           "ResourceResolutionComponent" : {
134             "operations" : {
135               "process" : {
136                 "inputs" : {
137                   "artifact-prefix-names" : {
138                     "get_input" : "template-prefix"
139                   }
140                 }
141               }
142             }
143           }
144         },
145         "artifacts" : {
146           "base_template-template" : {
147             "type" : "artifact-template-velocity",
148             "file" : "Templates/base_template-template.vtl"
149           },
150           "base_template-mapping" : {
151             "type" : "artifact-mapping-resource",
152             "file" : "Templates/base_template-mapping.json"
153           },
154           "vpkg-template" : {
155             "type" : "artifact-template-velocity",
156             "file" : "Templates/vpkg-template.vtl"
157           },
158           "vpkg-mapping" : {
159             "type" : "artifact-mapping-resource",
160             "file" : "Templates/vpkg-mapping.json"
161           },
162           "vdns-template" : {
163             "type" : "artifact-template-velocity",
164             "file" : "Templates/vdns-template.vtl"
165           },
166           "vdns-mapping" : {
167             "type" : "artifact-mapping-resource",
168             "file" : "Templates/vdns-mapping.json"
169           },
170           "vnf-template" : {
171             "type" : "artifact-template-velocity",
172             "file" : "Templates/vnf-template.vtl"
173           },
174           "vnf-mapping" : {
175             "type" : "artifact-mapping-resource",
176             "file" : "Templates/vnf-mapping.json"
177           },
178           "vlb-template" : {
179             "type" : "artifact-template-velocity",
180             "file" : "Templates/vlb-template.vtl"
181           },
182           "vlb-mapping" : {
183             "type" : "artifact-mapping-resource",
184             "file" : "Templates/vlb-mapping.json"
185           }
186         }
187       },
188       "config-assign" : {
189         "type" : "component-resource-resolution",
190         "interfaces" : {
191           "ResourceResolutionComponent" : {
192             "operations" : {
193               "process" : {
194                 "inputs" : {
195                   "resolution-key" : {
196                     "get_input" : "resolution-key"
197                   },
198                   "store-result" : true,
199                   "artifact-prefix-names" : [ "baseconfig", "incremental-config" ]
200                 }
201               }
202             }
203           }
204         },
205         "artifacts" : {
206           "baseconfig-template" : {
207             "type" : "artifact-template-velocity",
208             "file" : "Templates/baseconfig-template.vtl"
209           },
210           "baseconfig-mapping" : {
211             "type" : "artifact-mapping-resource",
212             "file" : "Templates/baseconfig-mapping.json"
213           },
214           "incremental-config-template" : {
215             "type" : "artifact-template-velocity",
216             "file" : "Templates/incremental-config-template.vtl"
217           },
218           "incremental-config-mapping" : {
219             "type" : "artifact-mapping-resource",
220             "file" : "Templates/incremental-config-mapping.json"
221           }
222         }
223       },
224       "netconf-device" : {
225         "type" : "vnf-netconf-device",
226         "capabilities" : {
227           "netconf" : {
228             "properties" : {
229               "login-key" : "admin",
230               "login-account" : "admin",
231               "target-ip-address" : {
232                 "get_attribute" : [ "nf-account-collection", "", "assignment-params", "nf-params" ]
233               },
234               "port-number" : 2831,
235               "connection-time-out" : 5
236             }
237           },
238           "restconf" : {
239             "properties" : {
240               "login-key" : "admin",
241               "login-account" : "admin",
242               "target-ip-address" : {
243                 "get_attribute" : [ "nf-account-collection", "", "assignment-params", "nf-params" ]
244               },
245               "port-number" : 8183,
246               "connection-time-out" : 5
247             }
248           }
249         }
250       },
251       "config-deploy-process" : {
252         "type" : "dg-generic",
253         "properties" : {
254           "content" : {
255             "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
256           },
257           "dependency-node-templates" : [ "nf-account-collection", "execute" ]
258         },
259         "artifacts" : {
260           "dg-config-deploy-process" : {
261             "type" : "artifact-directed-graph",
262             "file" : "Plans/CONFIG_ConfigDeploy.xml"
263           }
264         }
265       },
266       "nf-account-collection" : {
267         "type" : "component-resource-resolution",
268         "interfaces" : {
269           "ResourceResolutionComponent" : {
270             "operations" : {
271               "process" : {
272                 "inputs" : {
273                   "artifact-prefix-names" : [ "nf-params" ]
274                 }
275               }
276             }
277           }
278         },
279         "artifacts" : {
280           "nf-params-template" : {
281             "type" : "artifact-template-velocity",
282             "file" : "Templates/nf-params-template.vtl"
283           },
284           "nf-params-mapping" : {
285             "type" : "artifact-mapping-resource",
286             "file" : "Templates/nf-params-mapping.json"
287           }
288         }
289       },
290       "execute" : {
291         "type" : "component-script-executor",
292         "requirements" : {
293           "restconf-connection" : {
294             "capability" : "restconf",
295             "node" : "netconf-device",
296             "relationship" : "tosca.relationships.ConnectsTo"
297           }
298         },
299         "interfaces" : {
300           "ComponentScriptExecutor" : {
301             "operations" : {
302               "process" : {
303                 "inputs" : {
304                   "script-type" : "kotlin",
305                   "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
306                   "instance-dependencies" : [ ],
307                   "dynamic-properties" : "*config-deploy-properties"
308                 }
309               }
310             }
311           }
312         }
313       }
314     }
315   }
316 }