508d8b2e26e7b50cd699112728af05d3287f3331
[ccsdk/cds.git] /
1 {
2   "tosca_definitions_version" : "controller_blueprint_1_0_0",
3   "metadata" : {
4     "template_author" : "cds-dev",
5     "author-email" : "test@bell.ca",
6     "template_name" : "uat-imperative-workflow",
7     "template_version" : "1.0.0",
8     "template_tags" : "UAT, CBA, test",
9     "template_type" : "DEFAULT"
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   "topology_template" : {
24     "workflows" : {
25       "uat-wf" : {
26         "steps" : {
27           "assign" : {
28             "target" : "resource-resolution",
29             "on_success" : [ "deploy" ],
30             "on_failure" : [ "assign-recover" ]
31           },
32           "assign-recover" : {
33             "target" : "execute-script-1",
34             "on_success" : [ "deploy" ],
35             "on_failure" : [ "collect" ]
36           },
37           "deploy" : {
38             "target" : "execute-script-2",
39             "on_success" : [ "collect" ],
40             "on_failure" : [ "deploy-recover" ]
41           },
42           "deploy-recover" : {
43             "target" : "execute-script-3",
44             "on_success" : [ "collect" ],
45             "on_failure" : [ "collect" ]
46           },
47           "collect" : {
48             "target" : "collect-results"
49           }
50         },
51         "inputs" : {
52           "service-instance-id" : {
53             "type" : "string"
54           },
55           "failing-steps" : {
56             "type" : "json"
57           },
58           "uat-wf-properties" : {
59             "description" : "Dynamic PropertyDefinition for workflow(uat-wf).",
60             "required" : true,
61             "type" : "dt-uat-wf-properties"
62           }
63         },
64         "outputs" : {
65           "results" : {
66             "type" : "string",
67             "value" : {
68               "get_attribute" : [ "collect-results", "response-data" ]
69             }
70           }
71         }
72       },
73       "uat-wf-parallel" : {
74         "steps" : {
75           "execute-A" : {
76             "target" : "execute-script-1",
77             "on_success" : [ "finalize" ],
78             "on_failure" : [ "clean-up" ]
79           },
80           "execute-B" : {
81             "target" : "execute-script-2",
82             "on_success" : [ "finalize" ],
83             "on_failure" : [ "clean-up" ]
84           },
85           "finalize" : {
86             "target" : "execute-script-3",
87             "on_success" : [ "clean-up" ],
88             "on_failure" : [ "clean-up" ]
89           },
90           "clean-up" : {
91             "target" : "execute-script-4",
92             "on_success" : [ "collect" ],
93             "on_failure" : [ "collect" ]
94           },
95           "collect" : {
96             "target" : "collect-results"
97           }
98         },
99         "inputs" : {
100           "service-instance-id" : {
101             "type" : "string"
102           },
103           "failing-steps" : {
104             "type" : "json"
105           }
106         },
107         "outputs" : {
108           "results" : {
109             "type" : "string",
110             "value" : {
111               "get_attribute" : [ "collect-results", "response-data" ]
112             }
113           }
114         }
115       }
116     },
117     "node_templates" : {
118       "resource-resolution" : {
119         "type" : "component-resource-resolution",
120         "interfaces" : {
121           "ResourceResolutionComponent" : {
122             "operations" : {
123               "process" : {
124                 "inputs" : {
125                   "artifact-prefix-names" : [ "assign" ],
126                   "store-result" : false
127                 }
128               }
129             }
130           }
131         },
132         "artifacts" : {
133           "assign-mapping" : {
134             "type" : "artifact-mapping-resource",
135             "file" : "Templates/assign-mapping.json"
136           }
137         }
138       },
139       "execute-script-1" : {
140         "type" : "component-script-executor",
141         "interfaces" : {
142           "ComponentScriptExecutor" : {
143             "operations" : {
144               "process" : {
145                 "implementation" : {
146                   "primary" : "component-script",
147                   "timeout" : 180,
148                   "operation_host" : "SELF"
149                 },
150                 "inputs" : {
151                   "script-type" : "kotlin",
152                   "script-class-reference" : "cba.cds.uat.TestScript"
153                 },
154                 "outputs" : { }
155               }
156             }
157           }
158         }
159       },
160       "execute-script-2" : {
161         "type" : "component-script-executor",
162         "interfaces" : {
163           "ComponentScriptExecutor" : {
164             "operations" : {
165               "process" : {
166                 "implementation" : {
167                   "primary" : "component-script",
168                   "timeout" : 180,
169                   "operation_host" : "SELF"
170                 },
171                 "inputs" : {
172                   "script-type" : "kotlin",
173                   "script-class-reference" : "cba.cds.uat.TestScript"
174                 },
175                 "outputs" : { }
176               }
177             }
178           }
179         }
180       },
181       "execute-script-3" : {
182         "type" : "component-script-executor",
183         "interfaces" : {
184           "ComponentScriptExecutor" : {
185             "operations" : {
186               "process" : {
187                 "implementation" : {
188                   "primary" : "component-script",
189                   "timeout" : 180,
190                   "operation_host" : "SELF"
191                 },
192                 "inputs" : {
193                   "script-type" : "kotlin",
194                   "script-class-reference" : "cba.cds.uat.TestScript"
195                 },
196                 "outputs" : { }
197               }
198             }
199           }
200         }
201       },
202       "execute-script-4" : {
203         "type" : "component-script-executor",
204         "interfaces" : {
205           "ComponentScriptExecutor" : {
206             "operations" : {
207               "process" : {
208                 "implementation" : {
209                   "primary" : "component-script",
210                   "timeout" : 180,
211                   "operation_host" : "SELF"
212                 },
213                 "inputs" : {
214                   "script-type" : "kotlin",
215                   "script-class-reference" : "cba.cds.uat.TestScript"
216                 },
217                 "outputs" : { }
218               }
219             }
220           }
221         }
222       },
223       "collect-results" : {
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.cds.uat.CollectorScript"
237                 },
238                 "outputs" : { }
239               }
240             }
241           }
242         }
243       }
244     }
245   }
246 }