Add generic-resource-api DG seed code
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_service-topology-operation-deactivate.json
1 [
2     {
3         "id": "604b70a8.30f9f",
4         "type": "switchNode",
5         "name": "switch request-action",
6         "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
7         "comments": "",
8         "outputs": 1,
9         "x": 536.1904602050781,
10         "y": 314.5237846374512,
11         "z": "62cfcbc6.1804e4",
12         "wires": [
13             [
14                 "9c181b3f.092838",
15                 "2760d61f.58392a"
16             ]
17         ]
18     },
19     {
20         "id": "9c181b3f.092838",
21         "type": "outcome",
22         "name": "DeleteServiceInstance",
23         "xml": "<outcome value='DeleteServiceInstance'>\n",
24         "comments": "",
25         "outputs": 1,
26         "x": 773.3332748413086,
27         "y": 288.80949306488037,
28         "z": "62cfcbc6.1804e4",
29         "wires": [
30             [
31                 "1a68151d.2ac4eb"
32             ]
33         ]
34     },
35     {
36         "id": "2760d61f.58392a",
37         "type": "other",
38         "name": "other",
39         "xml": "<outcome value='Other'>\n",
40         "comments": "",
41         "outputs": 1,
42         "x": 723.3332405090332,
43         "y": 334.5238208770752,
44         "z": "62cfcbc6.1804e4",
45         "wires": [
46             [
47                 "a78d0f9e.d329f"
48             ]
49         ]
50     },
51     {
52         "id": "1a68151d.2ac4eb",
53         "type": "block",
54         "name": "block",
55         "xml": "<block>\n",
56         "atomic": "false",
57         "comments": "",
58         "outputs": 1,
59         "x": 951.9047317504883,
60         "y": 288.8095283508301,
61         "z": "62cfcbc6.1804e4",
62         "wires": [
63             []
64         ]
65     },
66     {
67         "id": "a78d0f9e.d329f",
68         "type": "returnFailure",
69         "name": "return failure",
70         "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteServiceInstance'\" />\n",
71         "comments": "",
72         "x": 969.0475769042969,
73         "y": 334.5237846374512,
74         "z": "62cfcbc6.1804e4",
75         "wires": []
76     },
77     {
78         "id": "ee30906.f78157",
79         "type": "block",
80         "name": "block : atomic",
81         "xml": "<block atomic=\"true\">",
82         "atomic": "true",
83         "outputs": 1,
84         "x": 262.1427879333496,
85         "y": 405.2380313873291,
86         "z": "62cfcbc6.1804e4",
87         "wires": [
88             [
89                 "604b70a8.30f9f",
90                 "b7ce906b.bd1c6",
91                 "6b83ed66.08c724",
92                 "415b774b.0e0bf8",
93                 "388700f9.d2aff"
94             ]
95         ]
96     },
97     {
98         "id": "d424f27.d8ceb1",
99         "type": "dgstart",
100         "name": "DGSTART",
101         "outputs": 1,
102         "x": 99.99999237060547,
103         "y": 81.66666412353516,
104         "z": "62cfcbc6.1804e4",
105         "wires": [
106             [
107                 "e272ce64.f9ac"
108             ]
109         ]
110     },
111     {
112         "id": "e272ce64.f9ac",
113         "type": "service-logic",
114         "name": "GENERIC-RESOURCE-API ${project.version}",
115         "module": "GENERIC-RESOURCE-API",
116         "version": "${project.version}",
117         "comments": "",
118         "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>",
119         "outputs": 1,
120         "x": 175.28569793701172,
121         "y": 121.90477561950684,
122         "z": "62cfcbc6.1804e4",
123         "wires": [
124             [
125                 "f939e6bb.1b9ce8"
126             ]
127         ]
128     },
129     {
130         "id": "f939e6bb.1b9ce8",
131         "type": "method",
132         "name": "method service-topology-operation-deactivate",
133         "xml": "<method rpc='service-topology-operation-deactivate' mode='sync'>\n",
134         "comments": "",
135         "outputs": 1,
136         "x": 216.09528350830078,
137         "y": 163.33332443237305,
138         "z": "62cfcbc6.1804e4",
139         "wires": [
140             [
141                 "ee30906.f78157"
142             ]
143         ]
144     },
145     {
146         "id": "d253a6a8.6c8668",
147         "type": "comment",
148         "name": "service-topology-operation-deactivate",
149         "info": "",
150         "comments": "",
151         "x": 494.3448486328125,
152         "y": 29.253007888793945,
153         "z": "62cfcbc6.1804e4",
154         "wires": []
155     },
156     {
157         "id": "b7ce906b.bd1c6",
158         "type": "switchNode",
159         "name": "switch service-data service-instance-id",
160         "xml": "<switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>\n",
161         "comments": "",
162         "outputs": 1,
163         "x": 591.6666564941406,
164         "y": 239.7618865966797,
165         "z": "62cfcbc6.1804e4",
166         "wires": [
167             [
168                 "fbf7b015.33a16"
169             ]
170         ]
171     },
172     {
173         "id": "fbf7b015.33a16",
174         "type": "outcome",
175         "name": "NULL",
176         "xml": "<outcome value=''>",
177         "comments": "",
178         "outputs": 1,
179         "x": 821.4285621643066,
180         "y": 239.76190662384033,
181         "z": "62cfcbc6.1804e4",
182         "wires": [
183             [
184                 "a2f01f45.35d09"
185             ]
186         ]
187     },
188     {
189         "id": "a2f01f45.35d09",
190         "type": "returnFailure",
191         "name": "return failure",
192         "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`\" />\n",
193         "comments": "",
194         "x": 977.1428070068359,
195         "y": 239.76190185546875,
196         "z": "62cfcbc6.1804e4",
197         "wires": []
198     },
199     {
200         "id": "6b83ed66.08c724",
201         "type": "update",
202         "name": "update AAI service instance",
203         "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"service-instance\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-topology.service-topology-identifier.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-topology.service-topology-identifier.service-type AND\n\t\t\tservice-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n",
204         "comments": "",
205         "outputs": 1,
206         "x": 557.9523620605469,
207         "y": 524.7619037628174,
208         "z": "62cfcbc6.1804e4",
209         "wires": [
210             [
211                 "1a658f52.90fe91",
212                 "7fbd10da.9b854"
213             ]
214         ]
215     },
216     {
217         "id": "1a658f52.90fe91",
218         "type": "failure",
219         "name": "failure",
220         "xml": "<outcome value='failure'>\n",
221         "comments": "",
222         "outputs": 1,
223         "x": 770.7142295837402,
224         "y": 500.0000581741333,
225         "z": "62cfcbc6.1804e4",
226         "wires": [
227             [
228                 "ec560782.dd0478"
229             ]
230         ]
231     },
232     {
233         "id": "ec560782.dd0478",
234         "type": "returnFailure",
235         "name": "return failure",
236         "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"AAI failed\" />\n",
237         "comments": "",
238         "x": 920.7141952514648,
239         "y": 500.00013637542725,
240         "z": "62cfcbc6.1804e4",
241         "wires": []
242     },
243     {
244         "id": "7fbd10da.9b854",
245         "type": "failure",
246         "name": "not-found",
247         "xml": "<outcome value='not-found'>\n",
248         "comments": "",
249         "outputs": 1,
250         "x": 777.0236587524414,
251         "y": 548.571475982666,
252         "z": "62cfcbc6.1804e4",
253         "wires": [
254             [
255                 "ca3b7680.173278"
256             ]
257         ]
258     },
259     {
260         "id": "415b774b.0e0bf8",
261         "type": "set",
262         "name": "set service-level-oper-status to PendingDelete",
263         "xml": "<set>\n<parameter name='service-data.service-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.service-level-oper-status.last-rpc-action' value='deactivate' />\n<parameter name='service-data.service-level-oper-status.last-action' value='DeleteServiceInstance' />\n",
264         "comments": "",
265         "x": 613.9523239135742,
266         "y": 594.5237979888916,
267         "z": "62cfcbc6.1804e4",
268         "wires": []
269     },
270     {
271         "id": "ca3b7680.173278",
272         "type": "block",
273         "name": "block",
274         "xml": "<block>\n",
275         "atomic": "false",
276         "comments": "",
277         "outputs": 1,
278         "x": 904.9999580383301,
279         "y": 548.3333377838135,
280         "z": "62cfcbc6.1804e4",
281         "wires": [
282             []
283         ]
284     },
285     {
286         "id": "7e175a90.802564",
287         "type": "comment",
288         "name": "Don't treat this as an error",
289         "info": "",
290         "comments": "",
291         "x": 1080.0000457763672,
292         "y": 548.3333177566528,
293         "z": "62cfcbc6.1804e4",
294         "wires": []
295     },
296     {
297         "id": "388700f9.d2aff",
298         "type": "switchNode",
299         "name": "switch provided-allotted-resource length",
300         "xml": "<switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
301         "comments": "",
302         "outputs": 1,
303         "x": 596.6667098999023,
304         "y": 408.3333396911621,
305         "z": "62cfcbc6.1804e4",
306         "wires": [
307             [
308                 "9ed42146.3d389",
309                 "3c14b3ca.f345ac",
310                 "40e1d77.09f5028"
311             ]
312         ]
313     },
314     {
315         "id": "9ed42146.3d389",
316         "type": "outcome",
317         "name": "NULL",
318         "xml": "<outcome value=''>",
319         "comments": "",
320         "outputs": 1,
321         "x": 836.666576385498,
322         "y": 409.9999752044678,
323         "z": "62cfcbc6.1804e4",
324         "wires": [
325             [
326                 "5abdf37a.97301c"
327             ]
328         ]
329     },
330     {
331         "id": "3c14b3ca.f345ac",
332         "type": "other",
333         "name": "other",
334         "xml": "<outcome value='Other'>\n",
335         "comments": "",
336         "outputs": 1,
337         "x": 836.6666793823242,
338         "y": 451.66663360595703,
339         "z": "62cfcbc6.1804e4",
340         "wires": [
341             [
342                 "55a7bd8c.02e934"
343             ]
344         ]
345     },
346     {
347         "id": "55a7bd8c.02e934",
348         "type": "returnFailure",
349         "name": "return failure",
350         "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Cannot deactivate this service because there are provided allotted resources\" />\n",
351         "comments": "",
352         "x": 991.6666641235352,
353         "y": 454.9999313354492,
354         "z": "62cfcbc6.1804e4",
355         "wires": []
356     },
357     {
358         "id": "5abdf37a.97301c",
359         "type": "block",
360         "name": "block",
361         "xml": "<block>\n",
362         "atomic": "false",
363         "comments": "",
364         "outputs": 1,
365         "x": 973.3332710266113,
366         "y": 386.66664123535156,
367         "z": "62cfcbc6.1804e4",
368         "wires": [
369             []
370         ]
371     },
372     {
373         "id": "40e1d77.09f5028",
374         "type": "outcome",
375         "name": "0",
376         "xml": "<outcome value='0'>\n",
377         "comments": "",
378         "outputs": 1,
379         "x": 836.666576385498,
380         "y": 368.3332872390747,
381         "z": "62cfcbc6.1804e4",
382         "wires": [
383             [
384                 "5abdf37a.97301c"
385             ]
386         ]
387     }
388 ]