Merge SW Upgrade Blueprint into PNF_AAI and create one UAT BP for PNF
[ccsdk/cds.git] / components / model-catalog / blueprint-model / uat-blueprints / PNF_CDS_RESTCONF / Definitions / PNF_CDS_RESTCONF.json
1 {
2   "tosca_definitions_version" : "controller_blueprint_1_0_0",
3   "metadata" : {
4     "template_author" : "Raj Gumma",
5     "author-email" : "raj.gumma@est.tech",
6     "user-groups" : "ADMIN, OPERATION",
7     "template_name" : "PNF_CDS_RESTCONF",
8     "template_version" : "1.0.0",
9     "template_tags" : "PNF, Restconf, config, configuration, software upgrade"
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     "config-deploy-properties" : {
24       "resolution-key" : {
25         "get_input" : "resolution-key"
26       }
27     },
28     "precheck-properties" : {
29       "resolution-key" : {
30         "get_input" : "resolution-key"
31       }
32     },
33     "downloadNeSw-properties" : {
34       "resolution-key" : {
35         "get_input" : "resolution-key"
36       }
37     },
38     "activateNeSw-properties" : {
39       "resolution-key" : {
40         "get_input" : "resolution-key"
41       }
42     },
43     "postcheck-properties" : {
44       "resolution-key" : {
45         "get_input" : "resolution-key"
46       }
47     }
48   },
49   "topology_template" : {
50     "workflows" : {
51       "config-assign" : {
52         "steps" : {
53           "activate-process" : {
54             "description" : "Create a configlet",
55             "target" : "config-assign",
56             "activities" : [ {
57               "call_operation" : ""
58             } ]
59           }
60         },
61         "inputs" : {
62           "resolution-key" : {
63             "required" : true,
64             "type" : "string"
65           },
66           "store-result" : {
67             "required" : true,
68             "type" : "boolean"
69           },
70           "config-assign-properties" : {
71             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
72             "required" : true,
73             "type" : "dt-config-assign-properties"
74           }
75         }
76       },
77       "config-deploy" : {
78         "steps" : {
79           "activate-process" : {
80             "description" : "Send a configlet to the pnf",
81             "target" : "config-deploy",
82             "activities" : [ {
83               "call_operation" : ""
84             } ]
85           }
86         },
87         "inputs" : {
88           "resolution-key" : {
89             "required" : true,
90             "type" : "string"
91           },
92           "config-deploy-properties" : {
93             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
94             "required" : true,
95             "type" : "dt-config-deploy-properties"
96           }
97         }
98       },
99       "precheck" : {
100         "steps" : {
101           "activate-process" : {
102             "description" : "Check if pnf ready for sw upgrade",
103             "target" : "precheck",
104             "activities" : [ {
105               "call_operation" : ""
106             } ]
107           }
108         },
109         "inputs" : {
110           "resolution-key" : {
111             "required" : true,
112             "type" : "string"
113           },
114           "precheck-properties" : {
115             "description" : "Dynamic PropertyDefinition for precheck workflow(software-upgrade).",
116             "required" : true,
117             "type" : "dt-precheck-properties"
118           }
119         }
120       },
121       "downloadNeSw" : {
122         "steps" : {
123           "activate-process" : {
124             "description" : "Trigger download new software for sw upgrade",
125             "target" : "downloadNeSw",
126             "activities" : [ {
127               "call_operation" : ""
128             } ]
129           }
130         },
131         "inputs" : {
132           "resolution-key" : {
133             "required" : true,
134             "type" : "string"
135           },
136           "downloadNeSw-properties" : {
137             "description" : "Dynamic PropertyDefinition for downloadNeSw workflow(software-upgrade).",
138             "required" : true,
139             "type" : "dt-downloadNeSw-properties"
140           }
141         }
142       },
143       "activateNeSw" : {
144         "steps" : {
145           "activate-process" : {
146             "description" : "Trigger activation of target software version for pnf upgrade",
147             "target" : "activateNeSw",
148             "activities" : [ {
149               "call_operation" : ""
150             } ]
151           }
152         },
153         "inputs" : {
154           "resolution-key" : {
155             "required" : true,
156             "type" : "string"
157           },
158           "activateNeSw-properties" : {
159             "description" : "Dynamic PropertyDefinition for activateNeSw workflow(software-upgrade).",
160             "required" : true,
161             "type" : "dt-activateNeSw-properties"
162           }
163         }
164       },
165       "postcheck" : {
166         "steps" : {
167           "activate-process" : {
168             "description" : "Check if pnf upgrade is completed",
169             "target" : "postcheck",
170             "activities" : [ {
171               "call_operation" : ""
172             } ]
173           }
174         },
175         "inputs" : {
176           "resolution-key" : {
177             "required" : true,
178             "type" : "string"
179           },
180           "postcheck-properties" : {
181             "description" : "Dynamic PropertyDefinition for postcheck workflow(software-upgrade).",
182             "required" : true,
183             "type" : "dt-postcheck-properties"
184           }
185         }
186       }
187     },
188     "node_templates" : {
189       "config-assign" : {
190         "type" : "component-resource-resolution",
191         "interfaces" : {
192           "ResourceResolutionComponent" : {
193             "operations" : {
194               "process" : {
195                 "inputs" : {
196                   "resolution-key" : {
197                     "get_input" : "resolution-key"
198                   },
199                   "store-result" : true,
200                   "artifact-prefix-names" : [ "config-assign" ]
201                 },
202                 "outputs" : {
203                   "resource-assignment-params" : {
204                     "get_attribute" : [ "SELF", "assignment-params" ]
205                   },
206                   "status" : "success"
207                 }
208               }
209             }
210           }
211         },
212         "artifacts" : {
213           "config-assign-template" : {
214             "type" : "artifact-template-velocity",
215             "file" : "Templates/config-assign-restconf-configlet-template.vtl"
216           },
217           "config-assign-mapping" : {
218             "type" : "artifact-mapping-resource",
219             "file" : "Definitions/config-assign-pnf-mapping.json"
220           }
221         }
222       },
223       "config-deploy" : {
224         "type" : "component-script-executor",
225         "interfaces" : {
226           "ComponentScriptExecutor" : {
227             "operations" : {
228               "process" : {
229                 "implementation" : {
230                   "primary" : "component-script",
231                   "timeout" : 180,
232                   "operation_host" : "SELF"
233                 },
234                 "inputs" : {
235                   "script-type" : "kotlin",
236                   "script-class-reference" : "cba.pnf.config.aai.RestconfConfigDeploy",
237                   "dynamic-properties" : "*config-deploy-properties"
238                 },
239                 "outputs" : {
240                   "response-data" : "",
241                   "status" : "success"
242                 }
243               }
244             }
245           }
246         },
247         "artifacts" : {
248           "config-deploy-template" : {
249             "type" : "artifact-template-velocity",
250             "file" : "Templates/restconf-mount-template.vtl"
251           },
252           "config-deploy-mapping" : {
253             "type" : "artifact-mapping-resource",
254             "file" : "Definitions/config-deploy-pnf-mapping.json"
255           }
256         }
257       },
258       "precheck" : {
259         "type" : "component-script-executor",
260         "interfaces" : {
261           "ComponentScriptExecutor" : {
262             "operations" : {
263               "process" : {
264                 "implementation" : {
265                   "primary" : "component-script",
266                   "timeout" : 180,
267                   "operation_host" : "SELF"
268                 },
269                 "inputs" : {
270                   "script-type" : "kotlin",
271                   "script-class-reference" : "cba.pnf.swug.RestconfSoftwareUpgrade",
272                   "dynamic-properties" : "*precheck-properties"
273                 },
274                 "outputs" : {
275                   "response-data" : "",
276                   "status" : "success"
277                 }
278               }
279             }
280           }
281         },
282         "artifacts" : {
283           "mount-node-template" : {
284             "type" : "artifact-template-velocity",
285             "file" : "Templates/restconf-mount-template.vtl"
286           },
287           "mount-node-mapping" : {
288             "type" : "artifact-mapping-resource",
289             "file" : "Definitions/pnf-software-upgrade-mapping.json"
290           }
291         }
292       },
293       "downloadNeSw" : {
294         "type" : "component-script-executor",
295         "interfaces" : {
296           "ComponentScriptExecutor" : {
297             "operations" : {
298               "process" : {
299                 "implementation" : {
300                   "primary" : "component-script",
301                   "timeout" : 180,
302                   "operation_host" : "SELF"
303                 },
304                 "inputs" : {
305                   "script-type" : "kotlin",
306                   "script-class-reference" : "cba.pnf.swug.RestconfSoftwareUpgrade",
307                   "dynamic-properties" : "*downloadNeSw-properties"
308                 },
309                 "outputs" : {
310                   "response-data" : "",
311                   "status" : "success"
312                 }
313               }
314             }
315           }
316         },
317         "artifacts" : {
318           "mount-node-template" : {
319             "type" : "artifact-template-velocity",
320             "file" : "Templates/restconf-mount-template.vtl"
321           },
322           "mount-node-mapping" : {
323             "type" : "artifact-mapping-resource",
324             "file" : "Definitions/pnf-software-upgrade-mapping.json"
325           },
326           "configure-template" : {
327             "type" : "artifact-template-velocity",
328             "file" : "Templates/pnf-swug-config-template.vtl"
329           },
330           "configure-mapping" : {
331             "type" : "artifact-mapping-resource",
332             "file" : "Definitions/pnf-software-upgrade-mapping.json"
333           },
334           "download-ne-sw-template" : {
335             "type" : "artifact-template-velocity",
336             "file" : "Templates/pnf-swug-download-ne-sw-template.vtl"
337           },
338           "download-ne-sw-mapping" : {
339             "type" : "artifact-mapping-resource",
340             "file" : "Definitions/pnf-software-upgrade-mapping.json"
341           }
342         }
343       },
344       "activateNeSw" : {
345         "type" : "component-script-executor",
346         "interfaces" : {
347           "ComponentScriptExecutor" : {
348             "operations" : {
349               "process" : {
350                 "implementation" : {
351                   "primary" : "component-script",
352                   "timeout" : 180,
353                   "operation_host" : "SELF"
354                 },
355                 "inputs" : {
356                   "script-type" : "kotlin",
357                   "script-class-reference" : "cba.pnf.swug.RestconfSoftwareUpgrade",
358                   "dynamic-properties" : "*activateNeSw-properties"
359                 },
360                 "outputs" : {
361                   "response-data" : "",
362                   "status" : "success"
363                 }
364               }
365             }
366           }
367         },
368         "artifacts" : {
369           "mount-node-template" : {
370             "type" : "artifact-template-velocity",
371             "file" : "Templates/restconf-mount-template.vtl"
372           },
373           "mount-node-mapping" : {
374             "type" : "artifact-mapping-resource",
375             "file" : "Definitions/pnf-software-upgrade-mapping.json"
376           },
377           "configure-template" : {
378             "type" : "artifact-template-velocity",
379             "file" : "Templates/pnf-swug-config-template.vtl"
380           },
381           "configure-mapping" : {
382             "type" : "artifact-mapping-resource",
383             "file" : "Definitions/pnf-software-upgrade-mapping.json"
384           }
385         }
386       },
387       "postcheck" : {
388         "type" : "component-script-executor",
389         "interfaces" : {
390           "ComponentScriptExecutor" : {
391             "operations" : {
392               "process" : {
393                 "implementation" : {
394                   "primary" : "component-script",
395                   "timeout" : 180,
396                   "operation_host" : "SELF"
397                 },
398                 "inputs" : {
399                   "script-type" : "kotlin",
400                   "script-class-reference" : "cba.pnf.swug.RestconfSoftwareUpgrade",
401                   "dynamic-properties" : "*postcheck-properties"
402                 },
403                 "outputs" : {
404                   "response-data" : "",
405                   "status" : "success"
406                 }
407               }
408             }
409           }
410         },
411         "artifacts" : {
412           "mount-node-template" : {
413             "type" : "artifact-template-velocity",
414             "file" : "Templates/restconf-mount-template.vtl"
415           },
416           "mount-node-mapping" : {
417             "type" : "artifact-mapping-resource",
418             "file" : "Definitions/pnf-software-upgrade-mapping.json"
419           }
420         }
421       }
422     }
423   }
424 }