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