Merge "Blueprint exception handler and REST responses"
[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   },
15   "node_types" : {
16   },
17   "topology_template" : {
18     "inputs" : {
19       "request-id" : {
20         "required" : true,
21         "type" : "string"
22       },
23       "service-instance-id" : {
24         "required" : true,
25         "type" : "string"
26       },
27       "scope-type" : {
28         "required" : true,
29         "type" : "string"
30       },
31       "action-name" : {
32         "required" : true,
33         "type" : "string"
34       },
35       "hostname" : {
36         "required" : true,
37         "type" : "string"
38       },
39       "resource-assignment-request" : {
40         "description" : "This is Dynamic Data type for the receipe resource-assignment-action.",
41         "required" : false,
42         "type" : "dt-resource-assignment-request"
43       }
44     },
45     "node_templates" : {
46       "vpe-netconf-device" : {
47         "type" : "vnf-netconf-device",
48         "capabilities" : {
49           "netconf" : {
50             "properties" : {
51               "login-key" : "sdnc",
52               "login-account" : "sndc-local",
53               "source" : "local",
54               "target-ip-address" : {
55                 "get_attribute" : [ "SELF", "lo0-local-ipv4-address" ]
56               },
57               "port-number" : 22,
58               "connection-time-out" : 30
59             }
60           }
61         }
62       },
63       "activate-netconf-component" : {
64         "type" : "component-netconf-executor",
65         "capabilities" : {
66           "component-node" : { }
67         },
68         "requirements" : {
69           "netconf-connection" : {
70             "capability" : "netconf",
71             "node" : "vpe-netconf-device",
72             "relationship" : "tosca.relationships.ConnectsTo"
73           }
74         },
75         "interfaces" : {
76           "NetconfExecutorComponent" : {
77             "operations" : {
78               "process" : {
79                 "implementation" : {
80                   "primary" : "file://netconf_adaptor/DefaultBaseLicenceConfig.py"
81                 },
82                 "inputs" : {
83                   "action-name" : {
84                     "get_input" : "action-name"
85                   },
86                   "template-name" : {
87                     "get_input" : "template_name"
88                   },
89                   "template-version" : {
90                     "get_input" : "template_version"
91                   },
92                   "resource-type" : "vnf-type",
93                   "request-id" : {
94                     "get_input" : "request-id"
95                   },
96                   "resource-id" : {
97                     "get_input" : "hostname"
98                   },
99                   "execution-script" : "execution-script"
100                 },
101                 "outputs" : {
102                   "response-data" : {
103                     "get_attribute" : [ "SELF", "netconf-executor-baseconfig.response-data" ]
104                   },
105                   "status" : {
106                     "get_attribute" : [ "SELF", "netconf-executor-baseconfig.status" ]
107                   }
108                 }
109               }
110             }
111           }
112         }
113       },
114       "resource-assignment-ra-component" : {
115         "type" : "component-resource-assignment",
116         "capabilities" : {
117           "component-node" : { }
118         },
119         "interfaces" : {
120           "ResourceAssignmentComponent" : {
121             "operations" : {
122               "process" : {
123                 "inputs" : {
124                   "template-names" : [ "base-config-template", "licence-template" ],
125                   "action-name" : {
126                     "get_input" : "action-name"
127                   },
128                   "template-name" : {
129                     "get_input" : "template_name"
130                   },
131                   "template-version" : {
132                     "get_input" : "template-version"
133                   },
134                   "resource-type" : "vnf-type",
135                   "request-id" : {
136                     "get_input" : "request-id"
137                   },
138                   "resource-id" : {
139                     "get_input" : "hostname"
140                   }
141                 },
142                 "outputs" : {
143                   "resource-assignment-params" : "success",
144                   "status" : "status"
145                 }
146               }
147             }
148           }
149         }
150       },
151       "resource-assignment-action" : {
152         "type" : "dg-resource-assignment",
153         "properties" : {
154           "mode" : "sync",
155           "version" : "LATEST",
156           "is-start-flow" : false
157         },
158         "capabilities" : {
159           "dg-node" : { }
160         },
161         "requirements" : {
162           "component-dependency" : {
163             "capability" : "component-node",
164             "node" : "resource-assignment-ra-component",
165             "relationship" : "tosca.relationships.DependsOn"
166           }
167         },
168         "interfaces" : {
169           "CONFIG" : {
170             "operations" : {
171               "ResourceAssignment" : {
172                 "inputs" : {
173                   "params" : [ ]
174                 }
175               }
176             }
177           }
178         }
179       },
180       "activate-action" : {
181         "type" : "dg-activate-netconf",
182         "properties" : {
183           "mode" : "sync",
184           "version" : "LATEST",
185           "is-start-flow" : false
186         },
187         "capabilities" : {
188           "dg-node" : { }
189         },
190         "requirements" : {
191           "component-dependency" : {
192             "capability" : "component-node",
193             "node" : "activate-netconf-component",
194             "relationship" : "tosca.relationships.DependsOn"
195           }
196         },
197         "interfaces" : {
198           "CONFIG" : {
199             "operations" : {
200               "ActivateNetconf" : {
201                 "inputs" : {
202                   "params" : [ ]
203                 }
204               }
205             }
206           }
207         }
208       },
209       "base-config-template" : {
210         "type" : "artifact-config-template",
211         "properties" : {
212           "action-names" : [ "resource-assignment-action" ]
213         },
214         "capabilities" : {
215           "content" : {
216             "properties" : {
217               "content" : "db://base-config-template"
218             }
219           },
220           "mapping" : {
221             "properties" : {
222               "mapping" : [ {
223                 "name" : "rs-db-source",
224                 "property" : {
225                   "required" : true,
226                   "type" : "string"
227                 },
228                 "input-param" : false,
229                 "dictionary-name" : "sample-db-source",
230                 "dictionary-source" : "primary-db",
231                 "dependencies" : [ "hostname" ],
232                 "version" : 0
233               }, {
234                 "name" : "mdsal-source",
235                 "property" : {
236                   "description" : "",
237                   "required" : true,
238                   "type" : "list",
239                   "entry_schema" : {
240                     "type" : "dt-v4-aggregate"
241                   }
242                 },
243                 "input-param" : false,
244                 "dictionary-name" : "sample-mdsal-source",
245                 "dictionary-source" : "mdsal",
246                 "dependencies" : [ "service-instance-id" ],
247                 "version" : 0
248               }, {
249                 "name" : "hostname",
250                 "property" : {
251                   "required" : true,
252                   "type" : "string"
253                 },
254                 "dictionary-name" : "hostname",
255                 "dictionary-source" : "input",
256                 "version" : 0,
257                 "input-param" : false
258               }, {
259                 "name" : "service",
260                 "property" : {
261                   "required" : true,
262                   "type" : "string"
263                 },
264                 "dictionary-name" : "service",
265                 "dictionary-source" : "input",
266                 "version" : 0,
267                 "input-param" : false
268               }, {
269                 "name" : "service-instance-id",
270                 "property" : {
271                   "required" : true,
272                   "type" : "string"
273                 },
274                 "dictionary-name" : "service-instance-id",
275                 "dictionary-source" : "input",
276                 "version" : 0,
277                 "input-param" : false
278               } ]
279             }
280           }
281         }
282       },
283       "licence-template" : {
284         "type" : "artifact-config-template",
285         "properties" : {
286           "action-names" : [ "resource-assignment-action" ]
287         },
288         "capabilities" : {
289           "content" : {
290             "properties" : {
291               "content" : "db://licence-template"
292             }
293           },
294           "mapping" : {
295             "properties" : {
296               "mapping" : [ {
297                 "name" : "licenses",
298                 "property" : {
299                   "required" : true,
300                   "type" : "list",
301                   "entry_schema" : {
302                     "type" : "dt-license-key"
303                   }
304                 },
305                 "input-param" : false,
306                 "dictionary-name" : "sample-licenses",
307                 "dictionary-source" : "mdsal",
308                 "dependencies" : [ "service-instance-id" ],
309                 "version" : 0
310               }, {
311                 "name" : "service-instance-id",
312                 "property" : {
313                   "required" : true,
314                   "type" : "string"
315                 },
316                 "dictionary-name" : "service-instance-id",
317                 "dictionary-source" : "input",
318                 "version" : 0,
319                 "input-param" : false
320               } ]
321             }
322           }
323         }
324       }
325     }
326   }
327 }