b6464f3c85b804f4dcb0019cb1e9cc08020aada0
[ccsdk/cds.git] /
1 {
2   "tosca_definitions_version" : "controller_blueprint_1_0_0",
3   "metadata" : {
4     "template_author" : "Alexis de TalhouĆ«t",
5     "author-email" : "adetalhouet89@gmail.com",
6     "user-groups" : "ADMIN, OPERATION",
7     "template_name" : "test",
8     "template_version" : "1.0.0",
9     "template_tags" : "test"
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://localhost:32778",
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-process" : {
39             "description" : "Resource Assign Workflow",
40             "target" : "resource-assignment-process",
41             "activities" : [ {
42               "call_operation" : ""
43             } ]
44           }
45         },
46         "inputs" : {
47           "artifact-name" : {
48             "required" : true,
49             "type" : "list",
50             "entry_schema" : {
51               "type" : "string"
52             }
53           },
54           "store-result" : {
55             "required" : true,
56             "type" : "boolean"
57           },
58           "resolution-key" : {
59             "required" : true,
60             "type" : "string"
61           },
62           "resource-assignment-properties" : {
63             "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).",
64             "required" : true,
65             "type" : "dt-resource-assignment-properties"
66           }
67         }
68       },
69       "config-deploy" : {
70         "steps" : {
71           "config-deploy" : {
72             "description" : "Resource Assign and Python Netconf Activation Workflow",
73             "target" : "config-deploy-process",
74             "activities" : [ {
75               "call_operation" : ""
76             } ]
77           }
78         },
79         "inputs" : {
80           "resolution-key" : {
81             "required" : false,
82             "type" : "string"
83           },
84           "password" : {
85             "required" : true,
86             "type" : "string"
87           },
88           "username" : {
89             "required" : true,
90             "type" : "string"
91           },
92           "ip" : {
93             "required" : true,
94             "type" : "string"
95           },
96           "config-deploy-properties" : {
97             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
98             "required" : true,
99             "type" : "dt-config-deploy-properties"
100           }
101         }
102       },
103       "rollback" : {
104         "steps" : {
105           "rollback" : {
106             "description" : "Roolback Workflow",
107             "target" : "rollback-process",
108             "activities" : [ {
109               "call_operation" : ""
110             } ]
111           }
112         },
113         "inputs" : {
114           "resolution-key" : {
115             "required" : false,
116             "type" : "string"
117           },
118           "password" : {
119             "required" : true,
120             "type" : "string"
121           },
122           "username" : {
123             "required" : true,
124             "type" : "string"
125           },
126           "ip" : {
127             "required" : true,
128             "type" : "string"
129           },
130           "config-deploy-properties" : {
131             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
132             "required" : true,
133             "type" : "dt-config-deploy-properties"
134           },
135           "rollback-properties" : {
136             "description" : "Dynamic PropertyDefinition for workflow(rollback).",
137             "required" : true,
138             "type" : "dt-rollback-properties"
139           }
140         }
141       }
142     },
143     "node_templates" : {
144       "resource-assignment-process" : {
145         "type" : "dg-generic",
146         "properties" : {
147           "content" : {
148             "get_artifact" : [ "SELF", "dg-resource-assignment-process" ]
149           },
150           "dependency-node-templates" : [ "resource-assignment" ]
151         },
152         "artifacts" : {
153           "dg-resource-assignment-process" : {
154             "type" : "artifact-directed-graph",
155             "file" : "Plans/ResourceAssignment.xml"
156           }
157         }
158       },
159       "resource-assignment" : {
160         "type" : "component-resource-resolution",
161         "interfaces" : {
162           "ResourceResolutionComponent" : {
163             "operations" : {
164               "process" : {
165                 "inputs" : {
166                   "resolution-key" : {
167                     "get_input" : "resolution-key"
168                   },
169                   "store-result" : {
170                     "get_input" : "store-result"
171                   },
172                   "artifact-prefix-names" : {
173                     "get_input" : "artifact-name"
174                   }
175                 },
176                 "outputs" : {
177                   "resource-assignment-params" : {
178                     "get_attribute" : [ "SELF", "assignment-params" ]
179                   },
180                   "status" : "success"
181                 }
182               }
183             }
184           }
185         },
186         "artifacts" : {
187           "hostname-template" : {
188             "type" : "artifact-template-velocity",
189             "file" : "Templates/hostname-template.vtl"
190           },
191           "hostname-mapping" : {
192             "type" : "artifact-mapping-resource",
193             "file" : "Templates/hostname-mapping.json"
194           },
195           "vf-module-1-template" : {
196             "type" : "artifact-template-velocity",
197             "file" : "Templates/vf-module-1-template.vtl"
198           },
199           "vf-module-1-mapping" : {
200             "type" : "artifact-mapping-resource",
201             "file" : "Templates/vf-module-1-mapping.json"
202           }
203         }
204       },
205       "config-deploy-process" : {
206         "type" : "dg-generic",
207         "properties" : {
208           "content" : {
209             "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
210           },
211           "dependency-node-templates" : [ "config-deploy" ]
212         },
213         "artifacts" : {
214           "dg-config-deploy-process" : {
215             "type" : "artifact-directed-graph",
216             "file" : "Plans/ConfigDeploy.xml"
217           }
218         }
219       },
220       "config-deploy" : {
221         "type" : "component-netconf-executor",
222         "requirements" : {
223           "netconf-connection" : {
224             "capability" : "netconf",
225             "node" : "netconf-device",
226             "relationship" : "tosca.relationships.ConnectsTo"
227           }
228         },
229         "interfaces" : {
230           "ComponentNetconfExecutor" : {
231             "operations" : {
232               "process" : {
233                 "inputs" : {
234                   "script-type" : "jython",
235                   "script-class-reference" : "Scripts/python/NetconfRpcExample.py",
236                   "instance-dependencies" : [ ],
237                   "dynamic-properties" : "*config-deploy-properties"
238                 },
239                 "outputs" : {
240                   "response-data" : "",
241                   "status" : "SUCCESS"
242                 }
243               }
244             }
245           }
246         },
247         "artifacts" : {
248           "vfw-interface-template" : {
249             "type" : "artifact-template-velocity",
250             "file" : "Templates/vfw-interface-template.vtl"
251           },
252           "vfw-interface-mapping" : {
253             "type" : "artifact-mapping-resource",
254             "file" : "Templates/vfw-interface-mapping.json"
255           }
256         }
257       },
258       "rollback-process" : {
259         "type" : "dg-generic",
260         "properties" : {
261           "content" : {
262             "get_artifact" : [ "SELF", "dg-rollback-process" ]
263           },
264           "dependency-node-templates" : [ "config-deploy" ]
265         },
266         "artifacts" : {
267           "dg-rollback-process" : {
268             "type" : "artifact-directed-graph",
269             "file" : "Plans/Rollback.xml"
270           }
271         }
272       },
273       "rollback" : {
274         "type" : "component-netconf-executor",
275         "requirements" : {
276           "netconf-connection" : {
277             "capability" : "netconf",
278             "node" : "netconf-device",
279             "relationship" : "tosca.relationships.ConnectsTo"
280           }
281         },
282         "interfaces" : {
283           "ComponentNetconfExecutor" : {
284             "operations" : {
285               "process" : {
286                 "inputs" : {
287                   "script-type" : "jython",
288                   "script-class-reference" : "Scripts/python/Rollback.py",
289                   "instance-dependencies" : [ ],
290                   "dynamic-properties" : "*config-deploy-properties"
291                 },
292                 "outputs" : {
293                   "response-data" : "",
294                   "status" : "SUCCESS"
295                 }
296               }
297             }
298           }
299         },
300         "artifacts" : {
301           "junos-rollback-RPC-template" : {
302             "type" : "artifact-template-velocity",
303             "file" : "Templates/junos-rollback-RPC-template.vtl"
304           },
305           "junos-rollback-RPC-mapping" : {
306             "type" : "artifact-mapping-resource",
307             "file" : "Templates/junos-rollback-RPC-mapping.json"
308           }
309         }
310       },
311       "netconf-device" : {
312         "type" : "vnf-netconf-device",
313         "capabilities" : {
314           "netconf" : {
315             "properties" : {
316               "login-key" : {
317                 "get_input" : "password"
318               },
319               "login-account" : {
320                 "get_input" : "username"
321               },
322               "target-ip-address" : {
323                 "get_input" : "ip"
324               },
325               "port-number" : 830,
326               "connection-time-out" : 5
327             }
328           }
329         }
330       }
331     }
332   }
333 }