DG's and Templates for A1 Adapter
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_createPolicyInstance.json
1 [
2     {
3         "id": "9236469b.e33218",
4         "type": "service-logic",
5         "name": "A1-ADAPTER-API ${project.version}",
6         "module": "A1-ADAPTER-API",
7         "version": "${project.version}",
8         "comments": "",
9         "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='A1-ADAPTER-API' version='${project.version}'>",
10         "outputs": 1,
11         "x": 173,
12         "y": 99,
13         "z": "778ff71f.21c948",
14         "wires": [
15             [
16                 "c9f1cc58.c62c7"
17             ]
18         ]
19     },
20     {
21         "id": "c9f1cc58.c62c7",
22         "type": "method",
23         "name": "method createPolicyInstance",
24         "xml": "<method rpc='createPolicyInstance' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 160,
28         "y": 168,
29         "z": "778ff71f.21c948",
30         "wires": [
31             [
32                 "4499058e.f4c35c"
33             ]
34         ]
35     },
36     {
37         "id": "42dffa26.a86494",
38         "type": "record",
39         "name": "record",
40         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"A1 Adapter Create Policy Instance. RPC Parms:\"/>\n<parameter name=\"field2\" value=\"`$create-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$create-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$create-policy-instance-input.policy-instance-id`\"/>\n<parameter name=\"field5\" value=\"A1 Adapter Create Policy Instance. Number of Policy Properties\"/>\n<parameter name=\"field6\" value=\"`$create-policy-instance-input.properties_length`\"/>\n",
41         "comments": "",
42         "outputs": 1,
43         "x": 482,
44         "y": 31,
45         "z": "778ff71f.21c948",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "4499058e.f4c35c",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 121,
59         "y": 305,
60         "z": "778ff71f.21c948",
61         "wires": [
62             [
63                 "42dffa26.a86494",
64                 "4f39d57e.ecab2c",
65                 "4e33f9e8.999d18",
66                 "73cdcbde.870b64",
67                 "db58a7cd.71bd78",
68                 "62562bdc.8b71e4",
69                 "4e5b3350.571f7c"
70             ]
71         ]
72     },
73     {
74         "id": "1f803634.6e151a",
75         "type": "returnSuccess",
76         "name": "return success",
77         "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<parameter name='response-code' value='200' />\n<parameter name='response-message' value='A1 Adapter is healthy'/>\n<parameter name='health-status' value='200'/>\n<parameter name='ack-final' value='Y'/>\n",
78         "comments": "",
79         "x": 231.99999618530273,
80         "y": 1232.0000381469727,
81         "z": "778ff71f.21c948",
82         "wires": []
83     },
84     {
85         "id": "b6def1db.d900e",
86         "type": "dgstart",
87         "name": "DGSTART",
88         "outputs": 1,
89         "x": 101,
90         "y": 37,
91         "z": "778ff71f.21c948",
92         "wires": [
93             [
94                 "9236469b.e33218"
95             ]
96         ]
97     },
98     {
99         "id": "4f39d57e.ecab2c",
100         "type": "for",
101         "name": "for 0..properties_length",
102         "xml": "<for index='idx' start='0' end='`$create-policy-instance-input.properties_length`' >",
103         "comments": "",
104         "outputs": 1,
105         "x": 535,
106         "y": 157,
107         "z": "778ff71f.21c948",
108         "wires": [
109             [
110                 "49ad936d.7f52ec"
111             ]
112         ]
113     },
114     {
115         "id": "49ad936d.7f52ec",
116         "type": "record",
117         "name": "record",
118         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"A1 Adapter Create Policy Instance. Properties Name and Value\"/>\n<parameter name=\"field2\" value=\"`$idx`\"/>\n<parameter name=\"field3\" value=\"`$create-policy-instance-input.properties[$idx].property-name`\"/>\n<parameter name=\"field4\" value=\"`$create-policy-instance-input.properties[$idx].property-value`\"/>\n",
119         "comments": "",
120         "outputs": 1,
121         "x": 744,
122         "y": 120,
123         "z": "778ff71f.21c948",
124         "wires": [
125             []
126         ]
127     },
128     {
129         "id": "2f3b7d7.b79a582",
130         "type": "execute",
131         "name": "execute TemplateNode",
132         "xml": "<execute plugin=\"org.onap.ccsdk.sli.plugins.template.TemplateNode\" method=\"evaluateTemplate\" >\n    <parameter name='templatePath' value='a1-policy-instance-property-payload-template.vtl' />\n    <parameter name='output' value='restapi-payload' />\n    <parameter name='prefix' value='a1-mediator' />\n",
133         "comments": "",
134         "outputs": 1,
135         "x": 1221.0000381469727,
136         "y": 148,
137         "z": "778ff71f.21c948",
138         "wires": [
139             [
140                 "c3edaac2.76c898",
141                 "a000a8ec.f02a08"
142             ]
143         ]
144     },
145     {
146         "id": "c3edaac2.76c898",
147         "type": "success",
148         "name": "success",
149         "xml": "<outcome value='success'>\n",
150         "comments": "",
151         "outputs": 1,
152         "x": 1546.0000381469727,
153         "y": 88,
154         "z": "778ff71f.21c948",
155         "wires": [
156             [
157                 "c4887e0b.677ec"
158             ]
159         ]
160     },
161     {
162         "id": "c4887e0b.677ec",
163         "type": "block",
164         "name": "block : atomic",
165         "xml": "<block atomic='true'>",
166         "atomic": "true",
167         "comments": "",
168         "outputs": 1,
169         "x": 1737.0000381469727,
170         "y": 86,
171         "z": "778ff71f.21c948",
172         "wires": [
173             [
174                 "59d852be.21338c"
175             ]
176         ]
177     },
178     {
179         "id": "59d852be.21338c",
180         "type": "record",
181         "name": "record",
182         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Redndred A1 Mediator RestAPI payload template as a string\"/>\n<parameter name='field3' value='`$a1-mediator.restapi-payload`' />",
183         "comments": "",
184         "outputs": 1,
185         "x": 1916.0000381469727,
186         "y": 86,
187         "z": "778ff71f.21c948",
188         "wires": [
189             []
190         ]
191     },
192     {
193         "id": "9b6aac0c.da315",
194         "type": "execute",
195         "name": "remove new lines",
196         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >\n    <parameter name=\"source\" value=\"`$a1-mediator.restapi-payload`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.a1-mediator-restapi.payload\"/>\n    <parameter name=\"target\" value=\"\\n\"/>\n    <parameter name=\"replacement\" value=\"\"/>\n",
197         "comments": "",
198         "outputs": 1,
199         "x": 1167.5000534057617,
200         "y": 356.00000619888306,
201         "z": "778ff71f.21c948",
202         "wires": [
203             [
204                 "1409ce40.d198e2",
205                 "fcccb2fe.5b568"
206             ]
207         ]
208     },
209     {
210         "id": "cfa3b21a.52b7f",
211         "type": "execute",
212         "name": "remove tabs",
213         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >\n    <parameter name=\"source\" value=\"`$tmp.a1-mediator-restapi.payload`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.a1-mediator-restapi.payload\"/>\n    <parameter name=\"target\" value=\"\\t\"/>\n    <parameter name=\"replacement\" value=\"\"/>",
214         "comments": "",
215         "outputs": 1,
216         "x": 1087.0000534057617,
217         "y": 540.9999980926514,
218         "z": "778ff71f.21c948",
219         "wires": [
220             [
221                 "9936f19c.6654c",
222                 "f7c3147.26a20e8"
223             ]
224         ]
225     },
226     {
227         "id": "9936f19c.6654c",
228         "type": "success",
229         "name": "success",
230         "xml": "<outcome value='success'>\n",
231         "comments": "",
232         "outputs": 1,
233         "x": 1258.5000534057617,
234         "y": 553.9999980926514,
235         "z": "778ff71f.21c948",
236         "wires": [
237             [
238                 "9a0a6599.a41078"
239             ]
240         ]
241     },
242     {
243         "id": "9a0a6599.a41078",
244         "type": "block",
245         "name": "block : atomic",
246         "xml": "<block atomic='true'>",
247         "atomic": "true",
248         "comments": "",
249         "outputs": 1,
250         "x": 1435.5000534057617,
251         "y": 558.9999980926514,
252         "z": "778ff71f.21c948",
253         "wires": [
254             [
255                 "91f17f26.09e3b"
256             ]
257         ]
258     },
259     {
260         "id": "91f17f26.09e3b",
261         "type": "record",
262         "name": "record",
263         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Redndred template with tabs removed \\r\"/>\n<parameter name='field3' value='`$tmp.a1-mediator-restapi.payload`' />\n",
264         "comments": "",
265         "outputs": 1,
266         "x": 1589.5000076293945,
267         "y": 544.0000076293945,
268         "z": "778ff71f.21c948",
269         "wires": [
270             []
271         ]
272     },
273     {
274         "id": "1409ce40.d198e2",
275         "type": "success",
276         "name": "success",
277         "xml": "<outcome value='success'>\n",
278         "comments": "",
279         "outputs": 1,
280         "x": 1324.0001602172852,
281         "y": 272.00000953674316,
282         "z": "778ff71f.21c948",
283         "wires": [
284             [
285                 "15aa0921.904b77"
286             ]
287         ]
288     },
289     {
290         "id": "15aa0921.904b77",
291         "type": "block",
292         "name": "block : atomic",
293         "xml": "<block atomic='true'>",
294         "atomic": "true",
295         "comments": "",
296         "outputs": 1,
297         "x": 1459.0003128051758,
298         "y": 342.0000419616699,
299         "z": "778ff71f.21c948",
300         "wires": [
301             [
302                 "c3e2df84.be4db"
303             ]
304         ]
305     },
306     {
307         "id": "c3e2df84.be4db",
308         "type": "record",
309         "name": "record",
310         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Redndred template with lines removed \\r\"/>\n<parameter name='field3' value='`$tmp.a1-mediator-restapi.payload`' />",
311         "comments": "",
312         "outputs": 1,
313         "x": 1531.0002517700195,
314         "y": 261.00000381469727,
315         "z": "778ff71f.21c948",
316         "wires": [
317             []
318         ]
319     },
320     {
321         "id": "a000a8ec.f02a08",
322         "type": "failure",
323         "name": "failure",
324         "xml": "<outcome value='failure'>\n",
325         "comments": "",
326         "outputs": 1,
327         "x": 1528.0000381469727,
328         "y": 190,
329         "z": "778ff71f.21c948",
330         "wires": [
331             [
332                 "1a33b2f4.89b4cd"
333             ]
334         ]
335     },
336     {
337         "id": "1a33b2f4.89b4cd",
338         "type": "block",
339         "name": "block",
340         "xml": "<block>\n",
341         "atomic": "false",
342         "comments": "",
343         "outputs": 1,
344         "x": 1706.9999160766602,
345         "y": 197,
346         "z": "778ff71f.21c948",
347         "wires": [
348             [
349                 "99d35048.265b3",
350                 "2fa6b57e.29105a",
351                 "5f556c15.ff9d34"
352             ]
353         ]
354     },
355     {
356         "id": "99d35048.265b3",
357         "type": "returnFailure",
358         "name": "return failure",
359         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error creating A1 Mediatory Rest API payload string. Aborting A1 Policy Instance creation\" />",
360         "comments": "",
361         "x": 1705.9996719360352,
362         "y": 292.00000762939453,
363         "z": "778ff71f.21c948",
364         "wires": []
365     },
366     {
367         "id": "fcccb2fe.5b568",
368         "type": "failure",
369         "name": "failure",
370         "xml": "<outcome value='failure'>\n",
371         "comments": "",
372         "outputs": 1,
373         "x": 1334.000129699707,
374         "y": 432.0000444948673,
375         "z": "778ff71f.21c948",
376         "wires": [
377             [
378                 "bde42de.77475d"
379             ]
380         ]
381     },
382     {
383         "id": "bde42de.77475d",
384         "type": "block",
385         "name": "block",
386         "xml": "<block>\n",
387         "atomic": "false",
388         "comments": "",
389         "outputs": 1,
390         "x": 1486.9999771118164,
391         "y": 408.00003719329834,
392         "z": "778ff71f.21c948",
393         "wires": [
394             [
395                 "a7b92aa1.af88e8",
396                 "47758778.282278",
397                 "5f556c15.ff9d34"
398             ]
399         ]
400     },
401     {
402         "id": "a7b92aa1.af88e8",
403         "type": "returnFailure",
404         "name": "return failure",
405         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error removing lines from A1 Mediator Rest API payload string. Aborting A1 Policy creation\" />",
406         "comments": "",
407         "x": 1527.9996719360352,
408         "y": 494.00003242492676,
409         "z": "778ff71f.21c948",
410         "wires": []
411     },
412     {
413         "id": "f7c3147.26a20e8",
414         "type": "failure",
415         "name": "failure",
416         "xml": "<outcome value='failure'>\n",
417         "comments": "",
418         "outputs": 1,
419         "x": 1263.0000534057617,
420         "y": 622.9999980926514,
421         "z": "778ff71f.21c948",
422         "wires": [
423             [
424                 "a84e0601.6e44f8"
425             ]
426         ]
427     },
428     {
429         "id": "a84e0601.6e44f8",
430         "type": "block",
431         "name": "block",
432         "xml": "<block>\n",
433         "atomic": "false",
434         "comments": "",
435         "outputs": 1,
436         "x": 1438.999885559082,
437         "y": 640.9999923706055,
438         "z": "778ff71f.21c948",
439         "wires": [
440             [
441                 "6ec35f94.73b36",
442                 "aefc7d8c.affb7",
443                 "5f556c15.ff9d34"
444             ]
445         ]
446     },
447     {
448         "id": "6ec35f94.73b36",
449         "type": "returnFailure",
450         "name": "return failure",
451         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error removing tabs from A1 Mediator Rest API payload string. Aborting A1 Policy creation\" />",
452         "comments": "",
453         "x": 1442.999641418457,
454         "y": 742.0000476837158,
455         "z": "778ff71f.21c948",
456         "wires": []
457     },
458     {
459         "id": "d303102b.4952b",
460         "type": "block",
461         "name": "A1 Mediator Payload Generation",
462         "xml": "<block atomic='true'>",
463         "atomic": "true",
464         "comments": "",
465         "outputs": 1,
466         "x": 897.0000152587891,
467         "y": 271.9999952316284,
468         "z": "778ff71f.21c948",
469         "wires": [
470             [
471                 "2f3b7d7.b79a582",
472                 "9b6aac0c.da315",
473                 "cfa3b21a.52b7f"
474             ]
475         ]
476     },
477     {
478         "id": "4e33f9e8.999d18",
479         "type": "execute",
480         "name": "execute Properties",
481         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
482         "comments": "",
483         "outputs": 1,
484         "x": 526,
485         "y": 110,
486         "z": "778ff71f.21c948",
487         "wires": [
488             []
489         ]
490     },
491     {
492         "id": "73cdcbde.870b64",
493         "type": "record",
494         "name": "record",
495         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Properties read .. A1 Mediator Target\"/>\n<parameter name=\"field2\" value=\"`$prop.oofpcipoc.patch.pci.target`\"/>\n<parameter name=\"field3\" value=\"`$prop.controller.user`\"/>\n<parameter name=\"field4\" value=\"`$prop.controller.pwd`\"/>\n<parameter name=\"field5\" value=\"`$prop.controller.url`\"/>\n<parameter name=\"field6\" value=\"A1 Mediator deployed (true/false): \"/>\n<parameter name=\"field7\" value=\"`$prop.ric-plt-A1Mediator-deployed`\"/>\n",
496         "comments": "",
497         "outputs": 1,
498         "x": 491,
499         "y": 203,
500         "z": "778ff71f.21c948",
501         "wires": [
502             []
503         ]
504     },
505     {
506         "id": "db58a7cd.71bd78",
507         "type": "switchNode",
508         "name": "A1 Mediator Deployed",
509         "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n",
510         "comments": "",
511         "outputs": 1,
512         "x": 359,
513         "y": 317,
514         "z": "778ff71f.21c948",
515         "wires": [
516             [
517                 "bab09024.90a",
518                 "2146fa82.3cb466"
519             ]
520         ]
521     },
522     {
523         "id": "bab09024.90a",
524         "type": "outcome",
525         "name": "Not Deployed",
526         "xml": "<outcome value='false'>\n",
527         "comments": "",
528         "outputs": 1,
529         "x": 286.99999809265137,
530         "y": 896.0001878738403,
531         "z": "778ff71f.21c948",
532         "wires": [
533             [
534                 "2177b708.4ad0a8"
535             ]
536         ]
537     },
538     {
539         "id": "2146fa82.3cb466",
540         "type": "outcome",
541         "name": "Deployed",
542         "xml": "<outcome value='true'>\n",
543         "comments": "",
544         "outputs": 1,
545         "x": 542,
546         "y": 253.00006103515625,
547         "z": "778ff71f.21c948",
548         "wires": [
549             [
550                 "627cb5ca.b4b61c"
551             ]
552         ]
553     },
554     {
555         "id": "627cb5ca.b4b61c",
556         "type": "block",
557         "name": "block : atomic",
558         "xml": "<block atomic='true'>",
559         "atomic": "true",
560         "comments": "",
561         "outputs": 1,
562         "x": 607,
563         "y": 327,
564         "z": "778ff71f.21c948",
565         "wires": [
566             [
567                 "d303102b.4952b",
568                 "7ef43213.fd1b9c"
569             ]
570         ]
571     },
572     {
573         "id": "a4ba83eb.986d9",
574         "type": "returnFailure",
575         "name": "return failure",
576         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"A1 Mediator Not Deployed. Aborting A1 Policy creation\" />",
577         "comments": "",
578         "x": 491.9997615814209,
579         "y": 1043.0000467300415,
580         "z": "778ff71f.21c948",
581         "wires": []
582     },
583     {
584         "id": "47269c5f.7a43c4",
585         "type": "failure",
586         "name": "failure",
587         "xml": "<outcome value='failure'>\n",
588         "comments": "",
589         "outputs": 1,
590         "x": 1026.0000915527344,
591         "y": 809.000039100647,
592         "z": "778ff71f.21c948",
593         "wires": [
594             [
595                 "ac7bcc09.16f6"
596             ]
597         ]
598     },
599     {
600         "id": "facedb43.cc1068",
601         "type": "success",
602         "name": "success",
603         "xml": "<outcome value='success'>\n",
604         "comments": "",
605         "outputs": 1,
606         "x": 1032.0002746582031,
607         "y": 894.0000238418579,
608         "z": "778ff71f.21c948",
609         "wires": [
610             [
611                 "149c17e5.9ed988"
612             ]
613         ]
614     },
615     {
616         "id": "149c17e5.9ed988",
617         "type": "block",
618         "name": "block",
619         "xml": "<block>\n",
620         "atomic": "false",
621         "comments": "",
622         "outputs": 1,
623         "x": 1174.9999084472656,
624         "y": 874.000039100647,
625         "z": "778ff71f.21c948",
626         "wires": [
627             [
628                 "b8e1ec8.114761"
629             ]
630         ]
631     },
632     {
633         "id": "ef7f2ae9.007da8",
634         "type": "set",
635         "name": "set tmp variables for input RPC parms",
636         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$create-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$create-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"tmp.policy-instance-id\" value=\"`$create-policy-instance-input.policy-instance-id`\"/>",
637         "comments": "",
638         "x": 824.0010070800781,
639         "y": 601.8891229629517,
640         "z": "778ff71f.21c948",
641         "wires": []
642     },
643     {
644         "id": "c27de345.6a706",
645         "type": "execute",
646         "name": "Create A1 Policy Instance",
647         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policy-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"PUT\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"requestBody\" value=\"`$tmp.a1-mediator-restapi.payload`\"/>\n<parameter name=\"convertResponse\" value=\"false\"/>\n",
648         "comments": "",
649         "outputs": 1,
650         "x": 810.0004577636719,
651         "y": 853.0103998184204,
652         "z": "778ff71f.21c948",
653         "wires": [
654             [
655                 "47269c5f.7a43c4",
656                 "facedb43.cc1068"
657             ]
658         ]
659     },
660     {
661         "id": "b537ed30.b52c6",
662         "type": "execute",
663         "name": "generate A1 Mediator URL 1",
664         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.policy`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.restapi.policy-url\"/>\n    <parameter name=\"target\" value=\"{policy_type_id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>",
665         "comments": "",
666         "outputs": 1,
667         "x": 805.0001525878906,
668         "y": 659.0105218887329,
669         "z": "778ff71f.21c948",
670         "wires": [
671             []
672         ]
673     },
674     {
675         "id": "7ef43213.fd1b9c",
676         "type": "block",
677         "name": "A1 Mediator RestAPI Invocation",
678         "xml": "<block atomic='true'>",
679         "atomic": "true",
680         "comments": "",
681         "outputs": 1,
682         "x": 498.00002670288086,
683         "y": 753.0000476837158,
684         "z": "778ff71f.21c948",
685         "wires": [
686             [
687                 "a3943e2e.44bd3",
688                 "ef7f2ae9.007da8",
689                 "b537ed30.b52c6",
690                 "cb947e00.e3f53",
691                 "c27de345.6a706"
692             ]
693         ]
694     },
695     {
696         "id": "cb947e00.e3f53",
697         "type": "execute",
698         "name": "generate A1 Mediator URL 2",
699         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.restapi.policy-url`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.restapi.policy-url\"/>\n    <parameter name=\"target\" value=\"{policy_instance_id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.policy-instance-id`\"/>",
700         "comments": "",
701         "outputs": 1,
702         "x": 819.0000305175781,
703         "y": 699.0000238418579,
704         "z": "778ff71f.21c948",
705         "wires": [
706             []
707         ]
708     },
709     {
710         "id": "a3943e2e.44bd3",
711         "type": "record",
712         "name": "record",
713         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Setting variables for A1 Adapter Create Policy Instance.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$tmp.policy-instance-id`\"/>\n<parameter name=\"field5\" value=\"`$tmp.restapi.policy-url`\"/>\n<parameter name=\"field6\" value=\"`$a1-mediator.restapi-payload`\"/>\n<parameter name=\"field7\" value=\"Temporary A1 Mediatory Payload\"/>\n<parameter name=\"field8\" value=\"`$tmp.a1-mediator-restapi.payload`\"/>",
714         "comments": "",
715         "outputs": 1,
716         "x": 763.0000305175781,
717         "y": 796.0000238418579,
718         "z": "778ff71f.21c948",
719         "wires": [
720             []
721         ]
722     },
723     {
724         "id": "b8e1ec8.114761",
725         "type": "record",
726         "name": "record",
727         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"A1 Policy Instance Accepted.\"/>",
728         "comments": "",
729         "outputs": 1,
730         "x": 1344.0000305175781,
731         "y": 875.000039100647,
732         "z": "778ff71f.21c948",
733         "wires": [
734             []
735         ]
736     },
737     {
738         "id": "ac7bcc09.16f6",
739         "type": "returnFailure",
740         "name": "return failure",
741         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"404\" />\n<parameter name=\"response-message\" value=\"Error creating A1 Policy Instance. Aborting A1 Policy creation\" />",
742         "comments": "",
743         "x": 1211.0000305175781,
744         "y": 796.0000238418579,
745         "z": "778ff71f.21c948",
746         "wires": []
747     },
748     {
749         "id": "703f6dc7.f6caf4",
750         "type": "set",
751         "name": "set A1Mediator payload manually",
752         "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>",
753         "comments": "",
754         "x": 841.0000305175781,
755         "y": 747.0000238418579,
756         "z": "778ff71f.21c948",
757         "wires": []
758     },
759     {
760         "id": "62562bdc.8b71e4",
761         "type": "set",
762         "name": "set default status value",
763         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Successful execution of createPolicyInstance RPC' />",
764         "comments": "",
765         "x": 537,
766         "y": 69,
767         "z": "778ff71f.21c948",
768         "wires": []
769     },
770     {
771         "id": "5f556c15.ff9d34",
772         "type": "block",
773         "name": "DMAAP Reponse Publish",
774         "xml": "<block atomic='true'>",
775         "atomic": "true",
776         "comments": "",
777         "outputs": 1,
778         "x": 2103.7540016174316,
779         "y": 1027.003918170929,
780         "z": "778ff71f.21c948",
781         "wires": [
782             [
783                 "ffd3de0b.e57d8",
784                 "a5746792.21f028",
785                 "426e2627.47e6e8"
786             ]
787         ]
788     },
789     {
790         "id": "a5746792.21f028",
791         "type": "execute",
792         "name": "execute DmaapMsg",
793         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' +  $prop.restapi.dmaap-publish-generic-response.template`\" />\n    <parameter name='restapiUrl' value=\"`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`\" />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='POST' />\n    <parameter name='contentType' value='application/json' />\n    <parameter name='responsePrefix' value='dmaap' />",
794         "comments": "",
795         "outputs": 1,
796         "x": 2405.7541694641113,
797         "y": 994.0032835006714,
798         "z": "778ff71f.21c948",
799         "wires": [
800             [
801                 "7cd8c84d.81e0a8",
802                 "5ffd4dba.8c3774"
803             ]
804         ]
805     },
806     {
807         "id": "ffd3de0b.e57d8",
808         "type": "set",
809         "name": "set",
810         "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyInstance'/>\n<parameter name='tmp.a1Adapter-dmaap-resp.status-code' value='`$response-code`'/>\n<parameter name='tmp.a1Adapter-dmaap-resp.status-value' value='`$response-message`'/>\n<parameter name='tmp.a1Policy-dmaap-resp.payload' value=\"None\" />",
811         "comments": "",
812         "x": 2386.4209175109863,
813         "y": 708.0038166046143,
814         "z": "778ff71f.21c948",
815         "wires": []
816     },
817     {
818         "id": "7cd8c84d.81e0a8",
819         "type": "failure",
820         "name": "failure",
821         "xml": "<outcome value='failure'>\n",
822         "comments": "",
823         "outputs": 1,
824         "x": 2640.2541122436523,
825         "y": 904.9206104278564,
826         "z": "778ff71f.21c948",
827         "wires": [
828             [
829                 "ab106710.c0d658"
830             ]
831         ]
832     },
833     {
834         "id": "5ffd4dba.8c3774",
835         "type": "success",
836         "name": "success",
837         "xml": "<outcome value='success'>\n",
838         "comments": "",
839         "outputs": 1,
840         "x": 2644.2540321350098,
841         "y": 1043.9204530715942,
842         "z": "778ff71f.21c948",
843         "wires": [
844             [
845                 "f35b2f30.6d906"
846             ]
847         ]
848     },
849     {
850         "id": "ab106710.c0d658",
851         "type": "block",
852         "name": "block",
853         "xml": "<block>\n",
854         "atomic": "false",
855         "comments": "",
856         "outputs": 1,
857         "x": 2800.2539463043213,
858         "y": 906.9206113815308,
859         "z": "778ff71f.21c948",
860         "wires": [
861             [
862                 "c07b0869.6c3628"
863             ]
864         ]
865     },
866     {
867         "id": "c07b0869.6c3628",
868         "type": "returnFailure",
869         "name": "return failure",
870         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error publishing DMAAP A1 Policy Response message. \" />",
871         "comments": "",
872         "x": 2986.2539825439453,
873         "y": 899.9208135604858,
874         "z": "778ff71f.21c948",
875         "wires": []
876     },
877     {
878         "id": "f35b2f30.6d906",
879         "type": "block",
880         "name": "block",
881         "xml": "<block>\n",
882         "atomic": "false",
883         "comments": "",
884         "outputs": 1,
885         "x": 2827.2536754608154,
886         "y": 1036.9205617904663,
887         "z": "778ff71f.21c948",
888         "wires": [
889             [
890                 "a2700b22.fdfb98"
891             ]
892         ]
893     },
894     {
895         "id": "a2700b22.fdfb98",
896         "type": "record",
897         "name": "record",
898         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"DMAAP A1Policy message Successfully Published \"/>",
899         "comments": "",
900         "outputs": 1,
901         "x": 3015.253875732422,
902         "y": 1025.92085647583,
903         "z": "778ff71f.21c948",
904         "wires": [
905             []
906         ]
907     },
908     {
909         "id": "426e2627.47e6e8",
910         "type": "record",
911         "name": "record",
912         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Before DMAAP Event - template file name, restapiURL\"/>\n<parameter name='field3' value=\"`$prop.restapi.templateDir + '/' +  $prop.restapi.dmaap-publish-generic-response.template`\" />\n<parameter name='field4' value=\"`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`\" />\n<parameter name='field5' value=\"Status Code and Status Value to be published\" />\n<parameter name='field6' value=\"`$tmp.a1Adapter-dmaap-resp.status-code`\" />\n<parameter name='field7' value=\"`$tmp.a1Adapter-dmaap-resp.status-value`\" />\n<parameter name='field8' value=\"A1 Adapter DMAAP Response Payload Not Required\" />\n<parameter name='field9' value=\"`$tmp.a1Policy-dmaap-resp.payload`\" />\n<parameter name='field10' value=\"RPC Name\" />\n<parameter name='field11' value=\"`$tmp.a1-adapter-api.rpc-name`\" />",
913         "comments": "",
914         "outputs": 1,
915         "x": 2413.2540168762207,
916         "y": 861.458818435669,
917         "z": "778ff71f.21c948",
918         "wires": [
919             []
920         ]
921     },
922     {
923         "id": "2177b708.4ad0a8",
924         "type": "block",
925         "name": "block",
926         "xml": "<block>\n",
927         "atomic": "false",
928         "comments": "",
929         "outputs": 1,
930         "x": 365.9999828338623,
931         "y": 972.0001077651978,
932         "z": "778ff71f.21c948",
933         "wires": [
934             [
935                 "a4ba83eb.986d9",
936                 "d3648067.22567",
937                 "5f556c15.ff9d34"
938             ]
939         ]
940     },
941     {
942         "id": "d3648067.22567",
943         "type": "set",
944         "name": "set",
945         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n",
946         "comments": "",
947         "x": 477.00389671325684,
948         "y": 834.5039262771606,
949         "z": "778ff71f.21c948",
950         "wires": []
951     },
952     {
953         "id": "2fa6b57e.29105a",
954         "type": "set",
955         "name": "set",
956         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Error creating A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation'/>",
957         "comments": "",
958         "x": 1899.0039443969727,
959         "y": 166.00390911102295,
960         "z": "778ff71f.21c948",
961         "wires": []
962     },
963     {
964         "id": "47758778.282278",
965         "type": "set",
966         "name": "set",
967         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name=\"response-message\" value=\"Error removing lines from A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation\" />",
968         "comments": "",
969         "x": 1668.5038223266602,
970         "y": 364.0039048194885,
971         "z": "778ff71f.21c948",
972         "wires": []
973     },
974     {
975         "id": "aefc7d8c.affb7",
976         "type": "set",
977         "name": "set",
978         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name=\"response-message\" value=\"Error removing tabs from A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation\" />",
979         "comments": "",
980         "x": 1613.5036697387695,
981         "y": 611.0039205551147,
982         "z": "778ff71f.21c948",
983         "wires": []
984     },
985     {
986         "id": "4e5b3350.571f7c",
987         "type": "block",
988         "name": "block",
989         "xml": "<block>\n",
990         "atomic": "false",
991         "comments": "",
992         "outputs": 1,
993         "x": 131.00390243530273,
994         "y": 1138.004020690918,
995         "z": "778ff71f.21c948",
996         "wires": [
997             [
998                 "1f803634.6e151a",
999                 "5f556c15.ff9d34"
1000             ]
1001         ]
1002     }
1003 ]