Prepare for release
[ccsdk/cds.git] / ms / controllerblueprints / modules / service / src / test / resources / enhance / enhanced-template.json
1 {
2   "metadata" : {
3     "template_author" : "Brinda Santh",
4     "template_name" : "enhance-template",
5     "template_version" : "1.0.0",
6     "template_tags" : "brinda, VPE",
7     "service-type" : "Sample Service",
8     "release" : "1806",
9     "vnf-type" : "VPE"
10   },
11   "tosca_definitions_version" : "controller_blueprint_1_0_0",
12   "artifact_types" : { },
13   "data_types" : {
14     "dt-v4-aggregate" : {
15       "description" : "This is dt-v4-aggregate Data Type",
16       "version" : "1.0.0",
17       "properties" : {
18         "ipv4-address" : {
19           "required" : true,
20           "type" : "string"
21         },
22         "ipv4-plen" : {
23           "required" : false,
24           "type" : "integer"
25         }
26       },
27       "derived_from" : "tosca.datatypes.Root"
28     },
29     "dt-license-key" : {
30       "description" : "This is dt-plicense-key Data Type",
31       "version" : "1.0.0",
32       "properties" : {
33         "license-key" : {
34           "required" : true,
35           "type" : "string"
36         }
37       },
38       "derived_from" : "tosca.datatypes.Root"
39     },
40     "datatype-resource-assignment" : {
41       "description" : "This is Resource Assignment Data Type",
42       "version" : "1.0.0",
43       "properties" : {
44         "property" : {
45           "required" : true,
46           "type" : "datatype-property"
47         },
48         "input-param" : {
49           "required" : true,
50           "type" : "boolean"
51         },
52         "dictionary-name" : {
53           "required" : false,
54           "type" : "string"
55         },
56         "dictionary-source" : {
57           "required" : false,
58           "type" : "string"
59         },
60         "dependencies" : {
61           "required" : true,
62           "type" : "list",
63           "entry_schema" : {
64             "type" : "string"
65           }
66         },
67         "status" : {
68           "required" : false,
69           "type" : "string"
70         },
71         "message" : {
72           "required" : false,
73           "type" : "string"
74         },
75         "updated-date" : {
76           "required" : false,
77           "type" : "string"
78         },
79         "updated-by" : {
80           "required" : false,
81           "type" : "string"
82         }
83       },
84       "derived_from" : "tosca.datatypes.Root"
85     },
86     "datatype-property" : {
87       "description" : "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
88       "version" : "1.0.0",
89       "properties" : {
90         "type" : {
91           "required" : true,
92           "type" : "string"
93         },
94         "description" : {
95           "required" : false,
96           "type" : "string"
97         },
98         "required" : {
99           "required" : false,
100           "type" : "boolean"
101         },
102         "default" : {
103           "required" : false,
104           "type" : "string"
105         },
106         "entry_schema" : {
107           "required" : false,
108           "type" : "string"
109         }
110       },
111       "derived_from" : "tosca.datatypes.Root"
112     },
113     "dt-resource-assignment-request" : {
114       "description" : "This is Dynamic Data type definition generated from resource mapping for the config template name base-config-template.",
115       "version" : "1.0.0",
116       "properties" : {
117         "hostname" : {
118           "required" : true,
119           "type" : "string"
120         },
121         "licenses" : {
122           "required" : true,
123           "type" : "list",
124           "entry_schema" : {
125             "type" : "dt-license-key"
126           }
127         },
128         "rs-db-source" : {
129           "required" : true,
130           "type" : "string"
131         },
132         "service" : {
133           "required" : true,
134           "type" : "string"
135         },
136         "service-instance-id" : {
137           "required" : true,
138           "type" : "string"
139         },
140         "mdsal-source" : {
141           "description" : "",
142           "required" : true,
143           "type" : "list",
144           "entry_schema" : {
145             "type" : "dt-v4-aggregate"
146           }
147         }
148       },
149       "derived_from" : "tosca.datatypes.Dynamic"
150     }
151   },
152   "node_types" : {
153     "dg-resource-assignment" : {
154       "description" : "This is Resource Assignment Directed Graph",
155       "version" : "1.0.0",
156       "properties" : {
157         "mode" : {
158           "required" : false,
159           "type" : "string",
160           "default" : "sync"
161         },
162         "version" : {
163           "required" : false,
164           "type" : "string",
165           "default" : "LATEST"
166         },
167         "is-start-flow" : {
168           "required" : false,
169           "type" : "boolean",
170           "default" : false
171         }
172       },
173       "capabilities" : {
174         "dg-node" : {
175           "type" : "tosca.capabilities.Node"
176         }
177       },
178       "requirements" : {
179         "component-dependency" : {
180           "capability" : "component-node",
181           "node" : "component-resource-assignment",
182           "relationship" : "tosca.relationships.DependsOn"
183         }
184       },
185       "interfaces" : {
186         "CONFIG" : {
187           "operations" : {
188             "ResourceAssignment" : {
189               "inputs" : {
190                 "params" : {
191                   "required" : false,
192                   "type" : "list",
193                   "entry_schema" : {
194                     "type" : "datatype-property"
195                   }
196                 }
197               }
198             }
199           }
200         }
201       },
202       "derived_from" : "tosca.nodes.DG"
203     },
204     "tosca.nodes.Component" : {
205       "description" : "This is default Component Node",
206       "version" : "1.0.0",
207       "derived_from" : "tosca.nodes.Root"
208     },
209     "artifact-config-template" : {
210       "description" : "This is Configuration Velocity Template",
211       "version" : "1.0.0",
212       "properties" : {
213         "action-names" : {
214           "required" : true,
215           "type" : "list",
216           "entry_schema" : {
217             "type" : "string"
218           }
219         }
220       },
221       "capabilities" : {
222         "content" : {
223           "type" : "tosca.capabilities.Content",
224           "properties" : {
225             "content" : {
226               "required" : true,
227               "type" : "string"
228             }
229           }
230         },
231         "mapping" : {
232           "type" : "tosca.capabilities.Mapping",
233           "properties" : {
234             "mapping" : {
235               "required" : false,
236               "type" : "list",
237               "entry_schema" : {
238                 "type" : "datatype-resource-assignment"
239               }
240             }
241           }
242         }
243       },
244       "derived_from" : "tosca.nodes.Artifact"
245     },
246     "tosca.nodes.Vnf" : {
247       "description" : "This is VNF Node Type",
248       "version" : "1.0.0",
249       "derived_from" : "tosca.nodes.Root"
250     },
251     "tosca.nodes.Artifact" : {
252       "description" : "This is Deprecated Artifact Node Type.",
253       "version" : "1.0.0",
254       "derived_from" : "tosca.nodes.Root"
255     },
256     "dg-activate-netconf" : {
257       "description" : "This is Download Netconf Directed Graph",
258       "version" : "1.0.0",
259       "properties" : {
260         "mode" : {
261           "required" : false,
262           "type" : "string",
263           "default" : "sync"
264         },
265         "version" : {
266           "required" : false,
267           "type" : "string",
268           "default" : "LATEST"
269         },
270         "is-start-flow" : {
271           "required" : false,
272           "type" : "boolean",
273           "default" : false
274         }
275       },
276       "capabilities" : {
277         "dg-node" : {
278           "type" : "tosca.capabilities.Node"
279         }
280       },
281       "requirements" : {
282         "component-dependency" : {
283           "capability" : "component-node",
284           "node" : "component-netconf-executor",
285           "relationship" : "tosca.relationships.DependsOn"
286         }
287       },
288       "interfaces" : {
289         "CONFIG" : {
290           "operations" : {
291             "ActivateNetconf" : {
292               "inputs" : {
293                 "params" : {
294                   "required" : false,
295                   "type" : "list",
296                   "entry_schema" : {
297                     "type" : "datatype-property"
298                   }
299                 }
300               }
301             }
302           }
303         }
304       },
305       "derived_from" : "tosca.nodes.DG"
306     },
307     "source-input" : {
308       "description" : "This is Input Resource Source Node Type",
309       "version" : "1.0.0",
310       "properties" : {
311         "key" : {
312           "required" : false,
313           "type" : "string"
314         },
315         "key-dependencies" : {
316           "required" : true,
317           "type" : "list",
318           "entry_schema" : {
319             "type" : "string"
320           }
321         }
322       },
323       "derived_from" : "tosca.nodes.ResourceSource"
324     },
325     "tosca.nodes.ResourceSource" : {
326       "description" : "TOSCA base type for Resource Sources",
327       "version" : "1.0.0",
328       "derived_from" : "tosca.nodes.Root"
329     },
330     "component-resource-assignment" : {
331       "description" : "This is Resource Assignment Component API",
332       "version" : "1.0.0",
333       "capabilities" : {
334         "component-node" : {
335           "type" : "tosca.capabilities.Node"
336         }
337       },
338       "interfaces" : {
339         "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode" : {
340           "operations" : {
341             "process" : {
342               "inputs" : {
343                 "template-name" : {
344                   "description" : "Service Template Name.",
345                   "required" : true,
346                   "type" : "string"
347                 },
348                 "template-version" : {
349                   "description" : "Service Template Version.",
350                   "required" : true,
351                   "type" : "string"
352                 },
353                 "resource-type" : {
354                   "description" : "Request type.",
355                   "required" : true,
356                   "type" : "string"
357                 },
358                 "template-names" : {
359                   "description" : "Name of the artifact Node Templates, to get the template Content.",
360                   "required" : true,
361                   "type" : "list",
362                   "entry_schema" : {
363                     "type" : "string"
364                   }
365                 },
366                 "request-id" : {
367                   "description" : "Request Id, Unique Id for the request.",
368                   "required" : true,
369                   "type" : "string"
370                 },
371                 "resource-id" : {
372                   "description" : "Resource Id.",
373                   "required" : true,
374                   "type" : "string"
375                 },
376                 "action-name" : {
377                   "description" : "Action Name of the process",
378                   "required" : true,
379                   "type" : "string"
380                 }
381               },
382               "outputs" : {
383                 "resource-assignment-params" : {
384                   "required" : true,
385                   "type" : "string"
386                 },
387                 "status" : {
388                   "required" : true,
389                   "type" : "string"
390                 }
391               }
392             }
393           }
394         }
395       },
396       "derived_from" : "tosca.nodes.Component"
397     },
398     "tosca.nodes.DG" : {
399       "description" : "This is Directed Graph Node Type",
400       "version" : "1.0.0",
401       "derived_from" : "tosca.nodes.Root"
402     },
403     "source-db" : {
404       "description" : "This is Database Resource Source Node Type",
405       "version" : "1.0.0",
406       "properties" : {
407         "type" : {
408           "required" : true,
409           "type" : "string",
410           "constraints" : [ {
411             "valid_values" : [ "SQL", "PLSQL" ]
412           } ]
413         },
414         "query" : {
415           "required" : true,
416           "type" : "string"
417         },
418         "input-key-mapping" : {
419           "required" : false,
420           "type" : "map",
421           "entry_schema" : {
422             "type" : "string"
423           }
424         },
425         "output-key-mapping" : {
426           "required" : false,
427           "type" : "map",
428           "entry_schema" : {
429             "type" : "string"
430           }
431         },
432         "key-dependencies" : {
433           "required" : true,
434           "type" : "list",
435           "entry_schema" : {
436             "type" : "string"
437           }
438         }
439       },
440       "derived_from" : "tosca.nodes.ResourceSource"
441     },
442     "vnf-netconf-device" : {
443       "description" : "This is VNF Device with Netconf  Capability",
444       "version" : "1.0.0",
445       "capabilities" : {
446         "netconf" : {
447           "type" : "tosca.capabilities.Netconf",
448           "properties" : {
449             "login-key" : {
450               "required" : true,
451               "type" : "string",
452               "default" : "sdnc"
453             },
454             "login-account" : {
455               "required" : true,
456               "type" : "string",
457               "default" : "sdnc-tacacs"
458             },
459             "source" : {
460               "required" : true,
461               "type" : "string",
462               "default" : "npm"
463             },
464             "target-ip-address" : {
465               "required" : true,
466               "type" : "string"
467             },
468             "port-number" : {
469               "required" : true,
470               "type" : "integer",
471               "default" : 830
472             },
473             "connection-time-out" : {
474               "required" : false,
475               "type" : "integer",
476               "default" : 30
477             }
478           }
479         }
480       },
481       "derived_from" : "tosca.nodes.Vnf"
482     },
483     "source-rest" : {
484       "description" : "This is Rest Resource Source Node Type",
485       "version" : "1.0.0",
486       "properties" : {
487         "type" : {
488           "required" : false,
489           "type" : "string",
490           "constraints" : [ {
491             "valid_values" : [ "JSON" ]
492           } ],
493           "default" : "JSON"
494         },
495         "url-path" : {
496           "required" : true,
497           "type" : "string"
498         },
499         "path" : {
500           "required" : true,
501           "type" : "string"
502         },
503         "expression-type" : {
504           "required" : false,
505           "type" : "string",
506           "constraints" : [ {
507             "valid_values" : [ "JSON_PATH", "JSON_POINTER" ]
508           } ],
509           "default" : "JSON_PATH"
510         },
511         "input-key-mapping" : {
512           "required" : false,
513           "type" : "map",
514           "entry_schema" : {
515             "type" : "string"
516           }
517         },
518         "output-key-mapping" : {
519           "required" : false,
520           "type" : "map",
521           "entry_schema" : {
522             "type" : "string"
523           }
524         },
525         "key-dependencies" : {
526           "required" : true,
527           "type" : "list",
528           "entry_schema" : {
529             "type" : "string"
530           }
531         }
532       },
533       "derived_from" : "tosca.nodes.ResourceSource"
534     },
535     "component-netconf-executor" : {
536       "description" : "This is Netconf Transaction Configuration Component API",
537       "version" : "1.0.0",
538       "capabilities" : {
539         "component-node" : {
540           "type" : "tosca.capabilities.Node"
541         }
542       },
543       "requirements" : {
544         "netconf-connection" : {
545           "capability" : "netconf",
546           "node" : "vnf-netconf-device",
547           "relationship" : "tosca.relationships.ConnectsTo"
548         }
549       },
550       "interfaces" : {
551         "org-openecomp-sdnc-netconf-adaptor-service-NetconfExecutorNode" : {
552           "operations" : {
553             "process" : {
554               "inputs" : {
555                 "request-id" : {
556                   "description" : "Request Id used to store the generated configuration, in the database along with the template-name",
557                   "required" : true,
558                   "type" : "string"
559                 },
560                 "template-name" : {
561                   "description" : "Service Template Name",
562                   "required" : true,
563                   "type" : "string"
564                 },
565                 "template-version" : {
566                   "description" : "Service Template Version",
567                   "required" : true,
568                   "type" : "string"
569                 },
570                 "action-name" : {
571                   "description" : "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
572                   "required" : false,
573                   "type" : "string"
574                 },
575                 "resource-type" : {
576                   "description" : "Resource Type to get from Database, Either (message & mask-info ) or( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
577                   "required" : false,
578                   "type" : "string"
579                 },
580                 "resource-id" : {
581                   "description" : "Resource Id to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
582                   "required" : false,
583                   "type" : "string"
584                 },
585                 "reservation-id" : {
586                   "description" : "Reservation Id used to send to NPM",
587                   "required" : false,
588                   "type" : "string"
589                 },
590                 "execution-script" : {
591                   "description" : "Python Script to Execute for this Component action, It should refer any one of Prython Artifact Definition for this Node Template.",
592                   "required" : true,
593                   "type" : "string"
594                 }
595               },
596               "outputs" : {
597                 "response-data" : {
598                   "description" : "Execution Response Data in JSON format.",
599                   "required" : false,
600                   "type" : "string"
601                 },
602                 "status" : {
603                   "description" : "Status of the Component Execution ( success or failure )",
604                   "required" : true,
605                   "type" : "string"
606                 }
607               }
608             }
609           }
610         }
611       },
612       "derived_from" : "tosca.nodes.Component"
613     }
614   },
615   "topology_template" : {
616     "inputs" : {
617       "request-id" : {
618         "required" : true,
619         "type" : "string"
620       },
621       "service-instance-id" : {
622         "required" : true,
623         "type" : "string"
624       },
625       "scope-type" : {
626         "required" : true,
627         "type" : "string"
628       },
629       "action-name" : {
630         "required" : true,
631         "type" : "string"
632       },
633       "hostname" : {
634         "required" : true,
635         "type" : "string"
636       },
637       "resource-assignment-request" : {
638         "description" : "This is Dynamic Data type for the receipe resource-assignment-action.",
639         "required" : false,
640         "type" : "dt-resource-assignment-request"
641       }
642     },
643     "node_templates" : {
644       "vpe-netconf-device" : {
645         "type" : "vnf-netconf-device",
646         "capabilities" : {
647           "netconf" : {
648             "properties" : {
649               "login-key" : "sdnc",
650               "login-account" : "sndc-local",
651               "source" : "local",
652               "target-ip-address" : {
653                 "get_attribute" : [ "SELF", "lo0-local-ipv4-address" ]
654               },
655               "port-number" : 22,
656               "connection-time-out" : 30
657             }
658           }
659         }
660       },
661       "activate-netconf-component" : {
662         "type" : "component-netconf-executor",
663         "capabilities" : {
664           "component-node" : { }
665         },
666         "requirements" : {
667           "netconf-connection" : {
668             "capability" : "netconf",
669             "node" : "vpe-netconf-device",
670             "relationship" : "tosca.relationships.ConnectsTo"
671           }
672         },
673         "interfaces" : {
674           "org-openecomp-sdnc-netconf-adaptor-service-NetconfExecutorNode" : {
675             "operations" : {
676               "process" : {
677                 "implementation" : {
678                   "primary" : "file://netconf_adaptor/DefaultBaseLicenceConfig.py"
679                 },
680                 "inputs" : {
681                   "action-name" : {
682                     "get_input" : "action-name"
683                   },
684                   "template-name" : {
685                     "get_input" : "template_name"
686                   },
687                   "template-version" : {
688                     "get_input" : "template_version"
689                   },
690                   "resource-type" : "vnf-type",
691                   "request-id" : {
692                     "get_input" : "request-id"
693                   },
694                   "resource-id" : {
695                     "get_input" : "hostname"
696                   },
697                   "execution-script" : "execution-script"
698                 },
699                 "outputs" : {
700                   "response-data" : {
701                     "get_attribute" : [ "SELF", "netconf-executor-baseconfig.response-data" ]
702                   },
703                   "status" : {
704                     "get_attribute" : [ "SELF", "netconf-executor-baseconfig.status" ]
705                   }
706                 }
707               }
708             }
709           }
710         }
711       },
712       "resource-assignment-ra-component" : {
713         "type" : "component-resource-assignment",
714         "capabilities" : {
715           "component-node" : { }
716         },
717         "interfaces" : {
718           "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode" : {
719             "operations" : {
720               "process" : {
721                 "inputs" : {
722                   "template-names" : [ "base-config-template", "licence-template" ],
723                   "action-name" : {
724                     "get_input" : "action-name"
725                   },
726                   "template-name" : {
727                     "get_input" : "template_name"
728                   },
729                   "template-version" : {
730                     "get_input" : "template-version"
731                   },
732                   "resource-type" : "vnf-type",
733                   "request-id" : {
734                     "get_input" : "request-id"
735                   },
736                   "resource-id" : {
737                     "get_input" : "hostname"
738                   }
739                 },
740                 "outputs" : {
741                   "resource-assignment-params" : "success",
742                   "status" : "status"
743                 }
744               }
745             }
746           }
747         }
748       },
749       "resource-assignment-action" : {
750         "type" : "dg-resource-assignment",
751         "properties" : {
752           "mode" : "sync",
753           "version" : "LATEST",
754           "is-start-flow" : false
755         },
756         "capabilities" : {
757           "dg-node" : { }
758         },
759         "requirements" : {
760           "component-dependency" : {
761             "capability" : "component-node",
762             "node" : "resource-assignment-ra-component",
763             "relationship" : "tosca.relationships.DependsOn"
764           }
765         },
766         "interfaces" : {
767           "CONFIG" : {
768             "operations" : {
769               "ResourceAssignment" : {
770                 "inputs" : {
771                   "params" : [ ]
772                 }
773               }
774             }
775           }
776         }
777       },
778       "activate-action" : {
779         "type" : "dg-activate-netconf",
780         "properties" : {
781           "mode" : "sync",
782           "version" : "LATEST",
783           "is-start-flow" : false
784         },
785         "capabilities" : {
786           "dg-node" : { }
787         },
788         "requirements" : {
789           "component-dependency" : {
790             "capability" : "component-node",
791             "node" : "activate-netconf-component",
792             "relationship" : "tosca.relationships.DependsOn"
793           }
794         },
795         "interfaces" : {
796           "CONFIG" : {
797             "operations" : {
798               "ActivateNetconf" : {
799                 "inputs" : {
800                   "params" : [ ]
801                 }
802               }
803             }
804           }
805         }
806       },
807       "base-config-template" : {
808         "type" : "artifact-config-template",
809         "properties" : {
810           "action-names" : [ "resource-assignment-action" ]
811         },
812         "capabilities" : {
813           "content" : {
814             "properties" : {
815               "content" : "db://base-config-template"
816             }
817           },
818           "mapping" : {
819             "properties" : {
820               "mapping" : [ {
821                 "name" : "rs-db-source",
822                 "property" : {
823                   "required" : true,
824                   "type" : "string"
825                 },
826                 "input-param" : false,
827                 "dictionary-name" : "sample-db-source",
828                 "dictionary-source" : "db",
829                 "dependencies" : [ "hostname" ],
830                 "version" : 0
831               }, {
832                 "name" : "mdsal-source",
833                 "property" : {
834                   "description" : "",
835                   "required" : true,
836                   "type" : "list",
837                   "entry_schema" : {
838                     "type" : "dt-v4-aggregate"
839                   }
840                 },
841                 "input-param" : false,
842                 "dictionary-name" : "sample-mdsal-source",
843                 "dictionary-source" : "mdsal",
844                 "dependencies" : [ "service-instance-id" ],
845                 "version" : 0
846               }, {
847                 "name" : "hostname",
848                 "property" : {
849                   "required" : true,
850                   "type" : "string"
851                 },
852                 "dictionary-name" : "hostname",
853                 "dictionary-source" : "input",
854                 "version" : 0,
855                 "input-param" : false
856               }, {
857                 "name" : "service",
858                 "property" : {
859                   "required" : true,
860                   "type" : "string"
861                 },
862                 "dictionary-name" : "service",
863                 "dictionary-source" : "input",
864                 "version" : 0,
865                 "input-param" : false
866               }, {
867                 "name" : "service-instance-id",
868                 "property" : {
869                   "required" : true,
870                   "type" : "string"
871                 },
872                 "dictionary-name" : "service-instance-id",
873                 "dictionary-source" : "input",
874                 "version" : 0,
875                 "input-param" : false
876               } ]
877             }
878           }
879         }
880       },
881       "licence-template" : {
882         "type" : "artifact-config-template",
883         "properties" : {
884           "action-names" : [ "resource-assignment-action" ]
885         },
886         "capabilities" : {
887           "content" : {
888             "properties" : {
889               "content" : "db://licence-template"
890             }
891           },
892           "mapping" : {
893             "properties" : {
894               "mapping" : [ {
895                 "name" : "licenses",
896                 "property" : {
897                   "required" : true,
898                   "type" : "list",
899                   "entry_schema" : {
900                     "type" : "dt-license-key"
901                   }
902                 },
903                 "input-param" : false,
904                 "dictionary-name" : "sample-licenses",
905                 "dictionary-source" : "mdsal",
906                 "dependencies" : [ "service-instance-id" ],
907                 "version" : 0
908               }, {
909                 "name" : "service-instance-id",
910                 "property" : {
911                   "required" : true,
912                   "type" : "string"
913                 },
914                 "dictionary-name" : "service-instance-id",
915                 "dictionary-source" : "input",
916                 "version" : 0,
917                 "input-param" : false
918               } ]
919             }
920           }
921         }
922       }
923     }
924   }
925 }