Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_api-contrail-route-topology-operation-activate.json
1 [
2     {
3         "id": "fbf8fafe.8924a8",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 117.00390625,
8         "y": 101.00390625,
9         "z": "433d56b8.8f2a38",
10         "wires": [
11             [
12                 "ddbd49c0.51ec78"
13             ]
14         ]
15     },
16     {
17         "id": "ddbd49c0.51ec78",
18         "type": "service-logic",
19         "name": "GENERIC-RESOURCE-API ${project.version}",
20         "module": "GENERIC-RESOURCE-API",
21         "version": "${project.version}",
22         "comments": "",
23         "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}'>",
24         "outputs": 1,
25         "x": 262.24205017089844,
26         "y": 173.95630741119385,
27         "z": "433d56b8.8f2a38",
28         "wires": [
29             [
30                 "a91124c9.ea56d8"
31             ]
32         ]
33     },
34     {
35         "id": "a91124c9.ea56d8",
36         "type": "method",
37         "name": "api-contrail-route-topology-operation-activate",
38         "xml": "<method rpc='api-contrail-route-topology-operation-activate' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 343.1587562561035,
42         "y": 245.1943483352661,
43         "z": "433d56b8.8f2a38",
44         "wires": [
45             [
46                 "1232d48a.c84e2b"
47             ]
48         ]
49     },
50     {
51         "id": "1232d48a.c84e2b",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 251.4800910949707,
59         "y": 388.527690410614,
60         "z": "433d56b8.8f2a38",
61         "wires": [
62             [
63                 "a7c33159.020f2",
64                 "71348154.08357",
65                 "de0622d4.cc88e",
66                 "b926e867.47b478",
67                 "5b0f0e89.fff95",
68                 "bfffed8.eb42f1",
69                 "c1894c85.76c23",
70                 "a45921e6.ad3ef",
71                 "e8418233.d69da",
72                 "23cc061.9b89efa",
73                 "2a87adce.093512",
74                 "23d1f196.7dcfee",
75                 "a4376ac0.5f7af8",
76                 "3d7a5aa5.9e14c6",
77                 "f859e910.363bc8",
78                 "e0de1bea.e06568",
79                 "bc9568bb.e6eb78",
80                 "142c8365.56afed",
81                 "38b3f506.22440a",
82                 "ec219e57.3542d",
83                 "88c586db.eb3e18",
84                 "bf9b56b5.b3a1e8",
85                 "fe97c2ba.c5f5d",
86                 "3f9cc8d6.fcda48",
87                 "74c07074.b9b6c",
88                 "ef4ae829.eade68",
89                 "defcda34.247b28",
90                 "7e31f809.4e76e8"
91             ]
92         ]
93     },
94     {
95         "id": "71348154.08357",
96         "type": "set",
97         "name": "set tmp.ar.self-link",
98         "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n",
99         "comments": "",
100         "x": 532.9920654296875,
101         "y": 554.3372249603271,
102         "z": "433d56b8.8f2a38",
103         "wires": []
104     },
105     {
106         "id": "a7c33159.020f2",
107         "type": "set",
108         "name": "set tmp.ar.allotted-resource-id,etc",
109         "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$cto-api.contrail-route-allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$cto-api.parent-service-instance-id`' />\n\n\n\n",
110         "comments": "",
111         "x": 571.7514038085938,
112         "y": 466.09673595428467,
113         "z": "433d56b8.8f2a38",
114         "wires": []
115     },
116     {
117         "id": "de0622d4.cc88e",
118         "type": "execute",
119         "name": "execute Properties - pull properties file",
120         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
121         "comments": "",
122         "outputs": 1,
123         "x": 599.3545074462891,
124         "y": 590.2354888916016,
125         "z": "433d56b8.8f2a38",
126         "wires": [
127             []
128         ]
129     },
130     {
131         "id": "5b0f0e89.fff95",
132         "type": "execute",
133         "name": "execute RestApiCallNode - Get AR by id",
134         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='GET' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
135         "comments": "",
136         "outputs": 1,
137         "x": 601.6655883789062,
138         "y": 743.7134675979614,
139         "z": "433d56b8.8f2a38",
140         "wires": [
141             [
142                 "d443ea24.922b58",
143                 "fb1bb5f8.e95f28"
144             ]
145         ]
146     },
147     {
148         "id": "b926e867.47b478",
149         "type": "execute",
150         "name": "generate allotted-resource url",
151         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
152         "comments": "",
153         "outputs": 1,
154         "x": 563.3187942504883,
155         "y": 665.2711420059204,
156         "z": "433d56b8.8f2a38",
157         "wires": [
158             []
159         ]
160     },
161     {
162         "id": "d443ea24.922b58",
163         "type": "success",
164         "name": "success",
165         "xml": "<outcome value='success'>\n",
166         "comments": "",
167         "outputs": 1,
168         "x": 855.461727142334,
169         "y": 740.0213012695312,
170         "z": "433d56b8.8f2a38",
171         "wires": [
172             [
173                 "3d1387c8.400188"
174             ]
175         ]
176     },
177     {
178         "id": "3d1387c8.400188",
179         "type": "block",
180         "name": "block: atomic",
181         "xml": "<block atomic=\"true\">\n",
182         "atomic": "false",
183         "comments": "",
184         "outputs": 1,
185         "x": 1024.4617309570312,
186         "y": 738.5212020874023,
187         "z": "433d56b8.8f2a38",
188         "wires": [
189             [
190                 "2516635.614c89c"
191             ]
192         ]
193     },
194     {
195         "id": "2516635.614c89c",
196         "type": "switchNode",
197         "name": "switch cr length",
198         "xml": "<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n",
199         "comments": "",
200         "outputs": 1,
201         "x": 1212.8189811706543,
202         "y": 736.8903217315674,
203         "z": "433d56b8.8f2a38",
204         "wires": [
205             [
206                 "514a86f5.812698",
207                 "339ac5bc.d5e83a"
208             ]
209         ]
210     },
211     {
212         "id": "514a86f5.812698",
213         "type": "other",
214         "name": "outcome 1",
215         "xml": "<outcome value='1'>\n",
216         "comments": "",
217         "outputs": 1,
218         "x": 1392.1524467468262,
219         "y": 738.1403217315674,
220         "z": "433d56b8.8f2a38",
221         "wires": [
222             [
223                 "797cc731.3341e8"
224             ]
225         ]
226     },
227     {
228         "id": "609fa81b.43f0b8",
229         "type": "set",
230         "name": "set ar from get",
231         "xml": "<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n",
232         "comments": "",
233         "x": 1792.9501419067383,
234         "y": 678.3785338401794,
235         "z": "433d56b8.8f2a38",
236         "wires": []
237     },
238     {
239         "id": "797cc731.3341e8",
240         "type": "block",
241         "name": "block: atomic",
242         "xml": "<block atomic='true'>\n",
243         "atomic": "false",
244         "comments": "",
245         "outputs": 1,
246         "x": 1581.4262981414795,
247         "y": 644.5451211929321,
248         "z": "433d56b8.8f2a38",
249         "wires": [
250             [
251                 "609fa81b.43f0b8",
252                 "1b5999de.c1e766",
253                 "9213e2d9.8bc42"
254             ]
255         ]
256     },
257     {
258         "id": "6cc7076e.1cb1a8",
259         "type": "comment",
260         "name": "GET contrail-route-allotted-resource from mdsal",
261         "info": "",
262         "comments": "",
263         "x": 619.0687980651855,
264         "y": 709.5925989151001,
265         "z": "433d56b8.8f2a38",
266         "wires": []
267     },
268     {
269         "id": "1b5999de.c1e766",
270         "type": "switchNode",
271         "name": "switch order-status",
272         "xml": "<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n",
273         "comments": "",
274         "outputs": 1,
275         "x": 1808.9499244689941,
276         "y": 709.3784890174866,
277         "z": "433d56b8.8f2a38",
278         "wires": [
279             [
280                 "b809025c.a4d3d",
281                 "69b030e.9be7ed"
282             ]
283         ]
284     },
285     {
286         "id": "b809025c.a4d3d",
287         "type": "outcome",
288         "name": "outcome Created",
289         "xml": "<outcome value='Created'>\n",
290         "comments": "",
291         "outputs": 1,
292         "x": 2030.7878799438477,
293         "y": 693.473792552948,
294         "z": "433d56b8.8f2a38",
295         "wires": [
296             [
297                 "5d75aafd.69a114"
298             ]
299         ]
300     },
301     {
302         "id": "69b030e.9be7ed",
303         "type": "outcome",
304         "name": "outcome Other",
305         "xml": "<outcome value='Other'>\n",
306         "comments": "",
307         "outputs": 1,
308         "x": 2025.5977592468262,
309         "y": 720.8072423934937,
310         "z": "433d56b8.8f2a38",
311         "wires": [
312             [
313                 "2ba82db5.eb58c2"
314             ]
315         ]
316     },
317     {
318         "id": "2ba82db5.eb58c2",
319         "type": "returnFailure",
320         "name": "return failure",
321         "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\" \n    value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`\" />\n",
322         "comments": "",
323         "x": 2236.7164573669434,
324         "y": 724.4617581367493,
325         "z": "433d56b8.8f2a38",
326         "wires": []
327     },
328     {
329         "id": "9213e2d9.8bc42",
330         "type": "set",
331         "name": "save backup copy of mdsal-ar for rollback",
332         "xml": "<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n",
333         "comments": "",
334         "x": 1880.8071937561035,
335         "y": 645.1880259513855,
336         "z": "433d56b8.8f2a38",
337         "wires": []
338     },
339     {
340         "id": "8487ec3d.0bea",
341         "type": "comment",
342         "name": "Create urls for restapi",
343         "info": "",
344         "comments": "",
345         "x": 534.2116012573242,
346         "y": 634.8782691955566,
347         "z": "433d56b8.8f2a38",
348         "wires": []
349     },
350     {
351         "id": "7ece8ede.79816",
352         "type": "returnFailure",
353         "name": "return failure",
354         "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=\"Error: Contrail Route not found\" />\n    \n",
355         "comments": "",
356         "x": 1605.921157836914,
357         "y": 840.5873985290527,
358         "z": "433d56b8.8f2a38",
359         "wires": []
360     },
361     {
362         "id": "fb1bb5f8.e95f28",
363         "type": "other",
364         "name": "other",
365         "xml": "<outcome value='Other'>\n",
366         "comments": "",
367         "outputs": 1,
368         "x": 847.3135299682617,
369         "y": 775.0873861312866,
370         "z": "433d56b8.8f2a38",
371         "wires": [
372             [
373                 "59c76443.5ea54c"
374             ]
375         ]
376     },
377     {
378         "id": "59c76443.5ea54c",
379         "type": "block",
380         "name": "block: atomic",
381         "xml": "<block atomic=\"true\">\n",
382         "atomic": "false",
383         "comments": "",
384         "outputs": 1,
385         "x": 1027.3134803771973,
386         "y": 775.7539367675781,
387         "z": "433d56b8.8f2a38",
388         "wires": [
389             [
390                 "7ece8ede.79816"
391             ]
392         ]
393     },
394     {
395         "id": "339ac5bc.d5e83a",
396         "type": "other",
397         "name": "other",
398         "xml": "<outcome value='Other'>\n",
399         "comments": "",
400         "outputs": 1,
401         "x": 1380.4804000854492,
402         "y": 775.4206819534302,
403         "z": "433d56b8.8f2a38",
404         "wires": [
405             [
406                 "7ece8ede.79816"
407             ]
408         ]
409     },
410     {
411         "id": "5d75aafd.69a114",
412         "type": "block",
413         "name": "block",
414         "xml": "<block>\n",
415         "atomic": "false",
416         "comments": "",
417         "outputs": 1,
418         "x": 2214.33748626709,
419         "y": 691.4206805229187,
420         "z": "433d56b8.8f2a38",
421         "wires": [
422             []
423         ]
424     },
425     {
426         "id": "49a6403a.c8105",
427         "type": "not-found",
428         "name": "not found",
429         "xml": "<outcome value='not-found'>\n",
430         "comments": "",
431         "outputs": 1,
432         "x": 831.2895660400391,
433         "y": 1026.7183133363724,
434         "z": "433d56b8.8f2a38",
435         "wires": [
436             [
437                 "a766ad78.04e4e"
438             ]
439         ]
440     },
441     {
442         "id": "e0de1bea.e06568",
443         "type": "get-resource",
444         "name": "get AnAI - l3-network by network-id",
445         "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n",
446         "comments": "",
447         "outputs": 1,
448         "x": 565.7379760742188,
449         "y": 1040.4649600982666,
450         "z": "433d56b8.8f2a38",
451         "wires": [
452             [
453                 "c8ed4496.b74a88",
454                 "49a6403a.c8105",
455                 "d63abbe9.2b3e68"
456             ]
457         ]
458     },
459     {
460         "id": "c8ed4496.b74a88",
461         "type": "failure",
462         "name": "failure",
463         "xml": "<outcome value='failure'>\n",
464         "comments": "",
465         "outputs": 1,
466         "x": 824.0116729736328,
467         "y": 1061.2029172182083,
468         "z": "433d56b8.8f2a38",
469         "wires": [
470             [
471                 "a766ad78.04e4e"
472             ]
473         ]
474     },
475     {
476         "id": "a766ad78.04e4e",
477         "type": "returnFailure",
478         "name": "return failure",
479         "xml": "<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />",
480         "comments": "",
481         "x": 976.1226348876953,
482         "y": 1057.4251462221146,
483         "z": "433d56b8.8f2a38",
484         "wires": []
485     },
486     {
487         "id": "d63abbe9.2b3e68",
488         "type": "success",
489         "name": "success",
490         "xml": "<outcome value='success'>\n",
491         "comments": "",
492         "outputs": 1,
493         "x": 829.2896270751953,
494         "y": 1092.7183133363724,
495         "z": "433d56b8.8f2a38",
496         "wires": [
497             [
498                 "c2c4bb65.8ad1d8"
499             ]
500         ]
501     },
502     {
503         "id": "c2c4bb65.8ad1d8",
504         "type": "block",
505         "name": "block : atomic",
506         "xml": "<block atomic=\"true\">",
507         "atomic": "true",
508         "outputs": 1,
509         "x": 981.9561920166016,
510         "y": 1091.0516415834427,
511         "z": "433d56b8.8f2a38",
512         "wires": [
513             []
514         ]
515     },
516     {
517         "id": "b3798a7c.d13bf8",
518         "type": "comment",
519         "name": "GET source network from AAI",
520         "info": "",
521         "comments": "",
522         "x": 535.9681777954102,
523         "y": 1005.9683332443237,
524         "z": "433d56b8.8f2a38",
525         "wires": []
526     },
527     {
528         "id": "a45921e6.ad3ef",
529         "type": "execute",
530         "name": "execute Contrail API apply network policy to source network",
531         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$uuidresp.uuid`' />\n\n\n",
532         "comments": "",
533         "outputs": 1,
534         "x": 654.6180572509766,
535         "y": 1357.9513778686523,
536         "z": "433d56b8.8f2a38",
537         "wires": [
538             [
539                 "19d85634.c917ea",
540                 "3a9f4e83.0014d2"
541             ]
542         ]
543     },
544     {
545         "id": "19d85634.c917ea",
546         "type": "success",
547         "name": "success",
548         "xml": "<outcome value='success'>\n",
549         "comments": "",
550         "outputs": 1,
551         "x": 1022.2842788696289,
552         "y": 1355.379361152649,
553         "z": "433d56b8.8f2a38",
554         "wires": [
555             [
556                 "95b88f2.7fbc67"
557             ]
558         ]
559     },
560     {
561         "id": "3a9f4e83.0014d2",
562         "type": "failure",
563         "name": "failure",
564         "xml": "<outcome value='failure'>\n",
565         "comments": "",
566         "outputs": 1,
567         "x": 1020.3796005249023,
568         "y": 1388.37930091843,
569         "z": "433d56b8.8f2a38",
570         "wires": [
571             [
572                 "abb85b0d.789338"
573             ]
574         ]
575     },
576     {
577         "id": "abb85b0d.789338",
578         "type": "returnFailure",
579         "name": "return failure",
580         "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=\"Failed to apply policy in Contrail to source network\" />\n",
581         "comments": "",
582         "x": 1180.2843704223633,
583         "y": 1387.71266746521,
584         "z": "433d56b8.8f2a38",
585         "wires": []
586     },
587     {
588         "id": "95b88f2.7fbc67",
589         "type": "block",
590         "name": "block",
591         "xml": "<block>\n",
592         "atomic": "false",
593         "comments": "",
594         "outputs": 1,
595         "x": 1174.4747619628906,
596         "y": 1356.0460861586034,
597         "z": "433d56b8.8f2a38",
598         "wires": [
599             []
600         ]
601     },
602     {
603         "id": "bfffed8.eb42f1",
604         "type": "set",
605         "name": "set ar-assignments",
606         "xml": "<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n",
607         "comments": "",
608         "x": 519.0039672851562,
609         "y": 834.0040140151978,
610         "z": "433d56b8.8f2a38",
611         "wires": []
612     },
613     {
614         "id": "c1894c85.76c23",
615         "type": "switchNode",
616         "name": "switch source-network.network-id",
617         "xml": "<switch test='`$ar-assignments.source-network.network-id`'>\n\n",
618         "comments": "",
619         "outputs": 1,
620         "x": 555.5039672851562,
621         "y": 942.0039577484131,
622         "z": "433d56b8.8f2a38",
623         "wires": [
624             [
625                 "6d551f8f.357b",
626                 "812fe09f.e6513"
627             ]
628         ]
629     },
630     {
631         "id": "6d551f8f.357b",
632         "type": "other",
633         "name": "Other",
634         "xml": "<outcome value='Other'>",
635         "comments": "",
636         "outputs": 1,
637         "x": 915.0041236877441,
638         "y": 940.6702857017517,
639         "z": "433d56b8.8f2a38",
640         "wires": [
641             [
642                 "dc661073.9c1b9"
643             ]
644         ]
645     },
646     {
647         "id": "812fe09f.e6513",
648         "type": "other",
649         "name": "NULL",
650         "xml": "<outcome value=''>",
651         "comments": "",
652         "outputs": 1,
653         "x": 910.6709403991699,
654         "y": 903.6700859069824,
655         "z": "433d56b8.8f2a38",
656         "wires": [
657             [
658                 "d6f57d04.58e7e"
659             ]
660         ]
661     },
662     {
663         "id": "dc661073.9c1b9",
664         "type": "block",
665         "name": "block",
666         "xml": "<block>\n",
667         "atomic": "false",
668         "comments": "",
669         "outputs": 1,
670         "x": 1049.115379333496,
671         "y": 941.1146903038025,
672         "z": "433d56b8.8f2a38",
673         "wires": [
674             []
675         ]
676     },
677     {
678         "id": "d6f57d04.58e7e",
679         "type": "returnFailure",
680         "name": "return failure",
681         "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=\"Error activating contrail route.  Source network not found\" />\n",
682         "comments": "",
683         "x": 1064.8044052124023,
684         "y": 904.3369884490967,
685         "z": "433d56b8.8f2a38",
686         "wires": []
687     },
688     {
689         "id": "438362ca.c4fb1c",
690         "type": "comment",
691         "name": "Find tenant id/cloud region from source network",
692         "info": "",
693         "comments": "",
694         "x": 596.4042282104492,
695         "y": 908.6702222824097,
696         "z": "433d56b8.8f2a38",
697         "wires": []
698     },
699     {
700         "id": "12975148.308cdf",
701         "type": "comment",
702         "name": "Apply the policy to source network",
703         "info": "",
704         "comments": "",
705         "x": 558.0039825439453,
706         "y": 1093.003999710083,
707         "z": "433d56b8.8f2a38",
708         "wires": []
709     },
710     {
711         "id": "e8418233.d69da",
712         "type": "returnSuccess",
713         "name": "return success",
714         "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
715         "comments": "",
716         "x": 470.004207611084,
717         "y": 2616.9808492660522,
718         "z": "433d56b8.8f2a38",
719         "wires": []
720     },
721     {
722         "id": "23cc061.9b89efa",
723         "type": "set",
724         "name": "set allotted-resource-oper-status",
725         "xml": "<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",
726         "comments": "",
727         "x": 530.4249496459961,
728         "y": 2438.484212875366,
729         "z": "433d56b8.8f2a38",
730         "wires": []
731     },
732     {
733         "id": "2a87adce.093512",
734         "type": "execute",
735         "name": "execute RestApiCallNode - PUT AR by id",
736         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
737         "comments": "",
738         "outputs": 1,
739         "x": 558.5334243774414,
740         "y": 2512.5337057113647,
741         "z": "433d56b8.8f2a38",
742         "wires": [
743             [
744                 "86fe624a.9f769",
745                 "c15082cc.e45ed",
746                 "73ea0483.537b4c"
747             ]
748         ]
749     },
750     {
751         "id": "86fe624a.9f769",
752         "type": "not-found",
753         "name": "not-found",
754         "xml": "<outcome value='not-found'>\n",
755         "comments": "",
756         "outputs": 1,
757         "x": 828.8414421081543,
758         "y": 2565.5319065079093,
759         "z": "433d56b8.8f2a38",
760         "wires": [
761             [
762                 "b34f6a16.4d5698"
763             ]
764         ]
765     },
766     {
767         "id": "c15082cc.e45ed",
768         "type": "failure",
769         "name": "failure",
770         "xml": "<outcome value='failure'>\n",
771         "comments": "",
772         "outputs": 1,
773         "x": 819.8414916992188,
774         "y": 2534.031932257116,
775         "z": "433d56b8.8f2a38",
776         "wires": [
777             [
778                 "b34f6a16.4d5698"
779             ]
780         ]
781     },
782     {
783         "id": "73ea0483.537b4c",
784         "type": "success",
785         "name": "success",
786         "xml": "<outcome value='success'>\n",
787         "comments": "",
788         "outputs": 1,
789         "x": 823.5915298461914,
790         "y": 2504.389037132263,
791         "z": "433d56b8.8f2a38",
792         "wires": [
793             [
794                 "cd864e8c.2ab94"
795             ]
796         ]
797     },
798     {
799         "id": "82666aa6.c56cb8",
800         "type": "returnFailure",
801         "name": "return failure",
802         "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=\"Error updating md-sal for contrail-route-allotted-resource\" />\n",
803         "comments": "",
804         "x": 1187.5915756225586,
805         "y": 2546.7821083068848,
806         "z": "433d56b8.8f2a38",
807         "wires": []
808     },
809     {
810         "id": "cd864e8c.2ab94",
811         "type": "block",
812         "name": "block",
813         "xml": "<block>\n",
814         "atomic": "false",
815         "comments": "",
816         "outputs": 1,
817         "x": 993.2475204467773,
818         "y": 2502.5816679000854,
819         "z": "433d56b8.8f2a38",
820         "wires": [
821             []
822         ]
823     },
824     {
825         "id": "23d1f196.7dcfee",
826         "type": "execute",
827         "name": "execute getTime",
828         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
829         "comments": "",
830         "outputs": 1,
831         "x": 481.24754333496094,
832         "y": 2404.9143447875977,
833         "z": "433d56b8.8f2a38",
834         "wires": [
835             []
836         ]
837     },
838     {
839         "id": "17748471.05b93c",
840         "type": "comment",
841         "name": "Need to rollback aai here",
842         "info": "",
843         "comments": "",
844         "x": 1380.6708450317383,
845         "y": 2480.0996432304382,
846         "z": "433d56b8.8f2a38",
847         "wires": []
848     },
849     {
850         "id": "14c283bc.16080c",
851         "type": "comment",
852         "name": "Create  network policy in AAI",
853         "info": "",
854         "comments": "",
855         "x": 515.0040664672852,
856         "y": 2354.0994386672974,
857         "z": "433d56b8.8f2a38",
858         "wires": []
859     },
860     {
861         "id": "a4376ac0.5f7af8",
862         "type": "update",
863         "name": "update AAI allotted-resource",
864         "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n\t<parameter name=\"orchestration-status\" value=\"activated\" />\n",
865         "comments": "",
866         "outputs": 1,
867         "x": 519.6231384277344,
868         "y": 2316.0520610809326,
869         "z": "433d56b8.8f2a38",
870         "wires": [
871             [
872                 "e26ff95b.191f28",
873                 "5b810143.7cfe6"
874             ]
875         ]
876     },
877     {
878         "id": "e26ff95b.191f28",
879         "type": "failure",
880         "name": "failure",
881         "xml": "<outcome value='failure'>\n",
882         "comments": "",
883         "outputs": 1,
884         "x": 787.3850555419922,
885         "y": 2293.290114402771,
886         "z": "433d56b8.8f2a38",
887         "wires": [
888             [
889                 "a1025836.ec58f8"
890             ]
891         ]
892     },
893     {
894         "id": "5b810143.7cfe6",
895         "type": "failure",
896         "name": "not-found",
897         "xml": "<outcome value='not-found'>\n",
898         "comments": "",
899         "outputs": 1,
900         "x": 792.6944847106934,
901         "y": 2328.8615322113037,
902         "z": "433d56b8.8f2a38",
903         "wires": [
904             [
905                 "a1025836.ec58f8"
906             ]
907         ]
908     },
909     {
910         "id": "81d4f66a.d1c928",
911         "type": "returnFailure",
912         "name": "return failure",
913         "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",
914         "comments": "",
915         "x": 1157.4802894592285,
916         "y": 2309.909327507019,
917         "z": "433d56b8.8f2a38",
918         "wires": []
919     },
920     {
921         "id": "59f5f19c.2c2bf",
922         "type": "comment",
923         "name": "Update AAI AR",
924         "info": "",
925         "comments": "",
926         "x": 472.96598052978516,
927         "y": 2275.480383872986,
928         "z": "433d56b8.8f2a38",
929         "wires": []
930     },
931     {
932         "id": "a1ff339e.3748d",
933         "type": "comment",
934         "name": "Update network policy in AAI - relationship to networks",
935         "info": "",
936         "comments": "",
937         "x": 595.004150390625,
938         "y": 2174.004216194153,
939         "z": "433d56b8.8f2a38",
940         "wires": []
941     },
942     {
943         "id": "3d7a5aa5.9e14c6",
944         "type": "save",
945         "name": "save AnAI - network-policy relationship to source and destination network",
946         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" \nvalue=\"`'/aai/v$/network/l3-networks/l3-network/' + $ar-assignments.source-network.network-id`\" />\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" \nvalue=\"`'/aai/v$/network/l3-networks/l3-network/' + $ar-assignments.dest-network.network-id`\" />\n\n",
947         "comments": "",
948         "outputs": 1,
949         "x": 666.381103515625,
950         "y": 2220.071865081787,
951         "z": "433d56b8.8f2a38",
952         "wires": [
953             [
954                 "9a52b1cf.1510d",
955                 "60b38365.bf508c"
956             ]
957         ]
958     },
959     {
960         "id": "ec62599e.16b9b8",
961         "type": "returnFailure",
962         "name": "return failure",
963         "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=\"Failed to save network policy in AAI\" />\n",
964         "comments": "",
965         "x": 1646.7267532348633,
966         "y": 2195.3538751602173,
967         "z": "433d56b8.8f2a38",
968         "wires": []
969     },
970     {
971         "id": "9a52b1cf.1510d",
972         "type": "failure",
973         "name": "failure",
974         "xml": "<outcome value='failure'>\n",
975         "comments": "",
976         "outputs": 1,
977         "x": 1065.15523147583,
978         "y": 2190.3694381713867,
979         "z": "433d56b8.8f2a38",
980         "wires": [
981             [
982                 "e25e5b70.f65028"
983             ]
984         ]
985     },
986     {
987         "id": "60b38365.bf508c",
988         "type": "not-found",
989         "name": "not-found",
990         "xml": "<outcome value='not-found'>\n",
991         "comments": "",
992         "outputs": 1,
993         "x": 1071.9648513793945,
994         "y": 2220.845724582672,
995         "z": "433d56b8.8f2a38",
996         "wires": [
997             [
998                 "e25e5b70.f65028"
999             ]
1000         ]
1001     },
1002     {
1003         "id": "df841654.7038a8",
1004         "type": "comment",
1005         "name": "Parameters",
1006         "info": "INPUT:\n\ncto-api.default-domain\ncto-api.default-project\ncto-api.cloud-region-id\ncto-api.contrail-route-allotted-resource-id\ncto-api.src-contrail-network-fqdn\ncto-api.collector-contrail-network-fqdn",
1007         "comments": "",
1008         "x": 625.3373031616211,
1009         "y": 92.67058181762695,
1010         "z": "433d56b8.8f2a38",
1011         "wires": []
1012     },
1013     {
1014         "id": "f859e910.363bc8",
1015         "type": "call",
1016         "name": "call validate-api-contrail-route-input",
1017         "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-api-contrail-route-input' mode='sync' >\n",
1018         "comments": "",
1019         "outputs": 1,
1020         "x": 578.3372192382812,
1021         "y": 432.0039372444153,
1022         "z": "433d56b8.8f2a38",
1023         "wires": [
1024             []
1025         ]
1026     },
1027     {
1028         "id": "bc9568bb.e6eb78",
1029         "type": "set",
1030         "name": "set cloud-region-id for input to contrail",
1031         "xml": "<set>\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n",
1032         "comments": "",
1033         "x": 578.00390625,
1034         "y": 1146.674747467041,
1035         "z": "433d56b8.8f2a38",
1036         "wires": []
1037     },
1038     {
1039         "id": "8553ed76.ca7a",
1040         "type": "other",
1041         "name": "Other",
1042         "xml": "<outcome value='Other'>",
1043         "comments": "",
1044         "outputs": 1,
1045         "x": 822.504264831543,
1046         "y": 1480.3410449028015,
1047         "z": "433d56b8.8f2a38",
1048         "wires": [
1049             [
1050                 "ddb9ca6f.61d5a8"
1051             ]
1052         ]
1053     },
1054     {
1055         "id": "2ab2cf3c.7cbb2",
1056         "type": "other",
1057         "name": "NULL",
1058         "xml": "<outcome value=''>",
1059         "comments": "",
1060         "outputs": 1,
1061         "x": 818.1710815429688,
1062         "y": 1443.3408451080322,
1063         "z": "433d56b8.8f2a38",
1064         "wires": [
1065             [
1066                 "7f5db074.60a8"
1067             ]
1068         ]
1069     },
1070     {
1071         "id": "ddb9ca6f.61d5a8",
1072         "type": "block",
1073         "name": "block",
1074         "xml": "<block>\n",
1075         "atomic": "false",
1076         "comments": "",
1077         "outputs": 1,
1078         "x": 956.6155204772949,
1079         "y": 1480.7854495048523,
1080         "z": "433d56b8.8f2a38",
1081         "wires": [
1082             []
1083         ]
1084     },
1085     {
1086         "id": "7f5db074.60a8",
1087         "type": "returnFailure",
1088         "name": "return failure",
1089         "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=\"Error activating contrail route.  Destination network not found\" />\n",
1090         "comments": "",
1091         "x": 972.3045463562012,
1092         "y": 1444.0077476501465,
1093         "z": "433d56b8.8f2a38",
1094         "wires": []
1095     },
1096     {
1097         "id": "e73a4573.fde828",
1098         "type": "not-found",
1099         "name": "not found",
1100         "xml": "<outcome value='not-found'>\n",
1101         "comments": "",
1102         "outputs": 1,
1103         "x": 885.0039978027344,
1104         "y": 1524.4330253601074,
1105         "z": "433d56b8.8f2a38",
1106         "wires": [
1107             [
1108                 "30c22905.3a4936"
1109             ]
1110         ]
1111     },
1112     {
1113         "id": "142c8365.56afed",
1114         "type": "get-resource",
1115         "name": "get AnAI - l3-network by dest network-id",
1116         "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n",
1117         "comments": "",
1118         "outputs": 1,
1119         "x": 605.6308746337891,
1120         "y": 1531.9652662277222,
1121         "z": "433d56b8.8f2a38",
1122         "wires": [
1123             [
1124                 "e73a4573.fde828",
1125                 "d1a7593e.2315a8",
1126                 "512d25e0.f1767c"
1127             ]
1128         ]
1129     },
1130     {
1131         "id": "d1a7593e.2315a8",
1132         "type": "failure",
1133         "name": "failure",
1134         "xml": "<outcome value='failure'>\n",
1135         "comments": "",
1136         "outputs": 1,
1137         "x": 877.7261047363281,
1138         "y": 1558.9176292419434,
1139         "z": "433d56b8.8f2a38",
1140         "wires": [
1141             [
1142                 "30c22905.3a4936"
1143             ]
1144         ]
1145     },
1146     {
1147         "id": "30c22905.3a4936",
1148         "type": "returnFailure",
1149         "name": "return failure",
1150         "xml": "<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />",
1151         "comments": "",
1152         "x": 1029.8370666503906,
1153         "y": 1555.1398582458496,
1154         "z": "433d56b8.8f2a38",
1155         "wires": []
1156     },
1157     {
1158         "id": "512d25e0.f1767c",
1159         "type": "success",
1160         "name": "success",
1161         "xml": "<outcome value='success'>\n",
1162         "comments": "",
1163         "outputs": 1,
1164         "x": 887.5755081176758,
1165         "y": 1593.2900938987732,
1166         "z": "433d56b8.8f2a38",
1167         "wires": [
1168             [
1169                 "c41d8742.6e9888"
1170             ]
1171         ]
1172     },
1173     {
1174         "id": "c41d8742.6e9888",
1175         "type": "block",
1176         "name": "block : atomic",
1177         "xml": "<block atomic=\"true\">",
1178         "atomic": "true",
1179         "outputs": 1,
1180         "x": 1040.242073059082,
1181         "y": 1591.6234221458435,
1182         "z": "433d56b8.8f2a38",
1183         "wires": [
1184             []
1185         ]
1186     },
1187     {
1188         "id": "7f8f58d7.90bc28",
1189         "type": "comment",
1190         "name": "GET dest network from AAI",
1191         "info": "",
1192         "comments": "",
1193         "x": 562.4325408935547,
1194         "y": 1423.1471500396729,
1195         "z": "433d56b8.8f2a38",
1196         "wires": []
1197     },
1198     {
1199         "id": "38b3f506.22440a",
1200         "type": "execute",
1201         "name": "execute Contrail API apply network policy to destination network",
1202         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$uuidresp.uuid`' />\n\n",
1203         "comments": "",
1204         "outputs": 1,
1205         "x": 668.0042114257812,
1206         "y": 1910.0046558380127,
1207         "z": "433d56b8.8f2a38",
1208         "wires": [
1209             [
1210                 "96c79b36.154138",
1211                 "79421533.4e5ecc"
1212             ]
1213         ]
1214     },
1215     {
1216         "id": "96c79b36.154138",
1217         "type": "success",
1218         "name": "success",
1219         "xml": "<outcome value='success'>\n",
1220         "comments": "",
1221         "outputs": 1,
1222         "x": 1004.6706390380859,
1223         "y": 1881.4327244758606,
1224         "z": "433d56b8.8f2a38",
1225         "wires": [
1226             [
1227                 "871ab29c.61b02"
1228             ]
1229         ]
1230     },
1231     {
1232         "id": "79421533.4e5ecc",
1233         "type": "failure",
1234         "name": "failure",
1235         "xml": "<outcome value='failure'>\n",
1236         "comments": "",
1237         "outputs": 1,
1238         "x": 1002.7659606933594,
1239         "y": 1914.4326642416418,
1240         "z": "433d56b8.8f2a38",
1241         "wires": [
1242             [
1243                 "e2d4bff5.4d172"
1244             ]
1245         ]
1246     },
1247     {
1248         "id": "56199f14.af432",
1249         "type": "returnFailure",
1250         "name": "return failure",
1251         "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=\"Failed to apply policy in Contrail to destination network\" />\n",
1252         "comments": "",
1253         "x": 1372.6709747314453,
1254         "y": 1916.7664680480957,
1255         "z": "433d56b8.8f2a38",
1256         "wires": []
1257     },
1258     {
1259         "id": "871ab29c.61b02",
1260         "type": "block",
1261         "name": "block",
1262         "xml": "<block>\n",
1263         "atomic": "false",
1264         "comments": "",
1265         "outputs": 1,
1266         "x": 1156.8611221313477,
1267         "y": 1882.099449481815,
1268         "z": "433d56b8.8f2a38",
1269         "wires": [
1270             []
1271         ]
1272     },
1273     {
1274         "id": "8c596cbe.dd753",
1275         "type": "comment",
1276         "name": "Apply the policy to dest network",
1277         "info": "",
1278         "comments": "",
1279         "x": 561.3903503417969,
1280         "y": 1877.057378768921,
1281         "z": "433d56b8.8f2a38",
1282         "wires": []
1283     },
1284     {
1285         "id": "ec219e57.3542d",
1286         "type": "switchNode",
1287         "name": "switch dest-network.network-id",
1288         "xml": "<switch test='`$ar-assignments.dest-network.network-id`'>\n\n",
1289         "comments": "",
1290         "outputs": 1,
1291         "x": 569.0039825439453,
1292         "y": 1463.674859046936,
1293         "z": "433d56b8.8f2a38",
1294         "wires": [
1295             [
1296                 "8553ed76.ca7a",
1297                 "2ab2cf3c.7cbb2"
1298             ]
1299         ]
1300     },
1301     {
1302         "id": "88c586db.eb3e18",
1303         "type": "execute",
1304         "name": "execute Contrail API fqname to uuid for source network",
1305         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='fqname-to-uuid' />\n<parameter name='api-action' value='get' />\n<parameter name='resp-prefix' value='uuidresp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='fqname-type' value='virtual-network' />\n<parameter name='policy-name' value='`$src-virtual-network-fqname`' />\n\n",
1306         "comments": "",
1307         "outputs": 1,
1308         "x": 639.0039978027344,
1309         "y": 1281.674801826477,
1310         "z": "433d56b8.8f2a38",
1311         "wires": [
1312             [
1313                 "7a1c57b0.a74188",
1314                 "df772c1b.3fd3f"
1315             ]
1316         ]
1317     },
1318     {
1319         "id": "7a1c57b0.a74188",
1320         "type": "success",
1321         "name": "success",
1322         "xml": "<outcome value='success'>\n",
1323         "comments": "",
1324         "outputs": 1,
1325         "x": 971.0039367675781,
1326         "y": 1290.6745529174805,
1327         "z": "433d56b8.8f2a38",
1328         "wires": [
1329             [
1330                 "8bb3dc75.04d83"
1331             ]
1332         ]
1333     },
1334     {
1335         "id": "df772c1b.3fd3f",
1336         "type": "failure",
1337         "name": "failure",
1338         "xml": "<outcome value='failure'>\n",
1339         "comments": "",
1340         "outputs": 1,
1341         "x": 974.0992736816406,
1342         "y": 1325.6744497679174,
1343         "z": "433d56b8.8f2a38",
1344         "wires": [
1345             [
1346                 "30c79ae1.56e5e6"
1347             ]
1348         ]
1349     },
1350     {
1351         "id": "30c79ae1.56e5e6",
1352         "type": "returnFailure",
1353         "name": "return failure",
1354         "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=\"Failed to find network uuid for Contrail to source network\" />\n",
1355         "comments": "",
1356         "x": 1134.0040435791016,
1357         "y": 1325.0078163146973,
1358         "z": "433d56b8.8f2a38",
1359         "wires": []
1360     },
1361     {
1362         "id": "8bb3dc75.04d83",
1363         "type": "block",
1364         "name": "block",
1365         "xml": "<block>\n",
1366         "atomic": "false",
1367         "comments": "",
1368         "outputs": 1,
1369         "x": 1114.1943969726562,
1370         "y": 1287.3412857055664,
1371         "z": "433d56b8.8f2a38",
1372         "wires": [
1373             []
1374         ]
1375     },
1376     {
1377         "id": "bf9b56b5.b3a1e8",
1378         "type": "execute",
1379         "name": "execute Contrail API fqname to uuid for dest network",
1380         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='fqname-to-uuid' />\n<parameter name='api-action' value='get' />\n<parameter name='resp-prefix' value='uuidresp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$dest-default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='fqname-type' value='virtual-network' />\n<parameter name='policy-name' value='`$dest-virtual-network-fqname`' />\n\n",
1381         "comments": "",
1382         "outputs": 1,
1383         "x": 630.0040893554688,
1384         "y": 1803.6749420166016,
1385         "z": "433d56b8.8f2a38",
1386         "wires": [
1387             [
1388                 "d3a9b3b.a55135",
1389                 "4c6855f7.9d9f3c"
1390             ]
1391         ]
1392     },
1393     {
1394         "id": "d3a9b3b.a55135",
1395         "type": "success",
1396         "name": "success",
1397         "xml": "<outcome value='success'>\n",
1398         "comments": "",
1399         "outputs": 1,
1400         "x": 971.0040740966797,
1401         "y": 1770.6746549606323,
1402         "z": "433d56b8.8f2a38",
1403         "wires": [
1404             [
1405                 "b7013ec1.476c6"
1406             ]
1407         ]
1408     },
1409     {
1410         "id": "4c6855f7.9d9f3c",
1411         "type": "failure",
1412         "name": "failure",
1413         "xml": "<outcome value='failure'>\n",
1414         "comments": "",
1415         "outputs": 1,
1416         "x": 969.0993499755859,
1417         "y": 1806.6747187040746,
1418         "z": "433d56b8.8f2a38",
1419         "wires": [
1420             [
1421                 "a6d24134.4d78e"
1422             ]
1423         ]
1424     },
1425     {
1426         "id": "a6d24134.4d78e",
1427         "type": "returnFailure",
1428         "name": "return failure",
1429         "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=\"Failed to find network uuid for Contrail to destination network\" />\n",
1430         "comments": "",
1431         "x": 1129.0041198730469,
1432         "y": 1806.0080852508545,
1433         "z": "433d56b8.8f2a38",
1434         "wires": []
1435     },
1436     {
1437         "id": "b7013ec1.476c6",
1438         "type": "block",
1439         "name": "block",
1440         "xml": "<block>\n",
1441         "atomic": "false",
1442         "comments": "",
1443         "outputs": 1,
1444         "x": 1123.1945571899414,
1445         "y": 1771.3413799665868,
1446         "z": "433d56b8.8f2a38",
1447         "wires": [
1448             []
1449         ]
1450     },
1451     {
1452         "id": "3f9cc8d6.fcda48",
1453         "type": "execute",
1454         "name": "execute Split to get contrail virtual network fqname without defaults",
1455         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n   <parameter name='ctx_memory_result_key' value='virtual-network-fqdn-split' />\n   <parameter name='original_string' value='`$aai.src-network.contrail-network-fqdn`' />\n   <parameter name='regex' value=':' />\n\n\n",
1456         "comments": "",
1457         "outputs": 1,
1458         "x": 671.0039215087891,
1459         "y": 1188.6746273040771,
1460         "z": "433d56b8.8f2a38",
1461         "wires": [
1462             []
1463         ]
1464     },
1465     {
1466         "id": "5caffa4d.c36db4",
1467         "type": "set",
1468         "name": "set src-virtual-network-fqdn",
1469         "xml": "<set>\n<parameter name='src-virtual-network-fqname' value='`$virtual-network-fqdn-split[$virtual-network-fqdn-split_length - 1]`' />\n",
1470         "comments": "",
1471         "x": 1193.6705474853516,
1472         "y": 1245.3414163589478,
1473         "z": "433d56b8.8f2a38",
1474         "wires": []
1475     },
1476     {
1477         "id": "fe97c2ba.c5f5d",
1478         "type": "switchNode",
1479         "name": "switch virtual-network-fqdn-split length",
1480         "xml": "<switch test='`$virtual-network-fqdn-split_length`'>\n",
1481         "comments": "",
1482         "outputs": 1,
1483         "x": 583.6706848144531,
1484         "y": 1228.6743993759155,
1485         "z": "433d56b8.8f2a38",
1486         "wires": [
1487             [
1488                 "3df80ebf.7bf7a2",
1489                 "4cdce0e8.bafeb"
1490             ]
1491         ]
1492     },
1493     {
1494         "id": "3df80ebf.7bf7a2",
1495         "type": "outcome",
1496         "name": "outcome 0",
1497         "xml": "<outcome value='0'>\n",
1498         "comments": "",
1499         "outputs": 1,
1500         "x": 1009.0040435791016,
1501         "y": 1209.6746559143066,
1502         "z": "433d56b8.8f2a38",
1503         "wires": [
1504             [
1505                 "4a934e0.2948ab4"
1506             ]
1507         ]
1508     },
1509     {
1510         "id": "4cdce0e8.bafeb",
1511         "type": "other",
1512         "name": "other",
1513         "xml": "<outcome value='Other'>\n",
1514         "comments": "",
1515         "outputs": 1,
1516         "x": 996.6706123352051,
1517         "y": 1245.0078945159912,
1518         "z": "433d56b8.8f2a38",
1519         "wires": [
1520             [
1521                 "5caffa4d.c36db4"
1522             ]
1523         ]
1524     },
1525     {
1526         "id": "4a934e0.2948ab4",
1527         "type": "returnFailure",
1528         "name": "return failure",
1529         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Unable to determine network fq-name from contrail fqdn' />\n",
1530         "comments": "",
1531         "x": 1174.3374366760254,
1532         "y": 1208.008044242859,
1533         "z": "433d56b8.8f2a38",
1534         "wires": []
1535     },
1536     {
1537         "id": "74c07074.b9b6c",
1538         "type": "execute",
1539         "name": "execute Split to get contrail virtual network fqname from contrail-network-fqdn",
1540         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n   <parameter name='ctx_memory_result_key' value='virtual-network-fqdn-split' />\n   <parameter name='original_string' value='`$aai.dest-network.contrail-network-fqdn`' />\n   <parameter name='regex' value=':' />\n\n\n",
1541         "comments": "",
1542         "outputs": 1,
1543         "x": 720.0038757324219,
1544         "y": 1646.6749620437622,
1545         "z": "433d56b8.8f2a38",
1546         "wires": [
1547             []
1548         ]
1549     },
1550     {
1551         "id": "471ff7c8.22f108",
1552         "type": "set",
1553         "name": "set dest-virtual-network-fqname",
1554         "xml": "<set>\n<parameter name='dest-virtual-network-fqname' value='`$virtual-network-fqdn-split[$virtual-network-fqdn-split_length - 1]`' />\n<parameter name='dest-default-project' value='`$virtual-network-fqdn-split[$virtual-network-fqdn-split_length - 2]`' />\n",
1555         "comments": "",
1556         "x": 1205.6704864501953,
1557         "y": 1719.3413534164429,
1558         "z": "433d56b8.8f2a38",
1559         "wires": []
1560     },
1561     {
1562         "id": "ef4ae829.eade68",
1563         "type": "switchNode",
1564         "name": "switch virtual-network-fqdn-split length",
1565         "xml": "<switch test='`$virtual-network-fqdn-split_length`'>\n",
1566         "comments": "",
1567         "outputs": 1,
1568         "x": 587.6706237792969,
1569         "y": 1735.6746196746826,
1570         "z": "433d56b8.8f2a38",
1571         "wires": [
1572             [
1573                 "28174afe.44eb26",
1574                 "20116195.80bece"
1575             ]
1576         ]
1577     },
1578     {
1579         "id": "28174afe.44eb26",
1580         "type": "outcome",
1581         "name": "outcome 0",
1582         "xml": "<outcome value='0'>\n",
1583         "comments": "",
1584         "outputs": 1,
1585         "x": 1021.0039825439453,
1586         "y": 1683.6745929718018,
1587         "z": "433d56b8.8f2a38",
1588         "wires": [
1589             [
1590                 "949e42d4.3282b"
1591             ]
1592         ]
1593     },
1594     {
1595         "id": "20116195.80bece",
1596         "type": "other",
1597         "name": "other",
1598         "xml": "<outcome value='Other'>\n",
1599         "comments": "",
1600         "outputs": 1,
1601         "x": 1008.6705513000488,
1602         "y": 1719.0078315734863,
1603         "z": "433d56b8.8f2a38",
1604         "wires": [
1605             [
1606                 "471ff7c8.22f108"
1607             ]
1608         ]
1609     },
1610     {
1611         "id": "949e42d4.3282b",
1612         "type": "returnFailure",
1613         "name": "return failure",
1614         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Unable to determine network fq-name from contrail fqdn' />\n",
1615         "comments": "",
1616         "x": 1186.3373756408691,
1617         "y": 1682.007981300354,
1618         "z": "433d56b8.8f2a38",
1619         "wires": []
1620     },
1621     {
1622         "id": "ad550ebe.97e4c",
1623         "type": "execute",
1624         "name": "execute Contrail API remove network policy to destination network",
1625         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$dest-uuid`' />\n\n",
1626         "comments": "",
1627         "outputs": 1,
1628         "x": 1892.0041198730469,
1629         "y": 2082.004141807556,
1630         "z": "433d56b8.8f2a38",
1631         "wires": [
1632             [
1633                 "9240f23d.7f049"
1634             ]
1635         ]
1636     },
1637     {
1638         "id": "a38a02dd.b8f9d",
1639         "type": "execute",
1640         "name": "execute Contrail API remove network policy to source network",
1641         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$src-uuid`' />\n\n",
1642         "comments": "",
1643         "outputs": 1,
1644         "x": 1910.0042572021484,
1645         "y": 1811.004051208496,
1646         "z": "433d56b8.8f2a38",
1647         "wires": [
1648             [
1649                 "9240f23d.7f049"
1650             ]
1651         ]
1652     },
1653     {
1654         "id": "9240f23d.7f049",
1655         "type": "other",
1656         "name": "Other",
1657         "xml": "<outcome value='Other'>",
1658         "comments": "",
1659         "outputs": 1,
1660         "x": 2287.5040283203125,
1661         "y": 1856.0040197372437,
1662         "z": "433d56b8.8f2a38",
1663         "wires": [
1664             [
1665                 "93d636b9.8b55b8"
1666             ]
1667         ]
1668     },
1669     {
1670         "id": "93d636b9.8b55b8",
1671         "type": "block",
1672         "name": "block",
1673         "xml": "<block>\n",
1674         "atomic": "false",
1675         "comments": "",
1676         "outputs": 1,
1677         "x": 2421.6152839660645,
1678         "y": 1856.4484243392944,
1679         "z": "433d56b8.8f2a38",
1680         "wires": [
1681             []
1682         ]
1683     },
1684     {
1685         "id": "defcda34.247b28",
1686         "type": "set",
1687         "name": "set src-uuid",
1688         "xml": "<set>\n<parameter name='src-uuid' value='`$uuidresp.uuid`' />",
1689         "comments": "",
1690         "x": 510.0039939880371,
1691         "y": 1322.0040254592896,
1692         "z": "433d56b8.8f2a38",
1693         "wires": []
1694     },
1695     {
1696         "id": "7e31f809.4e76e8",
1697         "type": "set",
1698         "name": "set dest-uuid",
1699         "xml": "<set>\n<parameter name='dest-uuid' value='`$uuidresp.uuid`' />",
1700         "comments": "",
1701         "x": 510.00390625,
1702         "y": 1847.00390625,
1703         "z": "433d56b8.8f2a38",
1704         "wires": []
1705     },
1706     {
1707         "id": "c4498fac.a299f",
1708         "type": "comment",
1709         "name": "If we hit an error, attempt to clean up contrail",
1710         "info": "",
1711         "comments": "",
1712         "x": 1854.0041046142578,
1713         "y": 1772.004108428955,
1714         "z": "433d56b8.8f2a38",
1715         "wires": []
1716     },
1717     {
1718         "id": "e2d4bff5.4d172",
1719         "type": "block",
1720         "name": "block",
1721         "xml": "<block>\n",
1722         "atomic": "false",
1723         "comments": "",
1724         "outputs": 1,
1725         "x": 1157.2539596557617,
1726         "y": 1915.0039901733398,
1727         "z": "433d56b8.8f2a38",
1728         "wires": [
1729             [
1730                 "a38a02dd.b8f9d",
1731                 "56199f14.af432"
1732             ]
1733         ]
1734     },
1735     {
1736         "id": "e25e5b70.f65028",
1737         "type": "block",
1738         "name": "block",
1739         "xml": "<block>\n",
1740         "atomic": "false",
1741         "comments": "",
1742         "outputs": 1,
1743         "x": 1267.2539138793945,
1744         "y": 2206.0039615631104,
1745         "z": "433d56b8.8f2a38",
1746         "wires": [
1747             [
1748                 "ec62599e.16b9b8",
1749                 "a38a02dd.b8f9d",
1750                 "ad550ebe.97e4c"
1751             ]
1752         ]
1753     },
1754     {
1755         "id": "a1025836.ec58f8",
1756         "type": "block",
1757         "name": "block",
1758         "xml": "<block>\n",
1759         "atomic": "false",
1760         "comments": "",
1761         "outputs": 1,
1762         "x": 951.25390625,
1763         "y": 2306.00390625,
1764         "z": "433d56b8.8f2a38",
1765         "wires": [
1766             [
1767                 "81d4f66a.d1c928",
1768                 "a38a02dd.b8f9d",
1769                 "ad550ebe.97e4c"
1770             ]
1771         ]
1772     },
1773     {
1774         "id": "b34f6a16.4d5698",
1775         "type": "block",
1776         "name": "block",
1777         "xml": "<block>\n",
1778         "atomic": "false",
1779         "comments": "",
1780         "outputs": 1,
1781         "x": 992.25390625,
1782         "y": 2547.00390625,
1783         "z": "433d56b8.8f2a38",
1784         "wires": [
1785             [
1786                 "82666aa6.c56cb8",
1787                 "a38a02dd.b8f9d",
1788                 "ad550ebe.97e4c"
1789             ]
1790         ]
1791     }
1792 ]