DG's and Templates for A1 Adapter
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_createPolicyType.json
1 [
2     {
3         "id": "da1c0256.907d3",
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": 175,
12         "y": 107,
13         "z": "33d2d73b.2b05a8",
14         "wires": [
15             [
16                 "c3842e54.d19ba"
17             ]
18         ]
19     },
20     {
21         "id": "c3842e54.d19ba",
22         "type": "method",
23         "name": "method createPolicyType",
24         "xml": "<method rpc='createPolicyType' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 162,
28         "y": 176,
29         "z": "33d2d73b.2b05a8",
30         "wires": [
31             [
32                 "829b6d78.3af18"
33             ]
34         ]
35     },
36     {
37         "id": "fac199c6.b8b0d8",
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 Type. RPC Parms:\"/>\n<parameter name=\"field2\" value=\"`$create-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$create-policy-type-input.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$create-policy-type-input.description`\"/>\n<parameter name=\"field5\" value=\"A1 Adapter Create Policy Type Name:\"/>\n<parameter name=\"field6\" value=\"`$create-policy-type-input.name`\"/>\n<parameter name=\"field7\" value=\"A1 Adapter Create Policy Type. Number of Policy Type Properties\"/>\n<parameter name=\"field8\" value=\"`$create-policy-type-input.properties_length`\"/>\n",
41         "comments": "",
42         "outputs": 1,
43         "x": 479,
44         "y": 32,
45         "z": "33d2d73b.2b05a8",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "829b6d78.3af18",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 123,
59         "y": 313,
60         "z": "33d2d73b.2b05a8",
61         "wires": [
62             [
63                 "fac199c6.b8b0d8",
64                 "5390a4d8.c9c1bc",
65                 "81f255bc.c262f8",
66                 "e07f2f41.f873d",
67                 "6562fc0a.7a0914",
68                 "113f146b.e7fc1c",
69                 "f777d20f.cea71"
70             ]
71         ]
72     },
73     {
74         "id": "c869b560.9e91f8",
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": 725.0000114440918,
80         "y": 1393.000054359436,
81         "z": "33d2d73b.2b05a8",
82         "wires": []
83     },
84     {
85         "id": "f7f7a77a.12bc98",
86         "type": "dgstart",
87         "name": "DGSTART",
88         "outputs": 1,
89         "x": 103,
90         "y": 45,
91         "z": "33d2d73b.2b05a8",
92         "wires": [
93             [
94                 "da1c0256.907d3"
95             ]
96         ]
97     },
98     {
99         "id": "5390a4d8.c9c1bc",
100         "type": "for",
101         "name": "for 0..properties_length",
102         "xml": "<for index='idx1' start='0' end='`$create-policy-type-input.properties_length`' >",
103         "comments": "",
104         "outputs": 1,
105         "x": 518,
106         "y": 178,
107         "z": "33d2d73b.2b05a8",
108         "wires": [
109             [
110                 "3fcd8058.1cbb1"
111             ]
112         ]
113     },
114     {
115         "id": "b35175f.9958988",
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 Type. Properties Number, Name and Number of Policy Statements\"/>\n<parameter name=\"field2\" value=\"`$idx1`\"/>\n<parameter name=\"field3\" value=\"`$create-policy-type-input.properties[$idx1].property-name`\"/>\n<parameter name=\"field4\" value=\"`$create-policy-type-input.properties[$idx1].policy-statements_length`\"/>\n",
119         "comments": "",
120         "outputs": 1,
121         "x": 890,
122         "y": 20,
123         "z": "33d2d73b.2b05a8",
124         "wires": [
125             []
126         ]
127     },
128     {
129         "id": "e4c6a778.e1aaa8",
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-type-create-schema-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": 1099,
136         "y": 92,
137         "z": "33d2d73b.2b05a8",
138         "wires": [
139             [
140                 "87f254d0.7b3408",
141                 "7ed6ebcf.0591e4"
142             ]
143         ]
144     },
145     {
146         "id": "87f254d0.7b3408",
147         "type": "success",
148         "name": "success",
149         "xml": "<outcome value='success'>\n",
150         "comments": "",
151         "outputs": 1,
152         "x": 1424,
153         "y": 32,
154         "z": "33d2d73b.2b05a8",
155         "wires": [
156             [
157                 "80e6a7c8.23e4f8"
158             ]
159         ]
160     },
161     {
162         "id": "80e6a7c8.23e4f8",
163         "type": "block",
164         "name": "block : atomic",
165         "xml": "<block atomic='true'>",
166         "atomic": "true",
167         "comments": "",
168         "outputs": 1,
169         "x": 1615,
170         "y": 30,
171         "z": "33d2d73b.2b05a8",
172         "wires": [
173             [
174                 "e8793dde.f3218"
175             ]
176         ]
177     },
178     {
179         "id": "e8793dde.f3218",
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": 1794,
186         "y": 30,
187         "z": "33d2d73b.2b05a8",
188         "wires": [
189             []
190         ]
191     },
192     {
193         "id": "4e0cfa4d.d89b44",
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": 1139.500114440918,
200         "y": 248.99999523162842,
201         "z": "33d2d73b.2b05a8",
202         "wires": [
203             [
204                 "dc9245c2.4db508",
205                 "2b40c422.72833c"
206             ]
207         ]
208     },
209     {
210         "id": "a8217c1d.01afc",
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": 970.0001373291016,
217         "y": 414.0000100135803,
218         "z": "33d2d73b.2b05a8",
219         "wires": [
220             [
221                 "7d2d3d36.846374",
222                 "a731343e.eb8138"
223             ]
224         ]
225     },
226     {
227         "id": "7d2d3d36.846374",
228         "type": "success",
229         "name": "success",
230         "xml": "<outcome value='success'>\n",
231         "comments": "",
232         "outputs": 1,
233         "x": 1138.5001602172852,
234         "y": 374.00002098083496,
235         "z": "33d2d73b.2b05a8",
236         "wires": [
237             [
238                 "dffd4016.02da"
239             ]
240         ]
241     },
242     {
243         "id": "dffd4016.02da",
244         "type": "block",
245         "name": "block : atomic",
246         "xml": "<block atomic='true'>",
247         "atomic": "true",
248         "comments": "",
249         "outputs": 1,
250         "x": 1301.500129699707,
251         "y": 370.0000219345093,
252         "z": "33d2d73b.2b05a8",
253         "wires": [
254             [
255                 "e27a3881.71afb8"
256             ]
257         ]
258     },
259     {
260         "id": "e27a3881.71afb8",
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": 1471.5001602172852,
267         "y": 364.00001335144043,
268         "z": "33d2d73b.2b05a8",
269         "wires": [
270             []
271         ]
272     },
273     {
274         "id": "dc9245c2.4db508",
275         "type": "success",
276         "name": "success",
277         "xml": "<outcome value='success'>\n",
278         "comments": "",
279         "outputs": 1,
280         "x": 1330.000129699707,
281         "y": 211.99999523162842,
282         "z": "33d2d73b.2b05a8",
283         "wires": [
284             [
285                 "c7f75df2.76888"
286             ]
287         ]
288     },
289     {
290         "id": "c7f75df2.76888",
291         "type": "block",
292         "name": "block : atomic",
293         "xml": "<block atomic='true'>",
294         "atomic": "true",
295         "comments": "",
296         "outputs": 1,
297         "x": 1489.000129699707,
298         "y": 213.00001049041748,
299         "z": "33d2d73b.2b05a8",
300         "wires": [
301             [
302                 "5e63ce8a.af52a"
303             ]
304         ]
305     },
306     {
307         "id": "5e63ce8a.af52a",
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": 1647.0001602172852,
314         "y": 210.0000023841858,
315         "z": "33d2d73b.2b05a8",
316         "wires": [
317             []
318         ]
319     },
320     {
321         "id": "7ed6ebcf.0591e4",
322         "type": "failure",
323         "name": "failure",
324         "xml": "<outcome value='failure'>\n",
325         "comments": "",
326         "outputs": 1,
327         "x": 1406,
328         "y": 134,
329         "z": "33d2d73b.2b05a8",
330         "wires": [
331             [
332                 "81458744.601ef8"
333             ]
334         ]
335     },
336     {
337         "id": "81458744.601ef8",
338         "type": "block",
339         "name": "block",
340         "xml": "<block>\n",
341         "atomic": "false",
342         "comments": "",
343         "outputs": 1,
344         "x": 1799.9999389648438,
345         "y": 120.99999904632568,
346         "z": "33d2d73b.2b05a8",
347         "wires": [
348             [
349                 "bacbbc8a.f6941",
350                 "995c6b22.95ff88",
351                 "dc754e34.18b86"
352             ]
353         ]
354     },
355     {
356         "id": "bacbbc8a.f6941",
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 Mediator Rest API payload string. Aborting A1 Policy Type creation'/>",
360         "comments": "",
361         "x": 1776.9998474121094,
362         "y": 175.0000057220459,
363         "z": "33d2d73b.2b05a8",
364         "wires": []
365     },
366     {
367         "id": "2b40c422.72833c",
368         "type": "failure",
369         "name": "failure",
370         "xml": "<outcome value='failure'>\n",
371         "comments": "",
372         "outputs": 1,
373         "x": 1337.000114440918,
374         "y": 297.9999952316284,
375         "z": "33d2d73b.2b05a8",
376         "wires": [
377             [
378                 "9a83fc16.7714e"
379             ]
380         ]
381     },
382     {
383         "id": "9a83fc16.7714e",
384         "type": "block",
385         "name": "block",
386         "xml": "<block>\n",
387         "atomic": "false",
388         "comments": "",
389         "outputs": 1,
390         "x": 1591.0000686645508,
391         "y": 289.99999475479126,
392         "z": "33d2d73b.2b05a8",
393         "wires": [
394             [
395                 "22fbcd27.4e5fd2",
396                 "548d546b.d9cedc",
397                 "dc754e34.18b86"
398             ]
399         ]
400     },
401     {
402         "id": "22fbcd27.4e5fd2",
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": 1628.9997940063477,
408         "y": 362.0000219345093,
409         "z": "33d2d73b.2b05a8",
410         "wires": []
411     },
412     {
413         "id": "a731343e.eb8138",
414         "type": "failure",
415         "name": "failure",
416         "xml": "<outcome value='failure'>\n",
417         "comments": "",
418         "outputs": 1,
419         "x": 1148.0001373291016,
420         "y": 464.99999952316284,
421         "z": "33d2d73b.2b05a8",
422         "wires": [
423             [
424                 "d4189ca3.d0364"
425             ]
426         ]
427     },
428     {
429         "id": "d4189ca3.d0364",
430         "type": "block",
431         "name": "block",
432         "xml": "<block>\n",
433         "atomic": "false",
434         "comments": "",
435         "outputs": 1,
436         "x": 1528.000129699707,
437         "y": 469.00002098083496,
438         "z": "33d2d73b.2b05a8",
439         "wires": [
440             [
441                 "9eb173db.93145",
442                 "32ec5dff.471c32",
443                 "dc754e34.18b86"
444             ]
445         ]
446     },
447     {
448         "id": "9eb173db.93145",
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": 1482.000099182129,
454         "y": 556.0000219345093,
455         "z": "33d2d73b.2b05a8",
456         "wires": []
457     },
458     {
459         "id": "c1612317.d0711",
460         "type": "block",
461         "name": "A1 Mediator Payload Generation",
462         "xml": "<block atomic='true'>",
463         "atomic": "true",
464         "comments": "",
465         "outputs": 1,
466         "x": 791,
467         "y": 197,
468         "z": "33d2d73b.2b05a8",
469         "wires": [
470             [
471                 "e4c6a778.e1aaa8",
472                 "4e0cfa4d.d89b44",
473                 "a8217c1d.01afc"
474             ]
475         ]
476     },
477     {
478         "id": "81f255bc.c262f8",
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": 516,
485         "y": 127,
486         "z": "33d2d73b.2b05a8",
487         "wires": [
488             []
489         ]
490     },
491     {
492         "id": "e07f2f41.f873d",
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": 493,
499         "y": 211,
500         "z": "33d2d73b.2b05a8",
501         "wires": [
502             []
503         ]
504     },
505     {
506         "id": "6562fc0a.7a0914",
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": 360,
513         "y": 322,
514         "z": "33d2d73b.2b05a8",
515         "wires": [
516             [
517                 "9c23b632.e02c18",
518                 "b1e5fe91.97aa5"
519             ]
520         ]
521     },
522     {
523         "id": "9c23b632.e02c18",
524         "type": "outcome",
525         "name": "Not Deployed",
526         "xml": "<outcome value='false'>\n",
527         "comments": "",
528         "outputs": 1,
529         "x": 576.0000076293945,
530         "y": 1002.0001735687256,
531         "z": "33d2d73b.2b05a8",
532         "wires": [
533             [
534                 "273be5b.9b1061a"
535             ]
536         ]
537     },
538     {
539         "id": "b1e5fe91.97aa5",
540         "type": "outcome",
541         "name": "Deployed",
542         "xml": "<outcome value='true'>\n",
543         "comments": "",
544         "outputs": 1,
545         "x": 543,
546         "y": 258.00006103515625,
547         "z": "33d2d73b.2b05a8",
548         "wires": [
549             [
550                 "9ed89566.9ebd78"
551             ]
552         ]
553     },
554     {
555         "id": "9ed89566.9ebd78",
556         "type": "block",
557         "name": "block : atomic",
558         "xml": "<block atomic='true'>",
559         "atomic": "true",
560         "comments": "",
561         "outputs": 1,
562         "x": 608,
563         "y": 334,
564         "z": "33d2d73b.2b05a8",
565         "wires": [
566             [
567                 "c1612317.d0711",
568                 "56d9853f.f02f6c"
569             ]
570         ]
571     },
572     {
573         "id": "273be5b.9b1061a",
574         "type": "block",
575         "name": "block",
576         "xml": "<block>\n",
577         "atomic": "false",
578         "comments": "",
579         "outputs": 1,
580         "x": 720.9999961853027,
581         "y": 1080.9999904632568,
582         "z": "33d2d73b.2b05a8",
583         "wires": [
584             [
585                 "735341e0.7cf62",
586                 "f00de33f.958a3",
587                 "dc754e34.18b86"
588             ]
589         ]
590     },
591     {
592         "id": "735341e0.7cf62",
593         "type": "returnFailure",
594         "name": "return failure",
595         "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\" />\n",
596         "comments": "",
597         "x": 756.9997673034668,
598         "y": 1214.000012397766,
599         "z": "33d2d73b.2b05a8",
600         "wires": []
601     },
602     {
603         "id": "822e4be6.9aeb88",
604         "type": "failure",
605         "name": "failure",
606         "xml": "<outcome value='failure'>\n",
607         "comments": "",
608         "outputs": 1,
609         "x": 1217.0000915527344,
610         "y": 742.0000071525574,
611         "z": "33d2d73b.2b05a8",
612         "wires": [
613             [
614                 "dcbc720c.e12ad"
615             ]
616         ]
617     },
618     {
619         "id": "cbddba75.75b3e8",
620         "type": "success",
621         "name": "success",
622         "xml": "<outcome value='success'>\n",
623         "comments": "",
624         "outputs": 1,
625         "x": 1223.0002746582031,
626         "y": 826.9999918937683,
627         "z": "33d2d73b.2b05a8",
628         "wires": [
629             [
630                 "5402f03c.8e47d"
631             ]
632         ]
633     },
634     {
635         "id": "5402f03c.8e47d",
636         "type": "block",
637         "name": "block",
638         "xml": "<block>\n",
639         "atomic": "false",
640         "comments": "",
641         "outputs": 1,
642         "x": 1367.9999084472656,
643         "y": 809.0000071525574,
644         "z": "33d2d73b.2b05a8",
645         "wires": [
646             [
647                 "bf840c18.42a18"
648             ]
649         ]
650     },
651     {
652         "id": "1ad8db0a.f4e495",
653         "type": "set",
654         "name": "set tmp variables for input RPC parms",
655         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$create-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$create-policy-type-input.policy-type-id`\"/>\n<parameter name=\"tmp.name\" value=\"`$create-policy-type-input.name`\"/>\n<parameter name=\"tmp.description\" value=\"`$create-policy-type-input.description`\"/>",
656         "comments": "",
657         "x": 1017.0010070800781,
658         "y": 539.8890910148621,
659         "z": "33d2d73b.2b05a8",
660         "wires": []
661     },
662     {
663         "id": "762f3a72.743d14",
664         "type": "execute",
665         "name": "Create A1 Policy Type",
666         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policytype-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",
667         "comments": "",
668         "outputs": 1,
669         "x": 1000.0004577636719,
670         "y": 785.0103678703308,
671         "z": "33d2d73b.2b05a8",
672         "wires": [
673             [
674                 "822e4be6.9aeb88",
675                 "cbddba75.75b3e8"
676             ]
677         ]
678     },
679     {
680         "id": "bf555fa7.85bc1",
681         "type": "execute",
682         "name": "generate A1 Mediator URL",
683         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.policytype`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.restapi.policytype-url\"/>\n    <parameter name=\"target\" value=\"{policy_type_id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>",
684         "comments": "",
685         "outputs": 1,
686         "x": 996.0001525878906,
687         "y": 596.0104899406433,
688         "z": "33d2d73b.2b05a8",
689         "wires": [
690             []
691         ]
692     },
693     {
694         "id": "56d9853f.f02f6c",
695         "type": "block",
696         "name": "A1 Mediator RestAPI Invocation",
697         "xml": "<block atomic='true'>",
698         "atomic": "true",
699         "comments": "",
700         "outputs": 1,
701         "x": 696.0000305175781,
702         "y": 622.9999918937683,
703         "z": "33d2d73b.2b05a8",
704         "wires": [
705             [
706                 "309907cb.88b8b8",
707                 "1ad8db0a.f4e495",
708                 "bf555fa7.85bc1",
709                 "762f3a72.743d14"
710             ]
711         ]
712     },
713     {
714         "id": "309907cb.88b8b8",
715         "type": "record",
716         "name": "record",
717         "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 Type.\"/>\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.name`\"/>\n<parameter name=\"field5\" value=\"`$tmp.restapi.policytype-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`\"/>",
718         "comments": "",
719         "outputs": 1,
720         "x": 972.0000305175781,
721         "y": 712.9999918937683,
722         "z": "33d2d73b.2b05a8",
723         "wires": [
724             []
725         ]
726     },
727     {
728         "id": "bf840c18.42a18",
729         "type": "record",
730         "name": "record",
731         "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 Type Accepted.\"/>",
732         "comments": "",
733         "outputs": 1,
734         "x": 1538.0000305175781,
735         "y": 810.9999918937683,
736         "z": "33d2d73b.2b05a8",
737         "wires": [
738             []
739         ]
740     },
741     {
742         "id": "1d14eb24.f639b5",
743         "type": "returnFailure",
744         "name": "return failure",
745         "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 Policy. Aborting A1 Policy Type creation\" />",
746         "comments": "",
747         "x": 1422.0001602172852,
748         "y": 740.0000019073486,
749         "z": "33d2d73b.2b05a8",
750         "wires": []
751     },
752     {
753         "id": "ed6f54ef.6ff228",
754         "type": "set",
755         "name": "set A1Mediator payload manually",
756         "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>",
757         "comments": "",
758         "x": 1019.0000305175781,
759         "y": 655.9999918937683,
760         "z": "33d2d73b.2b05a8",
761         "wires": []
762     },
763     {
764         "id": "3fcd8058.1cbb1",
765         "type": "block",
766         "name": "block : atomic",
767         "xml": "<block atomic='true'>",
768         "atomic": "true",
769         "comments": "",
770         "outputs": 1,
771         "x": 714,
772         "y": 24,
773         "z": "33d2d73b.2b05a8",
774         "wires": [
775             [
776                 "b35175f.9958988",
777                 "cf4806a1.1d1598"
778             ]
779         ]
780     },
781     {
782         "id": "cf4806a1.1d1598",
783         "type": "for",
784         "name": "for 0..policy-statements_length",
785         "xml": "<for index='idx2' start='0' end='`$create-policy-type-input.properties[$idx1].policy-statements_length`' >",
786         "comments": "",
787         "outputs": 1,
788         "x": 803,
789         "y": 110,
790         "z": "33d2d73b.2b05a8",
791         "wires": [
792             [
793                 "4675b56e.9a221c"
794             ]
795         ]
796     },
797     {
798         "id": "4675b56e.9a221c",
799         "type": "record",
800         "name": "record",
801         "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 Type. Policy Statements for policy statement # \"/>\n<parameter name=\"field2\" value=\"`$idx2`\"/>\n<parameter name=\"field3\" value=\"`$create-policy-type-input.properties[$idx1].policy-statements[$idx2].policy-statement`\"/>\n<parameter name=\"field4\" value=\"`$create-policy-type-input.properties[$idx1].policy-statements[$idx2].policy-statement-value`\"/>",
802         "comments": "",
803         "outputs": 1,
804         "x": 1020,
805         "y": 38,
806         "z": "33d2d73b.2b05a8",
807         "wires": [
808             []
809         ]
810     },
811     {
812         "id": "113f146b.e7fc1c",
813         "type": "set",
814         "name": "set default status value",
815         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Successful execution of createPolicyType RPC' />",
816         "comments": "",
817         "x": 518,
818         "y": 81,
819         "z": "33d2d73b.2b05a8",
820         "wires": []
821     },
822     {
823         "id": "dc754e34.18b86",
824         "type": "block",
825         "name": "DMAAP Reponse Publish",
826         "xml": "<block atomic='true'>",
827         "atomic": "true",
828         "comments": "",
829         "outputs": 1,
830         "x": 2218.5039672851562,
831         "y": 818.004011631012,
832         "z": "33d2d73b.2b05a8",
833         "wires": [
834             [
835                 "5784d302.e1710c",
836                 "aed8c8e.3c55c38",
837                 "98b8cae1.792f68"
838             ]
839         ]
840     },
841     {
842         "id": "aed8c8e.3c55c38",
843         "type": "execute",
844         "name": "execute DmaapMsg",
845         "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' />",
846         "comments": "",
847         "outputs": 1,
848         "x": 2490.504165649414,
849         "y": 960.0033769607544,
850         "z": "33d2d73b.2b05a8",
851         "wires": [
852             [
853                 "93cfbb9d.b9c5a8",
854                 "d2616a2c.825ff8"
855             ]
856         ]
857     },
858     {
859         "id": "5784d302.e1710c",
860         "type": "set",
861         "name": "set",
862         "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyType'/>\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\" />",
863         "comments": "",
864         "x": 2471.170913696289,
865         "y": 674.0039100646973,
866         "z": "33d2d73b.2b05a8",
867         "wires": []
868     },
869     {
870         "id": "93cfbb9d.b9c5a8",
871         "type": "failure",
872         "name": "failure",
873         "xml": "<outcome value='failure'>\n",
874         "comments": "",
875         "outputs": 1,
876         "x": 2725.004108428955,
877         "y": 870.9207038879395,
878         "z": "33d2d73b.2b05a8",
879         "wires": [
880             [
881                 "15bde2a9.106a0d"
882             ]
883         ]
884     },
885     {
886         "id": "d2616a2c.825ff8",
887         "type": "success",
888         "name": "success",
889         "xml": "<outcome value='success'>\n",
890         "comments": "",
891         "outputs": 1,
892         "x": 2729.0040283203125,
893         "y": 1009.9205465316772,
894         "z": "33d2d73b.2b05a8",
895         "wires": [
896             [
897                 "801c250c.9459d8"
898             ]
899         ]
900     },
901     {
902         "id": "15bde2a9.106a0d",
903         "type": "block",
904         "name": "block",
905         "xml": "<block>\n",
906         "atomic": "false",
907         "comments": "",
908         "outputs": 1,
909         "x": 2885.003942489624,
910         "y": 872.9207048416138,
911         "z": "33d2d73b.2b05a8",
912         "wires": [
913             [
914                 "13abffa9.da7d8"
915             ]
916         ]
917     },
918     {
919         "id": "13abffa9.da7d8",
920         "type": "returnFailure",
921         "name": "return failure",
922         "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. \" />",
923         "comments": "",
924         "x": 3067.003673553467,
925         "y": 863.9207806587219,
926         "z": "33d2d73b.2b05a8",
927         "wires": []
928     },
929     {
930         "id": "801c250c.9459d8",
931         "type": "block",
932         "name": "block",
933         "xml": "<block>\n",
934         "atomic": "false",
935         "comments": "",
936         "outputs": 1,
937         "x": 2912.003671646118,
938         "y": 1002.9206552505493,
939         "z": "33d2d73b.2b05a8",
940         "wires": [
941             [
942                 "682c6ff7.cfcce"
943             ]
944         ]
945     },
946     {
947         "id": "682c6ff7.cfcce",
948         "type": "record",
949         "name": "record",
950         "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 \"/>",
951         "comments": "",
952         "outputs": 1,
953         "x": 3100.0038719177246,
954         "y": 991.9209499359131,
955         "z": "33d2d73b.2b05a8",
956         "wires": [
957             []
958         ]
959     },
960     {
961         "id": "98b8cae1.792f68",
962         "type": "record",
963         "name": "record",
964         "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`\" />",
965         "comments": "",
966         "outputs": 1,
967         "x": 2498.0040130615234,
968         "y": 827.458911895752,
969         "z": "33d2d73b.2b05a8",
970         "wires": [
971             []
972         ]
973     },
974     {
975         "id": "f777d20f.cea71",
976         "type": "block",
977         "name": "block",
978         "xml": "<block>\n",
979         "atomic": "false",
980         "comments": "",
981         "outputs": 1,
982         "x": 602.0039024353027,
983         "y": 1318.753975868225,
984         "z": "33d2d73b.2b05a8",
985         "wires": [
986             [
987                 "c869b560.9e91f8",
988                 "dc754e34.18b86"
989             ]
990         ]
991     },
992     {
993         "id": "f00de33f.958a3",
994         "type": "set",
995         "name": "set",
996         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n",
997         "comments": "",
998         "x": 813.00390625,
999         "y": 948.7540035247803,
1000         "z": "33d2d73b.2b05a8",
1001         "wires": []
1002     },
1003     {
1004         "id": "995c6b22.95ff88",
1005         "type": "set",
1006         "name": "set",
1007         "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 Type creation'/>",
1008         "comments": "",
1009         "x": 1981.7541809082031,
1010         "y": 51.00389862060547,
1011         "z": "33d2d73b.2b05a8",
1012         "wires": []
1013     },
1014     {
1015         "id": "548d546b.d9cedc",
1016         "type": "set",
1017         "name": "set",
1018         "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 creation\" />",
1019         "comments": "",
1020         "x": 1766.25390625,
1021         "y": 264.00390625,
1022         "z": "33d2d73b.2b05a8",
1023         "wires": []
1024     },
1025     {
1026         "id": "32ec5dff.471c32",
1027         "type": "set",
1028         "name": "set",
1029         "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 creation\" />",
1030         "comments": "",
1031         "x": 1675.25390625,
1032         "y": 430.00390625,
1033         "z": "33d2d73b.2b05a8",
1034         "wires": []
1035     },
1036     {
1037         "id": "e80eb11c.f708b",
1038         "type": "set",
1039         "name": "set",
1040         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name=\"response-message\" value=\"Error creating A1 Policy Policy. Aborting A1 Policy Type creation\" />",
1041         "comments": "",
1042         "x": 1644.2539749145508,
1043         "y": 600.7539310455322,
1044         "z": "33d2d73b.2b05a8",
1045         "wires": []
1046     },
1047     {
1048         "id": "dcbc720c.e12ad",
1049         "type": "block",
1050         "name": "block",
1051         "xml": "<block>\n",
1052         "atomic": "false",
1053         "comments": "",
1054         "outputs": 1,
1055         "x": 1358.25390625,
1056         "y": 670.75390625,
1057         "z": "33d2d73b.2b05a8",
1058         "wires": [
1059             [
1060                 "1d14eb24.f639b5",
1061                 "e80eb11c.f708b",
1062                 "dc754e34.18b86"
1063             ]
1064         ]
1065     }
1066 ]

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use