diff options
author | Sandeep Shah <sandeeplinux1068@gmail.com> | 2019-12-20 15:07:46 -0600 |
---|---|---|
committer | Sandeep Shah <sandeeplinux1068@gmail.com> | 2019-12-20 15:07:46 -0600 |
commit | 8dd16669775bf23c35c25b6adf2f5adccdda1730 (patch) | |
tree | ba01f54c84d6cd529b23e856cc730cab4987a018 /platform-logic/a1Adapter-api/src/main/json | |
parent | fc4bb348c8a8b4a5d5f77065b8ebbca16d6ce5b8 (diff) |
DG's and Templates for A1 Adapter
Included are 10 DG's, any pertinent templates, and updated properties
file
Issue-ID: CCSDK-2013
Signed-off-by: SandeepLinux <Sandeep.Shah@ibm.com>
Change-Id: Ia2edfb3d1be5043101487289fa15e71d953ddf1c
Diffstat (limited to 'platform-logic/a1Adapter-api/src/main/json')
10 files changed, 6866 insertions, 29 deletions
diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyInstance.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyInstance.json new file mode 100644 index 00000000..2c7c272d --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyInstance.json @@ -0,0 +1,1003 @@ +[ + { + "id": "9236469b.e33218", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 173, + "y": 99, + "z": "778ff71f.21c948", + "wires": [ + [ + "c9f1cc58.c62c7" + ] + ] + }, + { + "id": "c9f1cc58.c62c7", + "type": "method", + "name": "method createPolicyInstance", + "xml": "<method rpc='createPolicyInstance' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 160, + "y": 168, + "z": "778ff71f.21c948", + "wires": [ + [ + "4499058e.f4c35c" + ] + ] + }, + { + "id": "42dffa26.a86494", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 482, + "y": 31, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "4499058e.f4c35c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 121, + "y": 305, + "z": "778ff71f.21c948", + "wires": [ + [ + "42dffa26.a86494", + "4f39d57e.ecab2c", + "4e33f9e8.999d18", + "73cdcbde.870b64", + "db58a7cd.71bd78", + "62562bdc.8b71e4", + "4e5b3350.571f7c" + ] + ] + }, + { + "id": "1f803634.6e151a", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 231.99999618530273, + "y": 1232.0000381469727, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "b6def1db.d900e", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 101, + "y": 37, + "z": "778ff71f.21c948", + "wires": [ + [ + "9236469b.e33218" + ] + ] + }, + { + "id": "4f39d57e.ecab2c", + "type": "for", + "name": "for 0..properties_length", + "xml": "<for index='idx' start='0' end='`$create-policy-instance-input.properties_length`' >", + "comments": "", + "outputs": 1, + "x": 535, + "y": 157, + "z": "778ff71f.21c948", + "wires": [ + [ + "49ad936d.7f52ec" + ] + ] + }, + { + "id": "49ad936d.7f52ec", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 744, + "y": 120, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "2f3b7d7.b79a582", + "type": "execute", + "name": "execute TemplateNode", + "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", + "comments": "", + "outputs": 1, + "x": 1221.0000381469727, + "y": 148, + "z": "778ff71f.21c948", + "wires": [ + [ + "c3edaac2.76c898", + "a000a8ec.f02a08" + ] + ] + }, + { + "id": "c3edaac2.76c898", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1546.0000381469727, + "y": 88, + "z": "778ff71f.21c948", + "wires": [ + [ + "c4887e0b.677ec" + ] + ] + }, + { + "id": "c4887e0b.677ec", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1737.0000381469727, + "y": 86, + "z": "778ff71f.21c948", + "wires": [ + [ + "59d852be.21338c" + ] + ] + }, + { + "id": "59d852be.21338c", + "type": "record", + "name": "record", + "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`' />", + "comments": "", + "outputs": 1, + "x": 1916.0000381469727, + "y": 86, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "9b6aac0c.da315", + "type": "execute", + "name": "remove new lines", + "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", + "comments": "", + "outputs": 1, + "x": 1167.5000534057617, + "y": 356.00000619888306, + "z": "778ff71f.21c948", + "wires": [ + [ + "1409ce40.d198e2", + "fcccb2fe.5b568" + ] + ] + }, + { + "id": "cfa3b21a.52b7f", + "type": "execute", + "name": "remove tabs", + "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=\"\"/>", + "comments": "", + "outputs": 1, + "x": 1087.0000534057617, + "y": 540.9999980926514, + "z": "778ff71f.21c948", + "wires": [ + [ + "9936f19c.6654c", + "f7c3147.26a20e8" + ] + ] + }, + { + "id": "9936f19c.6654c", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1258.5000534057617, + "y": 553.9999980926514, + "z": "778ff71f.21c948", + "wires": [ + [ + "9a0a6599.a41078" + ] + ] + }, + { + "id": "9a0a6599.a41078", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1435.5000534057617, + "y": 558.9999980926514, + "z": "778ff71f.21c948", + "wires": [ + [ + "91f17f26.09e3b" + ] + ] + }, + { + "id": "91f17f26.09e3b", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 1589.5000076293945, + "y": 544.0000076293945, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "1409ce40.d198e2", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1324.0001602172852, + "y": 272.00000953674316, + "z": "778ff71f.21c948", + "wires": [ + [ + "15aa0921.904b77" + ] + ] + }, + { + "id": "15aa0921.904b77", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1459.0003128051758, + "y": 342.0000419616699, + "z": "778ff71f.21c948", + "wires": [ + [ + "c3e2df84.be4db" + ] + ] + }, + { + "id": "c3e2df84.be4db", + "type": "record", + "name": "record", + "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`' />", + "comments": "", + "outputs": 1, + "x": 1531.0002517700195, + "y": 261.00000381469727, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "a000a8ec.f02a08", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1528.0000381469727, + "y": 190, + "z": "778ff71f.21c948", + "wires": [ + [ + "1a33b2f4.89b4cd" + ] + ] + }, + { + "id": "1a33b2f4.89b4cd", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1706.9999160766602, + "y": 197, + "z": "778ff71f.21c948", + "wires": [ + [ + "99d35048.265b3", + "2fa6b57e.29105a", + "5f556c15.ff9d34" + ] + ] + }, + { + "id": "99d35048.265b3", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1705.9996719360352, + "y": 292.00000762939453, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "fcccb2fe.5b568", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1334.000129699707, + "y": 432.0000444948673, + "z": "778ff71f.21c948", + "wires": [ + [ + "bde42de.77475d" + ] + ] + }, + { + "id": "bde42de.77475d", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1486.9999771118164, + "y": 408.00003719329834, + "z": "778ff71f.21c948", + "wires": [ + [ + "a7b92aa1.af88e8", + "47758778.282278", + "5f556c15.ff9d34" + ] + ] + }, + { + "id": "a7b92aa1.af88e8", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1527.9996719360352, + "y": 494.00003242492676, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "f7c3147.26a20e8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1263.0000534057617, + "y": 622.9999980926514, + "z": "778ff71f.21c948", + "wires": [ + [ + "a84e0601.6e44f8" + ] + ] + }, + { + "id": "a84e0601.6e44f8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1438.999885559082, + "y": 640.9999923706055, + "z": "778ff71f.21c948", + "wires": [ + [ + "6ec35f94.73b36", + "aefc7d8c.affb7", + "5f556c15.ff9d34" + ] + ] + }, + { + "id": "6ec35f94.73b36", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1442.999641418457, + "y": 742.0000476837158, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "d303102b.4952b", + "type": "block", + "name": "A1 Mediator Payload Generation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 897.0000152587891, + "y": 271.9999952316284, + "z": "778ff71f.21c948", + "wires": [ + [ + "2f3b7d7.b79a582", + "9b6aac0c.da315", + "cfa3b21a.52b7f" + ] + ] + }, + { + "id": "4e33f9e8.999d18", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 526, + "y": 110, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "73cdcbde.870b64", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 491, + "y": 203, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "db58a7cd.71bd78", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 359, + "y": 317, + "z": "778ff71f.21c948", + "wires": [ + [ + "bab09024.90a", + "2146fa82.3cb466" + ] + ] + }, + { + "id": "bab09024.90a", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 286.99999809265137, + "y": 896.0001878738403, + "z": "778ff71f.21c948", + "wires": [ + [ + "2177b708.4ad0a8" + ] + ] + }, + { + "id": "2146fa82.3cb466", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 542, + "y": 253.00006103515625, + "z": "778ff71f.21c948", + "wires": [ + [ + "627cb5ca.b4b61c" + ] + ] + }, + { + "id": "627cb5ca.b4b61c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 607, + "y": 327, + "z": "778ff71f.21c948", + "wires": [ + [ + "d303102b.4952b", + "7ef43213.fd1b9c" + ] + ] + }, + { + "id": "a4ba83eb.986d9", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 491.9997615814209, + "y": 1043.0000467300415, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "47269c5f.7a43c4", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1026.0000915527344, + "y": 809.000039100647, + "z": "778ff71f.21c948", + "wires": [ + [ + "ac7bcc09.16f6" + ] + ] + }, + { + "id": "facedb43.cc1068", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1032.0002746582031, + "y": 894.0000238418579, + "z": "778ff71f.21c948", + "wires": [ + [ + "149c17e5.9ed988" + ] + ] + }, + { + "id": "149c17e5.9ed988", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1174.9999084472656, + "y": 874.000039100647, + "z": "778ff71f.21c948", + "wires": [ + [ + "b8e1ec8.114761" + ] + ] + }, + { + "id": "ef7f2ae9.007da8", + "type": "set", + "name": "set tmp variables for input RPC parms", + "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`\"/>", + "comments": "", + "x": 824.0010070800781, + "y": 601.8891229629517, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "c27de345.6a706", + "type": "execute", + "name": "Create A1 Policy Instance", + "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", + "comments": "", + "outputs": 1, + "x": 810.0004577636719, + "y": 853.0103998184204, + "z": "778ff71f.21c948", + "wires": [ + [ + "47269c5f.7a43c4", + "facedb43.cc1068" + ] + ] + }, + { + "id": "b537ed30.b52c6", + "type": "execute", + "name": "generate A1 Mediator URL 1", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 805.0001525878906, + "y": 659.0105218887329, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "7ef43213.fd1b9c", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 498.00002670288086, + "y": 753.0000476837158, + "z": "778ff71f.21c948", + "wires": [ + [ + "a3943e2e.44bd3", + "ef7f2ae9.007da8", + "b537ed30.b52c6", + "cb947e00.e3f53", + "c27de345.6a706" + ] + ] + }, + { + "id": "cb947e00.e3f53", + "type": "execute", + "name": "generate A1 Mediator URL 2", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 819.0000305175781, + "y": 699.0000238418579, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "a3943e2e.44bd3", + "type": "record", + "name": "record", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 763.0000305175781, + "y": 796.0000238418579, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "b8e1ec8.114761", + "type": "record", + "name": "record", + "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.\"/>", + "comments": "", + "outputs": 1, + "x": 1344.0000305175781, + "y": 875.000039100647, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "ac7bcc09.16f6", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1211.0000305175781, + "y": 796.0000238418579, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "703f6dc7.f6caf4", + "type": "set", + "name": "set A1Mediator payload manually", + "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>", + "comments": "", + "x": 841.0000305175781, + "y": 747.0000238418579, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "62562bdc.8b71e4", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Successful execution of createPolicyInstance RPC' />", + "comments": "", + "x": 537, + "y": 69, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "5f556c15.ff9d34", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 2103.7540016174316, + "y": 1027.003918170929, + "z": "778ff71f.21c948", + "wires": [ + [ + "ffd3de0b.e57d8", + "a5746792.21f028", + "426e2627.47e6e8" + ] + ] + }, + { + "id": "a5746792.21f028", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2405.7541694641113, + "y": 994.0032835006714, + "z": "778ff71f.21c948", + "wires": [ + [ + "7cd8c84d.81e0a8", + "5ffd4dba.8c3774" + ] + ] + }, + { + "id": "ffd3de0b.e57d8", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 2386.4209175109863, + "y": 708.0038166046143, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "7cd8c84d.81e0a8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2640.2541122436523, + "y": 904.9206104278564, + "z": "778ff71f.21c948", + "wires": [ + [ + "ab106710.c0d658" + ] + ] + }, + { + "id": "5ffd4dba.8c3774", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2644.2540321350098, + "y": 1043.9204530715942, + "z": "778ff71f.21c948", + "wires": [ + [ + "f35b2f30.6d906" + ] + ] + }, + { + "id": "ab106710.c0d658", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2800.2539463043213, + "y": 906.9206113815308, + "z": "778ff71f.21c948", + "wires": [ + [ + "c07b0869.6c3628" + ] + ] + }, + { + "id": "c07b0869.6c3628", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2986.2539825439453, + "y": 899.9208135604858, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "f35b2f30.6d906", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2827.2536754608154, + "y": 1036.9205617904663, + "z": "778ff71f.21c948", + "wires": [ + [ + "a2700b22.fdfb98" + ] + ] + }, + { + "id": "a2700b22.fdfb98", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 3015.253875732422, + "y": 1025.92085647583, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "426e2627.47e6e8", + "type": "record", + "name": "record", + "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`\" />", + "comments": "", + "outputs": 1, + "x": 2413.2540168762207, + "y": 861.458818435669, + "z": "778ff71f.21c948", + "wires": [ + [] + ] + }, + { + "id": "2177b708.4ad0a8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 365.9999828338623, + "y": 972.0001077651978, + "z": "778ff71f.21c948", + "wires": [ + [ + "a4ba83eb.986d9", + "d3648067.22567", + "5f556c15.ff9d34" + ] + ] + }, + { + "id": "d3648067.22567", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 477.00389671325684, + "y": 834.5039262771606, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "2fa6b57e.29105a", + "type": "set", + "name": "set", + "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'/>", + "comments": "", + "x": 1899.0039443969727, + "y": 166.00390911102295, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "47758778.282278", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 1668.5038223266602, + "y": 364.0039048194885, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "aefc7d8c.affb7", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 1613.5036697387695, + "y": 611.0039205551147, + "z": "778ff71f.21c948", + "wires": [] + }, + { + "id": "4e5b3350.571f7c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 131.00390243530273, + "y": 1138.004020690918, + "z": "778ff71f.21c948", + "wires": [ + [ + "1f803634.6e151a", + "5f556c15.ff9d34" + ] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyType.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyType.json new file mode 100644 index 00000000..f604546f --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_createPolicyType.json @@ -0,0 +1,1066 @@ +[ + { + "id": "da1c0256.907d3", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 175, + "y": 107, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "c3842e54.d19ba" + ] + ] + }, + { + "id": "c3842e54.d19ba", + "type": "method", + "name": "method createPolicyType", + "xml": "<method rpc='createPolicyType' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 162, + "y": 176, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "829b6d78.3af18" + ] + ] + }, + { + "id": "fac199c6.b8b0d8", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 479, + "y": 32, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "829b6d78.3af18", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 123, + "y": 313, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "fac199c6.b8b0d8", + "5390a4d8.c9c1bc", + "81f255bc.c262f8", + "e07f2f41.f873d", + "6562fc0a.7a0914", + "113f146b.e7fc1c", + "f777d20f.cea71" + ] + ] + }, + { + "id": "c869b560.9e91f8", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 725.0000114440918, + "y": 1393.000054359436, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "f7f7a77a.12bc98", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 103, + "y": 45, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "da1c0256.907d3" + ] + ] + }, + { + "id": "5390a4d8.c9c1bc", + "type": "for", + "name": "for 0..properties_length", + "xml": "<for index='idx1' start='0' end='`$create-policy-type-input.properties_length`' >", + "comments": "", + "outputs": 1, + "x": 518, + "y": 178, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "3fcd8058.1cbb1" + ] + ] + }, + { + "id": "b35175f.9958988", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 890, + "y": 20, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "e4c6a778.e1aaa8", + "type": "execute", + "name": "execute TemplateNode", + "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", + "comments": "", + "outputs": 1, + "x": 1099, + "y": 92, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "87f254d0.7b3408", + "7ed6ebcf.0591e4" + ] + ] + }, + { + "id": "87f254d0.7b3408", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1424, + "y": 32, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "80e6a7c8.23e4f8" + ] + ] + }, + { + "id": "80e6a7c8.23e4f8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1615, + "y": 30, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "e8793dde.f3218" + ] + ] + }, + { + "id": "e8793dde.f3218", + "type": "record", + "name": "record", + "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`' />", + "comments": "", + "outputs": 1, + "x": 1794, + "y": 30, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "4e0cfa4d.d89b44", + "type": "execute", + "name": "remove new lines", + "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", + "comments": "", + "outputs": 1, + "x": 1139.500114440918, + "y": 248.99999523162842, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "dc9245c2.4db508", + "2b40c422.72833c" + ] + ] + }, + { + "id": "a8217c1d.01afc", + "type": "execute", + "name": "remove tabs", + "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=\"\"/>", + "comments": "", + "outputs": 1, + "x": 970.0001373291016, + "y": 414.0000100135803, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "7d2d3d36.846374", + "a731343e.eb8138" + ] + ] + }, + { + "id": "7d2d3d36.846374", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1138.5001602172852, + "y": 374.00002098083496, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "dffd4016.02da" + ] + ] + }, + { + "id": "dffd4016.02da", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1301.500129699707, + "y": 370.0000219345093, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "e27a3881.71afb8" + ] + ] + }, + { + "id": "e27a3881.71afb8", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 1471.5001602172852, + "y": 364.00001335144043, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "dc9245c2.4db508", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1330.000129699707, + "y": 211.99999523162842, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "c7f75df2.76888" + ] + ] + }, + { + "id": "c7f75df2.76888", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1489.000129699707, + "y": 213.00001049041748, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "5e63ce8a.af52a" + ] + ] + }, + { + "id": "5e63ce8a.af52a", + "type": "record", + "name": "record", + "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`' />", + "comments": "", + "outputs": 1, + "x": 1647.0001602172852, + "y": 210.0000023841858, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "7ed6ebcf.0591e4", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1406, + "y": 134, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "81458744.601ef8" + ] + ] + }, + { + "id": "81458744.601ef8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1799.9999389648438, + "y": 120.99999904632568, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "bacbbc8a.f6941", + "995c6b22.95ff88", + "dc754e34.18b86" + ] + ] + }, + { + "id": "bacbbc8a.f6941", + "type": "returnFailure", + "name": "return failure", + "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'/>", + "comments": "", + "x": 1776.9998474121094, + "y": 175.0000057220459, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "2b40c422.72833c", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1337.000114440918, + "y": 297.9999952316284, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "9a83fc16.7714e" + ] + ] + }, + { + "id": "9a83fc16.7714e", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1591.0000686645508, + "y": 289.99999475479126, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "22fbcd27.4e5fd2", + "548d546b.d9cedc", + "dc754e34.18b86" + ] + ] + }, + { + "id": "22fbcd27.4e5fd2", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1628.9997940063477, + "y": 362.0000219345093, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "a731343e.eb8138", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1148.0001373291016, + "y": 464.99999952316284, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "d4189ca3.d0364" + ] + ] + }, + { + "id": "d4189ca3.d0364", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1528.000129699707, + "y": 469.00002098083496, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "9eb173db.93145", + "32ec5dff.471c32", + "dc754e34.18b86" + ] + ] + }, + { + "id": "9eb173db.93145", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1482.000099182129, + "y": 556.0000219345093, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "c1612317.d0711", + "type": "block", + "name": "A1 Mediator Payload Generation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 791, + "y": 197, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "e4c6a778.e1aaa8", + "4e0cfa4d.d89b44", + "a8217c1d.01afc" + ] + ] + }, + { + "id": "81f255bc.c262f8", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 516, + "y": 127, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "e07f2f41.f873d", + "type": "record", + "name": "record", + "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", + "comments": "", + "outputs": 1, + "x": 493, + "y": 211, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "6562fc0a.7a0914", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 360, + "y": 322, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "9c23b632.e02c18", + "b1e5fe91.97aa5" + ] + ] + }, + { + "id": "9c23b632.e02c18", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 576.0000076293945, + "y": 1002.0001735687256, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "273be5b.9b1061a" + ] + ] + }, + { + "id": "b1e5fe91.97aa5", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 543, + "y": 258.00006103515625, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "9ed89566.9ebd78" + ] + ] + }, + { + "id": "9ed89566.9ebd78", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 608, + "y": 334, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "c1612317.d0711", + "56d9853f.f02f6c" + ] + ] + }, + { + "id": "273be5b.9b1061a", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 720.9999961853027, + "y": 1080.9999904632568, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "735341e0.7cf62", + "f00de33f.958a3", + "dc754e34.18b86" + ] + ] + }, + { + "id": "735341e0.7cf62", + "type": "returnFailure", + "name": "return failure", + "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", + "comments": "", + "x": 756.9997673034668, + "y": 1214.000012397766, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "822e4be6.9aeb88", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1217.0000915527344, + "y": 742.0000071525574, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "dcbc720c.e12ad" + ] + ] + }, + { + "id": "cbddba75.75b3e8", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1223.0002746582031, + "y": 826.9999918937683, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "5402f03c.8e47d" + ] + ] + }, + { + "id": "5402f03c.8e47d", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1367.9999084472656, + "y": 809.0000071525574, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "bf840c18.42a18" + ] + ] + }, + { + "id": "1ad8db0a.f4e495", + "type": "set", + "name": "set tmp variables for input RPC parms", + "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`\"/>", + "comments": "", + "x": 1017.0010070800781, + "y": 539.8890910148621, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "762f3a72.743d14", + "type": "execute", + "name": "Create A1 Policy Type", + "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", + "comments": "", + "outputs": 1, + "x": 1000.0004577636719, + "y": 785.0103678703308, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "822e4be6.9aeb88", + "cbddba75.75b3e8" + ] + ] + }, + { + "id": "bf555fa7.85bc1", + "type": "execute", + "name": "generate A1 Mediator URL", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 996.0001525878906, + "y": 596.0104899406433, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "56d9853f.f02f6c", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 696.0000305175781, + "y": 622.9999918937683, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "309907cb.88b8b8", + "1ad8db0a.f4e495", + "bf555fa7.85bc1", + "762f3a72.743d14" + ] + ] + }, + { + "id": "309907cb.88b8b8", + "type": "record", + "name": "record", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 972.0000305175781, + "y": 712.9999918937683, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "bf840c18.42a18", + "type": "record", + "name": "record", + "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.\"/>", + "comments": "", + "outputs": 1, + "x": 1538.0000305175781, + "y": 810.9999918937683, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "1d14eb24.f639b5", + "type": "returnFailure", + "name": "return failure", + "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\" />", + "comments": "", + "x": 1422.0001602172852, + "y": 740.0000019073486, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "ed6f54ef.6ff228", + "type": "set", + "name": "set A1Mediator payload manually", + "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>", + "comments": "", + "x": 1019.0000305175781, + "y": 655.9999918937683, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "3fcd8058.1cbb1", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 714, + "y": 24, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "b35175f.9958988", + "cf4806a1.1d1598" + ] + ] + }, + { + "id": "cf4806a1.1d1598", + "type": "for", + "name": "for 0..policy-statements_length", + "xml": "<for index='idx2' start='0' end='`$create-policy-type-input.properties[$idx1].policy-statements_length`' >", + "comments": "", + "outputs": 1, + "x": 803, + "y": 110, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "4675b56e.9a221c" + ] + ] + }, + { + "id": "4675b56e.9a221c", + "type": "record", + "name": "record", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 1020, + "y": 38, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "113f146b.e7fc1c", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Successful execution of createPolicyType RPC' />", + "comments": "", + "x": 518, + "y": 81, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "dc754e34.18b86", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 2218.5039672851562, + "y": 818.004011631012, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "5784d302.e1710c", + "aed8c8e.3c55c38", + "98b8cae1.792f68" + ] + ] + }, + { + "id": "aed8c8e.3c55c38", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2490.504165649414, + "y": 960.0033769607544, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "93cfbb9d.b9c5a8", + "d2616a2c.825ff8" + ] + ] + }, + { + "id": "5784d302.e1710c", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 2471.170913696289, + "y": 674.0039100646973, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "93cfbb9d.b9c5a8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2725.004108428955, + "y": 870.9207038879395, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "15bde2a9.106a0d" + ] + ] + }, + { + "id": "d2616a2c.825ff8", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2729.0040283203125, + "y": 1009.9205465316772, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "801c250c.9459d8" + ] + ] + }, + { + "id": "15bde2a9.106a0d", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2885.003942489624, + "y": 872.9207048416138, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "13abffa9.da7d8" + ] + ] + }, + { + "id": "13abffa9.da7d8", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 3067.003673553467, + "y": 863.9207806587219, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "801c250c.9459d8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2912.003671646118, + "y": 1002.9206552505493, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "682c6ff7.cfcce" + ] + ] + }, + { + "id": "682c6ff7.cfcce", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 3100.0038719177246, + "y": 991.9209499359131, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "98b8cae1.792f68", + "type": "record", + "name": "record", + "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`\" />", + "comments": "", + "outputs": 1, + "x": 2498.0040130615234, + "y": 827.458911895752, + "z": "33d2d73b.2b05a8", + "wires": [ + [] + ] + }, + { + "id": "f777d20f.cea71", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 602.0039024353027, + "y": 1318.753975868225, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "c869b560.9e91f8", + "dc754e34.18b86" + ] + ] + }, + { + "id": "f00de33f.958a3", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 813.00390625, + "y": 948.7540035247803, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "995c6b22.95ff88", + "type": "set", + "name": "set", + "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'/>", + "comments": "", + "x": 1981.7541809082031, + "y": 51.00389862060547, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "548d546b.d9cedc", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 1766.25390625, + "y": 264.00390625, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "32ec5dff.471c32", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 1675.25390625, + "y": 430.00390625, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "e80eb11c.f708b", + "type": "set", + "name": "set", + "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\" />", + "comments": "", + "x": 1644.2539749145508, + "y": 600.7539310455322, + "z": "33d2d73b.2b05a8", + "wires": [] + }, + { + "id": "dcbc720c.e12ad", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1358.25390625, + "y": 670.75390625, + "z": "33d2d73b.2b05a8", + "wires": [ + [ + "1d14eb24.f639b5", + "e80eb11c.f708b", + "dc754e34.18b86" + ] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyInstance.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyInstance.json new file mode 100644 index 00000000..849dd431 --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyInstance.json @@ -0,0 +1,608 @@ +[ + { + "id": "b3dee81c.fd9fe8", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 192.00390625, + "y": 97.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "7531c732.0898e8" + ] + ] + }, + { + "id": "7531c732.0898e8", + "type": "method", + "name": "method deletePolicyInstance", + "xml": "<method rpc='deletePolicyInstance' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 253.00390625, + "y": 217.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "72c936dc.603938" + ] + ] + }, + { + "id": "6a117f5a.9254b", + "type": "record", + "name": "record", + "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=\"Delete Policy Instance associated with Near RT RIC ID and Policy Type ID\"/>\n<parameter name=\"field2\" value=\"`$delete-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$delete-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$delete-policy-instance-input.policy-instance-id`\"/>", + "comments": "", + "outputs": 1, + "x": 717.00390625, + "y": 32.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "72c936dc.603938", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 458.00390625, + "y": 171.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "6a117f5a.9254b", + "ecd8c4ad.08ac98", + "458ad2c3.2d487c", + "baafc628.405a18", + "e08e23bc.b70f2" + ] + ] + }, + { + "id": "c86b6da1.9de53", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 125.00390625, + "y": 33.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "b3dee81c.fd9fe8" + ] + ] + }, + { + "id": "ecd8c4ad.08ac98", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='deletePolicyInstance executed successfully' />", + "comments": "", + "x": 757.0039520263672, + "y": 86.00390720367432, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "458ad2c3.2d487c", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 757.00390625, + "y": 139.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "baafc628.405a18", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 707.00390625, + "y": 195.00390625, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "42bb6a38.fa2904", + "ad7b68a5.0e8c88" + ] + ] + }, + { + "id": "ad7b68a5.0e8c88", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 991.0039520263672, + "y": 55.003971576690674, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "f3de5fc8.2216b" + ] + ] + }, + { + "id": "f3de5fc8.2216b", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 968.0040016174316, + "y": 201.00392389297485, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "3f0f3f98.816a2" + ] + ] + }, + { + "id": "42bb6a38.fa2904", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 944.0039749145508, + "y": 490.0039677619934, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "a58a5c2a.38d89" + ] + ] + }, + { + "id": "a58a5c2a.38d89", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1159.0040130615234, + "y": 619.0039205551147, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "5165256d.575c6c", + "bb41aaa6.4825a8", + "8e65316c.ffc44" + ] + ] + }, + { + "id": "5165256d.575c6c", + "type": "returnFailure", + "name": "return failure", + "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 in Deleting A1 Policy Instance. Aborting\" />", + "comments": "", + "x": 1289.0038299560547, + "y": 700.0039048194885, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "3f0f3f98.816a2", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1162.0040130615234, + "y": 312.00391072034836, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "79579072.27faa", + "7e882622.458f98", + "908f8d2f.0fe18", + "4294725c.c0125c", + "e8970148.2dc5a", + "c07e70d5.3a2f8" + ] + ] + }, + { + "id": "7e882622.458f98", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$delete-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$delete-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"tmp.policy-instance-id\" value=\"`$delete-policy-instance-input.policy-instance-id`\"/>\n", + "comments": "", + "x": 1500.00537109375, + "y": 109.89303684234619, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "79579072.27faa", + "type": "record", + "name": "record", + "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 Delete 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`\"/>", + "comments": "", + "outputs": 1, + "x": 1421.0040016174316, + "y": 163.00390911102295, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "908f8d2f.0fe18", + "type": "execute", + "name": "Delete Policy Instance", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"DELETE\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"false\"/>", + "comments": "", + "outputs": 1, + "x": 1439.0045166015625, + "y": 366.0143041610718, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "d810ec63.b8faf", + "3bf068e7.a26b38" + ] + ] + }, + { + "id": "d810ec63.b8faf", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1415.0039367675781, + "y": 463.00401973724365, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "e087b19.28e325" + ] + ] + }, + { + "id": "3bf068e7.a26b38", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1659.0041809082031, + "y": 334.0039281845093, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "52049fa8.37edd" + ] + ] + }, + { + "id": "ba304eb3.e7474", + "type": "returnFailure", + "name": "return failure", + "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 in Deleting A1 Policy Instance. Aborting\" />", + "comments": "", + "x": 1575.0045166015625, + "y": 570.0039892196655, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "52049fa8.37edd", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1809.0037860870361, + "y": 298.00395822525024, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "ba44f2a5.266a8" + ] + ] + }, + { + "id": "ba44f2a5.266a8", + "type": "record", + "name": "record", + "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=\"Details of A1 Policy Instance \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>", + "comments": "", + "outputs": 1, + "x": 1989.0039100646973, + "y": 272.00390911102295, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "bb41aaa6.4825a8", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1945.0040283203125, + "y": 667.0040578842163, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "2bd93f6c.4a183", + "25222249.29d39e", + "a02a20c9.bb14d" + ] + ] + }, + { + "id": "25222249.29d39e", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2294.0042266845703, + "y": 845.0034625530243, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "77c16af2.fd1fd4", + "231b7cfe.e2f364" + ] + ] + }, + { + "id": "2bd93f6c.4a183", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyInstance'/>\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=\"Working On it\" />", + "comments": "", + "x": 2283.670944213867, + "y": 636.0040187835693, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "77c16af2.fd1fd4", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2509.5041122436523, + "y": 767.9207663536072, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "72d0fe4c.a2b34" + ] + ] + }, + { + "id": "231b7cfe.e2f364", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2513.5040321350098, + "y": 906.920608997345, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "5c8fc4f2.ab84fc" + ] + ] + }, + { + "id": "72d0fe4c.a2b34", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2669.5039463043213, + "y": 769.9207673072815, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "575b220d.c9b55c" + ] + ] + }, + { + "id": "575b220d.c9b55c", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2851.503677368164, + "y": 760.9208431243896, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "5c8fc4f2.ab84fc", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2696.5036754608154, + "y": 899.920717716217, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "98081928.21ec28" + ] + ] + }, + { + "id": "98081928.21ec28", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2882.5038299560547, + "y": 887.9210414886475, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "a02a20c9.bb14d", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2292.504165649414, + "y": 727.4589986801147, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "8e65316c.ffc44", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1339.0041160583496, + "y": 553.0038986206055, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "b0a0c33e.2eea7", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1734.757869720459, + "y": 399.00780391693115, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "e08e23bc.b70f2", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 700.7578010559082, + "y": 809.0078420639038, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "629d6c66.04ac24", + "bb41aaa6.4825a8" + ] + ] + }, + { + "id": "629d6c66.04ac24", + "type": "returnSuccess", + "name": "return success", + "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='deletePolicyInstance executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n", + "comments": "", + "x": 855.7578887939453, + "y": 893.0078468322754, + "z": "5e51bc9d.e46964", + "wires": [] + }, + { + "id": "e087b19.28e325", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1561.0077781677246, + "y": 466.0078344345093, + "z": "5e51bc9d.e46964", + "wires": [ + [ + "b0a0c33e.2eea7", + "bb41aaa6.4825a8", + "ba304eb3.e7474" + ] + ] + }, + { + "id": "4294725c.c0125c", + "type": "execute", + "name": "generate A1 Mediator URL 1", + "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.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_type_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1497.0044250488281, + "y": 211.00390911102295, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "e8970148.2dc5a", + "type": "record", + "name": "record", + "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 Delete 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.policyinstance-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1437.0046348571777, + "y": 302.88250637054443, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + }, + { + "id": "c07e70d5.3a2f8", + "type": "execute", + "name": "generate A1 Mediator URL 2", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.restapi.policyinstance-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_instance_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-instance-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1496.2538757324219, + "y": 261.00391244888306, + "z": "5e51bc9d.e46964", + "wires": [ + [] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyType.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyType.json new file mode 100644 index 00000000..91f210c9 --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_deletePolicyType.json @@ -0,0 +1,629 @@ +[ + { + "id": "528161c6.ca5cc", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 222.00390625, + "y": 126.00390625, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "570dbd6.b447044" + ] + ] + }, + { + "id": "570dbd6.b447044", + "type": "method", + "name": "method deletePolicyType", + "xml": "<method rpc='deletePolicyType' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 285.00391387939453, + "y": 249.00391578674316, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "a960170a.25ddb8" + ] + ] + }, + { + "id": "28f744fe.e4b2dc", + "type": "record", + "name": "record", + "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=\"Delete Policy Type from Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$delete-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$delete-policy-type-input.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 748.0039215087891, + "y": 64.00390481948853, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "a960170a.25ddb8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 488.00390625, + "y": 200.00390625, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "28f744fe.e4b2dc", + "bef5d8a0.98d8d8", + "886fc2e2.c002c", + "213c6c30.2b9d94", + "e9d83a7c.da03c8" + ] + ] + }, + { + "id": "47be5f8d.0adad", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 155.00390625, + "y": 62.00390625, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "528161c6.ca5cc" + ] + ] + }, + { + "id": "bef5d8a0.98d8d8", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='deletePolicyType executed successfully' />", + "comments": "", + "x": 787.0040130615234, + "y": 115.00390434265137, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "886fc2e2.c002c", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 787.00390625, + "y": 168.00390625, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "213c6c30.2b9d94", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 737.00390625, + "y": 224.00390625, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "e51fb4c1.a78c38", + "e80e3882.d37798" + ] + ] + }, + { + "id": "e80e3882.d37798", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1021.0039520263672, + "y": 84.00397157669067, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "6dd79b4a.5d7ee4" + ] + ] + }, + { + "id": "6dd79b4a.5d7ee4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 998.0040016174316, + "y": 230.00392389297485, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "abbff9fc.ef6df8" + ] + ] + }, + { + "id": "e51fb4c1.a78c38", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 974.0039749145508, + "y": 519.0039677619934, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "d5da56ba.4ea078" + ] + ] + }, + { + "id": "d5da56ba.4ea078", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1189.0040130615234, + "y": 648.0039205551147, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "80281362.5baa8", + "a218740b.e03078", + "44ff6d07.0fa8a4" + ] + ] + }, + { + "id": "80281362.5baa8", + "type": "returnFailure", + "name": "return failure", + "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 Policy Delete\" />", + "comments": "", + "x": 1314.0037689208984, + "y": 729.0039050579071, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "abbff9fc.ef6df8", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1192.0040130615234, + "y": 341.00391072034836, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "76c6cf0a.1a173", + "59b120e4.f40e1", + "c40bc3d7.346b7", + "960ee141.dd015", + "903b4506.e4f458" + ] + ] + }, + { + "id": "59b120e4.f40e1", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$delete-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$delete-policy-type-input.policy-type-id`\"/>", + "comments": "", + "x": 1539.0054321289062, + "y": 179.8930459022522, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "76c6cf0a.1a173", + "type": "record", + "name": "record", + "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 Delete Policy Type.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.policytype-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1454.0040550231934, + "y": 333.0039167404175, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "c40bc3d7.346b7", + "type": "execute", + "name": "Delete Policy Type", + "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=\"DELETE\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"false\"/>", + "comments": "", + "outputs": 1, + "x": 1482.0045776367188, + "y": 405.01428031921387, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "1d585b60.0cc545", + "359283da.4d5d6c" + ] + ] + }, + { + "id": "1d585b60.0cc545", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1445.0039367675781, + "y": 492.00401973724365, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "c2e429d5.e069b8" + ] + ] + }, + { + "id": "359283da.4d5d6c", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1689.0041809082031, + "y": 363.0039281845093, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "42c902a9.e4df7c" + ] + ] + }, + { + "id": "23c85e16.e15d92", + "type": "returnFailure", + "name": "return failure", + "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 in Delete Policy. Aborting\" />", + "comments": "", + "x": 1605.0045166015625, + "y": 599.0039892196655, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "42c902a9.e4df7c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1839.0037860870361, + "y": 327.00395822525024, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "e5100108.3dca4" + ] + ] + }, + { + "id": "e5100108.3dca4", + "type": "record", + "name": "record", + "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=\"Delete policy type operation executed against A1 Mediator \"/>", + "comments": "", + "outputs": 1, + "x": 2026.0040035247803, + "y": 318.0039052963257, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "a218740b.e03078", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1975.0040283203125, + "y": 696.0040578842163, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "8220447b.8289d8", + "1dba3ab6.471df5", + "942029f7.65a818" + ] + ] + }, + { + "id": "1dba3ab6.471df5", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2324.0042266845703, + "y": 874.0034625530243, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "b33ac859.8eb828", + "b9c18111.fc69a" + ] + ] + }, + { + "id": "8220447b.8289d8", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyType'/>\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=\"Working On it\" />", + "comments": "", + "x": 2318.670913696289, + "y": 670.004056930542, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "b33ac859.8eb828", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2539.5041122436523, + "y": 796.9207663536072, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "625161a.b68eea" + ] + ] + }, + { + "id": "b9c18111.fc69a", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2543.5040321350098, + "y": 935.920608997345, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "3ca9895c.5c6906" + ] + ] + }, + { + "id": "625161a.b68eea", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2699.5039463043213, + "y": 798.9207673072815, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "f57ce8d7.112bf8" + ] + ] + }, + { + "id": "f57ce8d7.112bf8", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2881.503677368164, + "y": 789.9208431243896, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "3ca9895c.5c6906", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2726.5036754608154, + "y": 928.920717716217, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "53f57334.ecf73c" + ] + ] + }, + { + "id": "53f57334.ecf73c", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2913.5039825439453, + "y": 918.9210071563721, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "942029f7.65a818", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2322.504165649414, + "y": 756.4589986801147, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "44ff6d07.0fa8a4", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1394.004238128662, + "y": 585.0038967132568, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "9346d287.a0b54", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1770.7577896118164, + "y": 438.00782680511475, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "e9d83a7c.da03c8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 730.7578010559082, + "y": 838.0078420639038, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "c1eda177.24fc5", + "a218740b.e03078" + ] + ] + }, + { + "id": "c1eda177.24fc5", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 880.7578449249268, + "y": 920.0078115463257, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "c2e429d5.e069b8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1591.0077781677246, + "y": 495.0078344345093, + "z": "bd2d1622.7875d8", + "wires": [ + [ + "9346d287.a0b54", + "a218740b.e03078", + "23c85e16.e15d92" + ] + ] + }, + { + "id": "f4535bee.c15298", + "type": "set", + "name": "set tmp variables for input RPC parms", + "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`\"/>", + "comments": "", + "x": 214.00390625, + "y": 491.00390625, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "960ee141.dd015", + "type": "execute", + "name": "generate A1 Mediator URL", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 1522.0032653808594, + "y": 282.12531089782715, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "46b5244a.8aaaac", + "type": "record", + "name": "record", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 169.0029296875, + "y": 664.1148071289062, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + }, + { + "id": "55b4ff0a.c8ef9", + "type": "set", + "name": "set A1Mediator payload manually", + "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>", + "comments": "", + "x": 216.0029296875, + "y": 607.1148071289062, + "z": "bd2d1622.7875d8", + "wires": [] + }, + { + "id": "903b4506.e4f458", + "type": "record", + "name": "record", + "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 Delete Policy Type.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 1458.0038719177246, + "y": 231.00391292572021, + "z": "bd2d1622.7875d8", + "wires": [ + [] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getHealthCheck.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getHealthCheck.json index e7b79452..7445c2e5 100644 --- a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getHealthCheck.json +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getHealthCheck.json @@ -1,61 +1,591 @@ [ { - "id": "d160ae95.22121", + "id": "f70577cd.2332b8", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 166, + "y": 89, + "z": "71073541.7e954c", + "wires": [ + [ + "51320529.8c13fc" + ] + ] + }, + { + "id": "51320529.8c13fc", + "type": "method", + "name": "method getHealthCheck", + "xml": "<method rpc='getHealthCheck' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 227, + "y": 209, + "z": "71073541.7e954c", + "wires": [ + [ + "50c04d9d.eb06a4" + ] + ] + }, + { + "id": "cf6fe4d2.e21a88", + "type": "record", + "name": "record", + "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 Health Check. Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$get-health-check-input.near-rt-ric-id`\"/>", + "comments": "", + "outputs": 1, + "x": 691, + "y": 24, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "50c04d9d.eb06a4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 432, + "y": 163, + "z": "71073541.7e954c", + "wires": [ + [ + "cf6fe4d2.e21a88", + "9b09eba5.e4dfa8", + "fad38a44.2dff58", + "da55f177.44ea9", + "fe7bfe5c.0b58a" + ] + ] + }, + { + "id": "fdb9f2a9.d1099", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 146, - "y": 57, - "z": "3d3f45b8.78bdda", + "x": 99, + "y": 25, + "z": "71073541.7e954c", "wires": [ [ - "7af2c12d.dfc56" + "f70577cd.2332b8" ] ] }, { - "id": "7af2c12d.dfc56", - "type": "service-logic", - "name": "A1-ADAPTER-API ${project.version}", - "module": "A1-ADAPTER-API", - "version": "${project.version}", + "id": "9b09eba5.e4dfa8", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='A1 is Healthy' />", + "comments": "", + "x": 742, + "y": 90, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "fad38a44.2dff58", + "type": "execute", + "name": "execute Properties", + "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", "comments": "", - "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}'>", "outputs": 1, - "x": 186, - "y": 123, - "z": "3d3f45b8.78bdda", + "x": 731, + "y": 131, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "da55f177.44ea9", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 681, + "y": 187, + "z": "71073541.7e954c", "wires": [ [ - "f4915cbe.123c4" + "1b90a5eb.8a64ea", + "df3dcdff.980fa" ] ] }, { - "id": "f4915cbe.123c4", - "type": "method", - "name": "method getHealthCheck", - "xml": "<method rpc='getHealthCheck' mode='sync'>\n", + "id": "df3dcdff.980fa", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 965.0000457763672, + "y": 47.000065326690674, + "z": "71073541.7e954c", + "wires": [ + [ + "d65603a6.a6255" + ] + ] + }, + { + "id": "d65603a6.a6255", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 968.0000152587891, + "y": 237.00000953674316, + "z": "71073541.7e954c", + "wires": [ + [ + "fad8a7e7.6c01c8" + ] + ] + }, + { + "id": "fad8a7e7.6c01c8", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1144.0000305175781, + "y": 157.0000023841858, + "z": "71073541.7e954c", + "wires": [ + [ + "239aaf9f.539e4" + ] + ] + }, + { + "id": "1b90a5eb.8a64ea", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 918.0000686645508, + "y": 482.0000615119934, + "z": "71073541.7e954c", + "wires": [ + [ + "d91da8b7.4c9cd8" + ] + ] + }, + { + "id": "d91da8b7.4c9cd8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1133.0001068115234, + "y": 611.0000143051147, + "z": "71073541.7e954c", + "wires": [ + [ + "373e75ec.2ef50a", + "ad639178.ea45b", + "1d8bf60c.0ab74a" + ] + ] + }, + { + "id": "373e75ec.2ef50a", + "type": "returnFailure", + "name": "return failure", + "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 Health Check\" />", + "comments": "", + "x": 1257.9998626708984, + "y": 691.9999988079071, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "db9f306b.9d952", + "type": "comment", + "name": "No DMAAP Response Payload", + "info": "", + "comments": "", + "x": 1436, + "y": 98, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "239aaf9f.539e4", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1115, + "y": 327.0000139772892, + "z": "71073541.7e954c", + "wires": [ + [ + "a401c326.c2be8", + "34de0f9a.82fab", + "742ba549.33a0fc" + ] + ] + }, + { + "id": "34de0f9a.82fab", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-health-check-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.restapi.healthcheck-url\" value=\"`$prop.restapi.healthcheck`\"/>", + "comments": "", + "x": 1503.0010681152344, + "y": 232.8890978693962, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "a401c326.c2be8", + "type": "record", + "name": "record", + "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 Health Check.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.healthcheck-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1395.0000305175781, + "y": 292.00000286102295, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "742ba549.33a0fc", + "type": "execute", + "name": "Check A1 Mediator Health", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.healthcheck-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"false\"/>\n", + "comments": "", + "outputs": 1, + "x": 1428.00048828125, + "y": 372.0103898048401, + "z": "71073541.7e954c", + "wires": [ + [ + "54a96509.b22d6c", + "5a29f4f5.fc1fcc" + ] + ] + }, + { + "id": "54a96509.b22d6c", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1389.0000305175781, + "y": 455.00011348724365, + "z": "71073541.7e954c", + "wires": [ + [ + "fc4e3c1b.c7139" + ] + ] + }, + { + "id": "5a29f4f5.fc1fcc", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1633.0002746582031, + "y": 326.0000219345093, + "z": "71073541.7e954c", + "wires": [ + [ + "10397796.f90e08" + ] + ] + }, + { + "id": "81144d1f.a8a31", + "type": "returnFailure", + "name": "return failure", + "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 in A1 Mediator Health Check. Aborting A1 Health Check\" />", + "comments": "", + "x": 1549.0006103515625, + "y": 562.0000829696655, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "10397796.f90e08", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1782.9998798370361, + "y": 290.00005197525024, + "z": "71073541.7e954c", + "wires": [ + [ + "acc2e27c.325de" + ] + ] + }, + { + "id": "acc2e27c.325de", + "type": "record", + "name": "record", + "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 Mediator is Healthy.\"/>", + "comments": "", + "outputs": 1, + "x": 1960.0000305175781, + "y": 262.9999990463257, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "ad639178.ea45b", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1919.0001220703125, + "y": 659.0001516342163, + "z": "71073541.7e954c", + "wires": [ + [ + "52a8bbd0.8d15e4", + "1824af45.7c4c31", + "d55641b9.0d8a" + ] + ] + }, + { + "id": "1824af45.7c4c31", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2268.0003204345703, + "y": 836.9995563030243, + "z": "71073541.7e954c", + "wires": [ + [ + "b67eb7fa.2e8d88", + "b7c6de0.48aae2" + ] + ] + }, + { + "id": "52a8bbd0.8d15e4", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getHealthCheck'/>\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\" />", + "comments": "", + "x": 2256.667091369629, + "y": 627.0001363754272, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "b67eb7fa.2e8d88", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2483.5002059936523, + "y": 759.9168601036072, + "z": "71073541.7e954c", + "wires": [ + [ + "5004b5da.bc5e3c" + ] + ] + }, + { + "id": "b7c6de0.48aae2", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2487.5001258850098, + "y": 898.916702747345, + "z": "71073541.7e954c", + "wires": [ + [ + "c46eaf10.81be1" + ] + ] + }, + { + "id": "5004b5da.bc5e3c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2643.5000400543213, + "y": 761.9168610572815, + "z": "71073541.7e954c", + "wires": [ + [ + "1c492a8f.477515" + ] + ] + }, + { + "id": "1c492a8f.477515", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2825.499771118164, + "y": 752.9169368743896, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "c46eaf10.81be1", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 228, - "y": 189, - "z": "3d3f45b8.78bdda", + "x": 2670.4997692108154, + "y": 891.916811466217, + "z": "71073541.7e954c", "wires": [ [ - "9a26ac28.f0c6b" + "cd499a2b.0f9d88" ] ] }, { - "id": "9a26ac28.f0c6b", + "id": "cd499a2b.0f9d88", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2856.4999237060547, + "y": 879.9171352386475, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "d55641b9.0d8a", + "type": "record", + "name": "record", + "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`\" />", + "comments": "", + "outputs": 1, + "x": 2264.5002517700195, + "y": 713.4550609588623, + "z": "71073541.7e954c", + "wires": [ + [] + ] + }, + { + "id": "1d8bf60c.0ab74a", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1334.0001525878906, + "y": 544.0000214576721, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "cdf48a0a.84bf18", "type": "set", - "name": "set return message", - "xml": "<set>\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'/>", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Healthy'/>\n", "comments": "", - "x": 279, - "y": 269, - "z": "3d3f45b8.78bdda", + "x": 1708.753963470459, + "y": 391.00389766693115, + "z": "71073541.7e954c", "wires": [] + }, + { + "id": "fe7bfe5c.0b58a", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 674.7538948059082, + "y": 801.0039358139038, + "z": "71073541.7e954c", + "wires": [ + [ + "fd40a79.a6fb958", + "ad639178.ea45b" + ] + ] + }, + { + "id": "fd40a79.a6fb958", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 824.7539386749268, + "y": 883.0039052963257, + "z": "71073541.7e954c", + "wires": [] + }, + { + "id": "fc4e3c1b.c7139", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1535.0038719177246, + "y": 458.0039281845093, + "z": "71073541.7e954c", + "wires": [ + [ + "cdf48a0a.84bf18", + "ad639178.ea45b", + "81144d1f.a8a31" + ] + ] } ]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstance.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstance.json new file mode 100644 index 00000000..298122eb --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstance.json @@ -0,0 +1,608 @@ +[ + { + "id": "71057082.a243e", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 185.00390625, + "y": 111.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "19afdfe5.38b64" + ] + ] + }, + { + "id": "19afdfe5.38b64", + "type": "method", + "name": "method getPolicyInstance", + "xml": "<method rpc='getPolicyInstance' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 246.00390625, + "y": 231.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "37f244a6.0ab56c" + ] + ] + }, + { + "id": "7cfcfa29.2fc534", + "type": "record", + "name": "record", + "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=\"Get Policy Instance details associated with Near RT RIC ID and Policy Type ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$get-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$get-policy-instance-input.policy-instance-id`\"/>", + "comments": "", + "outputs": 1, + "x": 710.00390625, + "y": 46.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "37f244a6.0ab56c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 451.00390625, + "y": 185.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "7cfcfa29.2fc534", + "5f6ae6c2.664f58", + "91b2618d.b3e64", + "ff11fc63.9326c", + "857216e8.e8f328" + ] + ] + }, + { + "id": "87a6087.e17c9f8", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 118.00390625, + "y": 47.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "71057082.a243e" + ] + ] + }, + { + "id": "5f6ae6c2.664f58", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getPolicyInstance executed successfully' />", + "comments": "", + "x": 750.0039520263672, + "y": 100.00390720367432, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "91b2618d.b3e64", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 750.00390625, + "y": 153.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "ff11fc63.9326c", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 700.00390625, + "y": 209.00390625, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "eb95df55.02d21", + "e95fa510.0ebf68" + ] + ] + }, + { + "id": "e95fa510.0ebf68", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 984.0039520263672, + "y": 69.00397157669067, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "a8bd697e.3db8a8" + ] + ] + }, + { + "id": "a8bd697e.3db8a8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 961.0040016174316, + "y": 215.00392389297485, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "2cf579fc.444f26" + ] + ] + }, + { + "id": "eb95df55.02d21", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 937.0039749145508, + "y": 504.0039677619934, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "f9cc4575.cfd998" + ] + ] + }, + { + "id": "f9cc4575.cfd998", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1152.0040130615234, + "y": 633.0039205551147, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "2881f676.88488a", + "a5d36c9a.4d26a", + "3cf054c2.6c700c" + ] + ] + }, + { + "id": "2881f676.88488a", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Instance. Aborting\" />", + "comments": "", + "x": 1282.0038299560547, + "y": 714.0039048194885, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "2cf579fc.444f26", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1155.0040130615234, + "y": 326.00391072034836, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "ced8bdb3.3e326", + "3bab4a80.83e436", + "7e7b0916.928d98", + "6419a04c.32704", + "f3275c75.b49b7", + "e3d7b540.043a18" + ] + ] + }, + { + "id": "3bab4a80.83e436", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-instance-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$get-policy-instance-input.policy-type-id`\"/>\n<parameter name=\"tmp.policy-instance-id\" value=\"`$get-policy-instance-input.policy-instance-id`\"/>\n", + "comments": "", + "x": 1493.00537109375, + "y": 123.89303684234619, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "ced8bdb3.3e326", + "type": "record", + "name": "record", + "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 Get 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`\"/>", + "comments": "", + "outputs": 1, + "x": 1414.0040016174316, + "y": 177.00390911102295, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "7e7b0916.928d98", + "type": "execute", + "name": "Get Policy Instances", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"true\"/>", + "comments": "", + "outputs": 1, + "x": 1432.0045166015625, + "y": 380.0143041610718, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "d99d36d2.a41738", + "d90c54fd.fb6598" + ] + ] + }, + { + "id": "d99d36d2.a41738", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1408.0039367675781, + "y": 477.00401973724365, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "fae65389.46b4c" + ] + ] + }, + { + "id": "d90c54fd.fb6598", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1652.0041809082031, + "y": 348.0039281845093, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "bafba09b.77276" + ] + ] + }, + { + "id": "2e6e9e5e.d18972", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Instances. Aborting\" />", + "comments": "", + "x": 1568.0045166015625, + "y": 584.0039892196655, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "bafba09b.77276", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1802.0037860870361, + "y": 312.00395822525024, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "53d1c58f.35908c" + ] + ] + }, + { + "id": "53d1c58f.35908c", + "type": "record", + "name": "record", + "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=\"Details of A1 Policy Instance \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>", + "comments": "", + "outputs": 1, + "x": 1982.0039100646973, + "y": 286.00390911102295, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "a5d36c9a.4d26a", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1938.0040283203125, + "y": 681.0040578842163, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "929dc7d7.1039c8", + "dc1ffc54.5e3cd", + "fe0ccd89.12fd1" + ] + ] + }, + { + "id": "dc1ffc54.5e3cd", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2287.0042266845703, + "y": 859.0034625530243, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "76f21871.691708", + "8e9322d6.6a8b9" + ] + ] + }, + { + "id": "929dc7d7.1039c8", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstance'/>\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=\"Working On it\" />", + "comments": "", + "x": 2276.670944213867, + "y": 650.0040187835693, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "76f21871.691708", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2502.5041122436523, + "y": 781.9207663536072, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "aae104a5.55a318" + ] + ] + }, + { + "id": "8e9322d6.6a8b9", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2506.5040321350098, + "y": 920.920608997345, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "98ac5348.1769d" + ] + ] + }, + { + "id": "aae104a5.55a318", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2662.5039463043213, + "y": 783.9207673072815, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "9195416c.3d54d" + ] + ] + }, + { + "id": "9195416c.3d54d", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2844.503677368164, + "y": 774.9208431243896, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "98ac5348.1769d", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2689.5036754608154, + "y": 913.920717716217, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "a2280756.7ffb78" + ] + ] + }, + { + "id": "a2280756.7ffb78", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2875.5038299560547, + "y": 901.9210414886475, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "fe0ccd89.12fd1", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2285.504165649414, + "y": 741.4589986801147, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "3cf054c2.6c700c", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1353.0040588378906, + "y": 566.0039277076721, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "cdb5081e.c62b38", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1727.757869720459, + "y": 413.00780391693115, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "857216e8.e8f328", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 693.7578010559082, + "y": 823.0078420639038, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "bb3497e8.2c2608", + "a5d36c9a.4d26a" + ] + ] + }, + { + "id": "bb3497e8.2c2608", + "type": "returnSuccess", + "name": "return success", + "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='getPolicyInstance executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n", + "comments": "", + "x": 843.7578449249268, + "y": 905.0078115463257, + "z": "9a83e9ac.8e87e8", + "wires": [] + }, + { + "id": "fae65389.46b4c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1554.0077781677246, + "y": 480.0078344345093, + "z": "9a83e9ac.8e87e8", + "wires": [ + [ + "cdb5081e.c62b38", + "a5d36c9a.4d26a", + "2e6e9e5e.d18972" + ] + ] + }, + { + "id": "6419a04c.32704", + "type": "execute", + "name": "generate A1 Mediator URL 1", + "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.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_type_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1483.0042419433594, + "y": 227.0039050579071, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "f3275c75.b49b7", + "type": "record", + "name": "record", + "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 Get 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.policyinstance-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1430.0046348571777, + "y": 316.88250637054443, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + }, + { + "id": "e3d7b540.043a18", + "type": "execute", + "name": "generate A1 Mediator URL 2", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.restapi.policyinstance-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_instance_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-instance-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1489.2538757324219, + "y": 275.00391244888306, + "z": "9a83e9ac.8e87e8", + "wires": [ + [] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstances.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstances.json new file mode 100644 index 00000000..e56e22c5 --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyInstances.json @@ -0,0 +1,593 @@ +[ + { + "id": "ec032236.b7a57", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 179.00390625, + "y": 144.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "21fb48ea.c20258" + ] + ] + }, + { + "id": "21fb48ea.c20258", + "type": "method", + "name": "method getPolicyInstances", + "xml": "<method rpc='getPolicyInstances' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 240.00390625, + "y": 264.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "d720c111.6c25c" + ] + ] + }, + { + "id": "7e7a0567.85988c", + "type": "record", + "name": "record", + "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=\"Get All Policy Instance from Near RT RIC ID and Policy Type ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-instances-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$get-policy-instances-input.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 704.00390625, + "y": 79.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "d720c111.6c25c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 445.00390625, + "y": 218.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "7e7a0567.85988c", + "75eb8d67.498124", + "f200a52d.0d0588", + "dab8aaba.ccc9c8", + "2d112420.4bbb3c" + ] + ] + }, + { + "id": "11949972.8a7e97", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 112.00390625, + "y": 80.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "ec032236.b7a57" + ] + ] + }, + { + "id": "75eb8d67.498124", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getPolicyInstances executed successfully' />", + "comments": "", + "x": 744.0039520263672, + "y": 133.00390720367432, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "f200a52d.0d0588", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 744.00390625, + "y": 186.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "dab8aaba.ccc9c8", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 694.00390625, + "y": 242.00390625, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "fd41c325.2c9ea", + "f27633b5.a9da6" + ] + ] + }, + { + "id": "f27633b5.a9da6", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 978.0039520263672, + "y": 102.00397157669067, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "9da3376b.3dd138" + ] + ] + }, + { + "id": "9da3376b.3dd138", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 955.0040016174316, + "y": 248.00392389297485, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "a8185ff4.a81ee" + ] + ] + }, + { + "id": "fd41c325.2c9ea", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 931.0039749145508, + "y": 537.0039677619934, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "6e9eb61d.8a4578" + ] + ] + }, + { + "id": "6e9eb61d.8a4578", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1146.0040130615234, + "y": 666.0039205551147, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "3caedb5f.a72044", + "441fe2c0.e1e7fc", + "c00c107b.52f55" + ] + ] + }, + { + "id": "3caedb5f.a72044", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Instances. Aborting\" />", + "comments": "", + "x": 1271.0037689208984, + "y": 747.0039050579071, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "a8185ff4.a81ee", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1149.0040130615234, + "y": 359.00391072034836, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "6ea37614.a6ad08", + "c6d4b2d.c900a5", + "f32ead23.ce141", + "e6186f85.a2b5f", + "aa8f25a3.941fd8" + ] + ] + }, + { + "id": "c6d4b2d.c900a5", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-instances-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$get-policy-instances-input.policy-type-id`\"/>", + "comments": "", + "x": 1486.0053405761719, + "y": 185.89303493499756, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "6ea37614.a6ad08", + "type": "record", + "name": "record", + "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 Get Policy Instances.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 1412.0039978027344, + "y": 233.0039005279541, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "f32ead23.ce141", + "type": "execute", + "name": "Get Policy Instances", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstances-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"true\"/>", + "comments": "", + "outputs": 1, + "x": 1426.0045166015625, + "y": 413.0143041610718, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "81763a3a.75e9a8", + "548c624e.550c4c" + ] + ] + }, + { + "id": "81763a3a.75e9a8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1402.0039367675781, + "y": 510.00401973724365, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "9d082013.fde13" + ] + ] + }, + { + "id": "548c624e.550c4c", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1646.0041809082031, + "y": 381.0039281845093, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "f1293484.0bc0b8" + ] + ] + }, + { + "id": "e45b7a63.5e3678", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Instances. Aborting\" />", + "comments": "", + "x": 1562.0045166015625, + "y": 617.0039892196655, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "f1293484.0bc0b8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1796.0037860870361, + "y": 345.00395822525024, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "d525c780.d9e1f8" + ] + ] + }, + { + "id": "d525c780.d9e1f8", + "type": "record", + "name": "record", + "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=\"List of A1 Policy Instances: \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>", + "comments": "", + "outputs": 1, + "x": 1976.0039100646973, + "y": 319.00390911102295, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "441fe2c0.e1e7fc", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1932.0040283203125, + "y": 714.0040578842163, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "98e62a34.70f008", + "c6fd62af.c7216", + "bec3e985.6b96c8" + ] + ] + }, + { + "id": "c6fd62af.c7216", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2281.0042266845703, + "y": 892.0034625530243, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "18ca6a8e.895005", + "5c7201b9.5f902" + ] + ] + }, + { + "id": "98e62a34.70f008", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstances'/>\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=\"Working On it\" />", + "comments": "", + "x": 2270.670944213867, + "y": 683.0040187835693, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "18ca6a8e.895005", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2496.5041122436523, + "y": 814.9207663536072, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "32a11aed.000606" + ] + ] + }, + { + "id": "5c7201b9.5f902", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2500.5040321350098, + "y": 953.920608997345, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "3f10fd46.bde0e2" + ] + ] + }, + { + "id": "32a11aed.000606", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2656.5039463043213, + "y": 816.9207673072815, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "af4fd183.8aab9" + ] + ] + }, + { + "id": "af4fd183.8aab9", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2838.503677368164, + "y": 807.9208431243896, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "3f10fd46.bde0e2", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2683.5036754608154, + "y": 946.920717716217, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "434607a6.ef8078" + ] + ] + }, + { + "id": "434607a6.ef8078", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2869.5038299560547, + "y": 934.9210414886475, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "bec3e985.6b96c8", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2279.504165649414, + "y": 774.4589986801147, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "c00c107b.52f55", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1347.0040588378906, + "y": 599.0039277076721, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "e2a14338.fa69e", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1721.757869720459, + "y": 446.00780391693115, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "2d112420.4bbb3c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 687.7578010559082, + "y": 856.0078420639038, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "b9d43aed.0e9ff8", + "441fe2c0.e1e7fc" + ] + ] + }, + { + "id": "b9d43aed.0e9ff8", + "type": "returnSuccess", + "name": "return success", + "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='getPolicyInstances executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n", + "comments": "", + "x": 837.7578449249268, + "y": 938.0078115463257, + "z": "b909beb3.a3f6a", + "wires": [] + }, + { + "id": "9d082013.fde13", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1548.0077781677246, + "y": 513.0078344345093, + "z": "b909beb3.a3f6a", + "wires": [ + [ + "e2a14338.fa69e", + "441fe2c0.e1e7fc", + "e45b7a63.5e3678" + ] + ] + }, + { + "id": "e6186f85.a2b5f", + "type": "execute", + "name": "generate A1 Mediator URL", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.policies`\"/>\n <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstances-url\"/>\n <parameter name=\"target\" value=\"{policy_type_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1475.0041198730469, + "y": 289.00391244888306, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + }, + { + "id": "aa8f25a3.941fd8", + "type": "record", + "name": "record", + "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 Get Policy Instances.\"/>\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.restapi.policyinstances-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1424.0046348571777, + "y": 349.88250637054443, + "z": "b909beb3.a3f6a", + "wires": [ + [] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyType.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyType.json new file mode 100644 index 00000000..fcfe11ec --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyType.json @@ -0,0 +1,629 @@ +[ + { + "id": "deb6b7ae.432f48", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 227.00390625, + "y": 105.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "42af6ba5.ed05e4" + ] + ] + }, + { + "id": "42af6ba5.ed05e4", + "type": "method", + "name": "method getPolicyType", + "xml": "<method rpc='getPolicyType' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 290.00391387939453, + "y": 228.00391578674316, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "7d583e57.3a038" + ] + ] + }, + { + "id": "14acd312.55d52d", + "type": "record", + "name": "record", + "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=\"Get Policy Type from Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$get-policy-type-input.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 755.0039329528809, + "y": 41.003905296325684, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "7d583e57.3a038", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 493.00390625, + "y": 179.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "14acd312.55d52d", + "278bea58.810416", + "9f2d6793.a34c08", + "656e0fe4.4c146", + "699ddeff.ea20c" + ] + ] + }, + { + "id": "71079a32.757f84", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 160.00390625, + "y": 41.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "deb6b7ae.432f48" + ] + ] + }, + { + "id": "278bea58.810416", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getPolicyTypes executed successfully' />", + "comments": "", + "x": 792.0040130615234, + "y": 94.00390434265137, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "9f2d6793.a34c08", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 792.00390625, + "y": 147.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "656e0fe4.4c146", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 742.00390625, + "y": 203.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "dca8b30a.68fdc", + "9120c0b9.1ccb5" + ] + ] + }, + { + "id": "9120c0b9.1ccb5", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1026.0039520263672, + "y": 63.003971576690674, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "c8aa8c79.ffc7b" + ] + ] + }, + { + "id": "c8aa8c79.ffc7b", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1003.0040016174316, + "y": 209.00392389297485, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "f87feba2.fca948" + ] + ] + }, + { + "id": "dca8b30a.68fdc", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 979.0039749145508, + "y": 498.0039677619934, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "3f2d9857.202c88" + ] + ] + }, + { + "id": "3f2d9857.202c88", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1194.0040130615234, + "y": 627.0039205551147, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "1628f3ec.4529fc", + "941815be.0e6418", + "af6e494e.eba298" + ] + ] + }, + { + "id": "1628f3ec.4529fc", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Type. Aborting\" />", + "comments": "", + "x": 1319.0037689208984, + "y": 708.0039050579071, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "f87feba2.fca948", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1197.0040130615234, + "y": 320.00391072034836, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "5d39225d.b5d86c", + "8bcf78cb.a45fa8", + "ec0ff476.077b18", + "adeac94f.c6b478", + "ca2401e.27b07" + ] + ] + }, + { + "id": "8bcf78cb.a45fa8", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-type-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$get-policy-type-input.policy-type-id`\"/>", + "comments": "", + "x": 1532.0054016113281, + "y": 159.89304208755493, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "5d39225d.b5d86c", + "type": "record", + "name": "record", + "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 Get Policy Type.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.policytype-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1459.0040550231934, + "y": 312.0039167404175, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "ec0ff476.077b18", + "type": "execute", + "name": "Get Policy Types", + "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=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"true\"/>", + "comments": "", + "outputs": 1, + "x": 1486.0045127868652, + "y": 383.01427364349365, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "6449f6f.dddf208", + "d6f09679.a01fe8" + ] + ] + }, + { + "id": "6449f6f.dddf208", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1450.0039367675781, + "y": 471.00401973724365, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "91104dd5.632de" + ] + ] + }, + { + "id": "d6f09679.a01fe8", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1694.0041809082031, + "y": 342.0039281845093, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "e81637cc.588ed8" + ] + ] + }, + { + "id": "d8c6f411.0c63d8", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Type. Aborting\" />", + "comments": "", + "x": 1610.0045166015625, + "y": 578.0039892196655, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "e81637cc.588ed8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1844.0037860870361, + "y": 306.00395822525024, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "a2df3924.7ce618" + ] + ] + }, + { + "id": "a2df3924.7ce618", + "type": "record", + "name": "record", + "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 Information \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp.*`\"/>", + "comments": "", + "outputs": 1, + "x": 2025.00390625, + "y": 283.00390911102295, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "941815be.0e6418", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1980.0040283203125, + "y": 675.0040578842163, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "1211b972.fe3cf7", + "3f01de14.4ed1b2", + "ffe957f0.991a38" + ] + ] + }, + { + "id": "3f01de14.4ed1b2", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2329.0042266845703, + "y": 853.0034625530243, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "a14ff319.1db5f", + "1fd03359.fc712d" + ] + ] + }, + { + "id": "1211b972.fe3cf7", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyType'/>\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=\"Working On it\" />", + "comments": "", + "x": 2318.670944213867, + "y": 644.0040187835693, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "a14ff319.1db5f", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2544.5041122436523, + "y": 775.9207663536072, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "1c603946.e2ec57" + ] + ] + }, + { + "id": "1fd03359.fc712d", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2548.5040321350098, + "y": 914.920608997345, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "f06f4733.197198" + ] + ] + }, + { + "id": "1c603946.e2ec57", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2704.5039463043213, + "y": 777.9207673072815, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "758bbaed.01d694" + ] + ] + }, + { + "id": "758bbaed.01d694", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2886.503677368164, + "y": 768.9208431243896, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "f06f4733.197198", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2731.5036754608154, + "y": 907.920717716217, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "f7ca92e4.64915" + ] + ] + }, + { + "id": "f7ca92e4.64915", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2917.5038299560547, + "y": 895.9210414886475, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "ffe957f0.991a38", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2327.504165649414, + "y": 735.4589986801147, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "af6e494e.eba298", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1397.0041275024414, + "y": 561.0039281845093, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "b95a43d4.018fc", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1773.7578506469727, + "y": 411.00782680511475, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "699ddeff.ea20c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 735.7578010559082, + "y": 817.0078420639038, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "12f7b185.4d91ee", + "941815be.0e6418" + ] + ] + }, + { + "id": "12f7b185.4d91ee", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 885.7578449249268, + "y": 899.0078115463257, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "91104dd5.632de", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1598.0078468322754, + "y": 477.0078339576721, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [ + "b95a43d4.018fc", + "941815be.0e6418", + "d8c6f411.0c63d8" + ] + ] + }, + { + "id": "9b40ce31.b3a69", + "type": "set", + "name": "set tmp variables for input RPC parms", + "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`\"/>", + "comments": "", + "x": 219.00390625, + "y": 470.00390625, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "adeac94f.c6b478", + "type": "execute", + "name": "generate A1 Mediator URL", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 1527.0033569335938, + "y": 259.12530422210693, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "a2adb928.6c9c98", + "type": "record", + "name": "record", + "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`\"/>", + "comments": "", + "outputs": 1, + "x": 174.0029296875, + "y": 643.1148071289062, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + }, + { + "id": "a095d160.04b79", + "type": "set", + "name": "set A1Mediator payload manually", + "xml": "<set>\n<parameter name=\"tmp.a1-mediator-restapi.payload\" value='{\"blocking_rate\": 20,\"enforce\": true,\"trigger_threshold\": 10,\"window_length\": 10}'/>", + "comments": "", + "x": 221.0029296875, + "y": 586.1148071289062, + "z": "4e8e4e8b.e7eb7", + "wires": [] + }, + { + "id": "ca2401e.27b07", + "type": "record", + "name": "record", + "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 Get Policy Type.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>", + "comments": "", + "outputs": 1, + "x": 1463.0038719177246, + "y": 210.00391292572021, + "z": "4e8e4e8b.e7eb7", + "wires": [ + [] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyTypes.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyTypes.json new file mode 100644 index 00000000..b134c19d --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getPolicyTypes.json @@ -0,0 +1,563 @@ +[ + { + "id": "59c2dfd4.8abe9", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 180.00390625, + "y": 101.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "7af1d8df.20fb98" + ] + ] + }, + { + "id": "7af1d8df.20fb98", + "type": "method", + "name": "method getPolicyTypes", + "xml": "<method rpc='getPolicyTypes' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 241.00390625, + "y": 221.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "b15010d5.15696" + ] + ] + }, + { + "id": "a1c2f906.421c18", + "type": "record", + "name": "record", + "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=\"Get All Policy Types from Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-types-input.near-rt-ric-id`\"/>", + "comments": "", + "outputs": 1, + "x": 705.00390625, + "y": 36.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "b15010d5.15696", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 446.00390625, + "y": 175.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "a1c2f906.421c18", + "da9b1969.ac6b58", + "2640d848.80bbb8", + "2b968baf.6ed334", + "78f940aa.11fce" + ] + ] + }, + { + "id": "df08bd9f.55af9", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 113.00390625, + "y": 37.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "59c2dfd4.8abe9" + ] + ] + }, + { + "id": "da9b1969.ac6b58", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getPolicyTypes executed successfully' />", + "comments": "", + "x": 745.0039520263672, + "y": 90.00390720367432, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "2640d848.80bbb8", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 745.00390625, + "y": 143.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "2b968baf.6ed334", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 695.00390625, + "y": 199.00390625, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "3ce1cda5.28ff92", + "787a0ceb.e039b4" + ] + ] + }, + { + "id": "787a0ceb.e039b4", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 979.0039520263672, + "y": 59.003971576690674, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "f952e955.833d08" + ] + ] + }, + { + "id": "f952e955.833d08", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 956.0040016174316, + "y": 205.00392389297485, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "cbd67155.db51b" + ] + ] + }, + { + "id": "3ce1cda5.28ff92", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 932.0039749145508, + "y": 494.0039677619934, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "e8dd7987.9127e8" + ] + ] + }, + { + "id": "e8dd7987.9127e8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1147.0040130615234, + "y": 623.0039205551147, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "a7a142e7.93988", + "5e2ec2ff.98aacc", + "9143fd0a.5fd1f" + ] + ] + }, + { + "id": "a7a142e7.93988", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Types. Aborting\" />", + "comments": "", + "x": 1272.0037689208984, + "y": 704.0039050579071, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "cbd67155.db51b", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1150.0040130615234, + "y": 316.00391072034836, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "40b30f7a.5851c", + "37a98276.7f1bee", + "8ae6d3fc.6de4" + ] + ] + }, + { + "id": "37a98276.7f1bee", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-types-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.restapi.getPolicyTypes-url\" value=\"`$prop.restapi.policytypes`\"/>", + "comments": "", + "x": 1520.005283355713, + "y": 250.89303016662598, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "40b30f7a.5851c", + "type": "record", + "name": "record", + "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 Get Policy Types.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.getPolicyTypes-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1409.0039367675781, + "y": 304.00390911102295, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "8ae6d3fc.6de4", + "type": "execute", + "name": "Get Policy Types", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.getPolicyTypes-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"true\"/>", + "comments": "", + "outputs": 1, + "x": 1445.0045471191406, + "y": 387.0142889022827, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "f0fde675.5fc208", + "ea57a120.aefb9" + ] + ] + }, + { + "id": "f0fde675.5fc208", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1403.0039367675781, + "y": 467.00401973724365, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "47280ee8.91324" + ] + ] + }, + { + "id": "ea57a120.aefb9", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1647.0041809082031, + "y": 338.0039281845093, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "91c7cc22.f50fa" + ] + ] + }, + { + "id": "6ad346e1.874668", + "type": "returnFailure", + "name": "return failure", + "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 in Getting A1 Policy Types. Aborting\" />", + "comments": "", + "x": 1563.0045166015625, + "y": 574.0039892196655, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "91c7cc22.f50fa", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1797.0037860870361, + "y": 302.00395822525024, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "b0927297.5c798" + ] + ] + }, + { + "id": "b0927297.5c798", + "type": "record", + "name": "record", + "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=\"List of A1 Policy Types: \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>", + "comments": "", + "outputs": 1, + "x": 1977.0039100646973, + "y": 276.00390911102295, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "5e2ec2ff.98aacc", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1933.0040283203125, + "y": 671.0040578842163, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "19f09b1f.ef68a5", + "c85abe4e.04981", + "6e7b36c6.941d68" + ] + ] + }, + { + "id": "c85abe4e.04981", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2282.0042266845703, + "y": 849.0034625530243, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "778c6b4c.d4c124", + "4e9a9c42.7e1bc4" + ] + ] + }, + { + "id": "19f09b1f.ef68a5", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyTypes'/>\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=\"`$a1MediatorRsp`\" />", + "comments": "", + "x": 2271.670944213867, + "y": 640.0040187835693, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "778c6b4c.d4c124", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2497.5041122436523, + "y": 771.9207663536072, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "63bc20b5.f1da2" + ] + ] + }, + { + "id": "4e9a9c42.7e1bc4", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2501.5040321350098, + "y": 910.920608997345, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "76ba37c0.8c4108" + ] + ] + }, + { + "id": "63bc20b5.f1da2", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2657.5039463043213, + "y": 773.9207673072815, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "f50721b0.4e107" + ] + ] + }, + { + "id": "f50721b0.4e107", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2839.503677368164, + "y": 764.9208431243896, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "76ba37c0.8c4108", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2684.5036754608154, + "y": 903.920717716217, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "7bc04bf1.7e7834" + ] + ] + }, + { + "id": "7bc04bf1.7e7834", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2870.5038299560547, + "y": 891.9210414886475, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "6e7b36c6.941d68", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2280.504165649414, + "y": 731.4589986801147, + "z": "4c7efb80.7cead4", + "wires": [ + [] + ] + }, + { + "id": "9143fd0a.5fd1f", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1348.0040588378906, + "y": 556.0039277076721, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "bd7fd084.d14a1", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1722.757869720459, + "y": 403.00780391693115, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "78f940aa.11fce", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 688.7578010559082, + "y": 813.0078420639038, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "4c3d7914.2ada48", + "5e2ec2ff.98aacc" + ] + ] + }, + { + "id": "4c3d7914.2ada48", + "type": "returnSuccess", + "name": "return success", + "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", + "comments": "", + "x": 838.7578449249268, + "y": 895.0078115463257, + "z": "4c7efb80.7cead4", + "wires": [] + }, + { + "id": "47280ee8.91324", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1549.0077781677246, + "y": 470.0078344345093, + "z": "4c7efb80.7cead4", + "wires": [ + [ + "bd7fd084.d14a1", + "5e2ec2ff.98aacc", + "6ad346e1.874668" + ] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getStatus.json b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getStatus.json new file mode 100644 index 00000000..300868d0 --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/json/A1-ADAPTER-API_getStatus.json @@ -0,0 +1,608 @@ +[ + { + "id": "3c3a2ad2.f07166", + "type": "service-logic", + "name": "A1-ADAPTER-API ${project.version}", + "module": "A1-ADAPTER-API", + "version": "${project.version}", + "comments": "", + "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}'>", + "outputs": 1, + "x": 197.00390625, + "y": 119.00390625, + "z": "9552257b.e12f18", + "wires": [ + [ + "74ad4fbc.157c" + ] + ] + }, + { + "id": "74ad4fbc.157c", + "type": "method", + "name": "method getStatus", + "xml": "<method rpc='getStatus' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 258.00390625, + "y": 239.00390625, + "z": "9552257b.e12f18", + "wires": [ + [ + "c0d4359e.2a6258" + ] + ] + }, + { + "id": "7a8ce664.bcc1c8", + "type": "record", + "name": "record", + "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=\"Get status of Policy Instance associated with Near RT RIC ID and Policy Type ID\"/>\n<parameter name=\"field2\" value=\"`$get-status-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$get-status-input.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$get-status-input.policy-instance-id`\"/>", + "comments": "", + "outputs": 1, + "x": 722.00390625, + "y": 54.00390625, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "c0d4359e.2a6258", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 463.00390625, + "y": 193.00390625, + "z": "9552257b.e12f18", + "wires": [ + [ + "7a8ce664.bcc1c8", + "dc6fba67.8ffaa8", + "37a3fd8a.4c4282", + "a8ad4a87.1a43b8", + "1adcc935.c5c347" + ] + ] + }, + { + "id": "2f0dcd2b.7b79c2", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 130.00390625, + "y": 55.00390625, + "z": "9552257b.e12f18", + "wires": [ + [ + "3c3a2ad2.f07166" + ] + ] + }, + { + "id": "dc6fba67.8ffaa8", + "type": "set", + "name": "set default status value", + "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getStatus executed successfully' />", + "comments": "", + "x": 762.0039520263672, + "y": 108.00390720367432, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "37a3fd8a.4c4282", + "type": "execute", + "name": "execute Properties", + "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", + "comments": "", + "outputs": 1, + "x": 762.00390625, + "y": 161.00390625, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "a8ad4a87.1a43b8", + "type": "switchNode", + "name": "A1 Mediator Deployed", + "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n", + "comments": "", + "outputs": 1, + "x": 712.00390625, + "y": 217.00390625, + "z": "9552257b.e12f18", + "wires": [ + [ + "f7c78ac8.3c1058", + "c469f2b7.09aa3" + ] + ] + }, + { + "id": "c469f2b7.09aa3", + "type": "outcome", + "name": "Deployed", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 996.0039520263672, + "y": 77.00397157669067, + "z": "9552257b.e12f18", + "wires": [ + [ + "57b7da77.8ef044" + ] + ] + }, + { + "id": "57b7da77.8ef044", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 973.0040016174316, + "y": 223.00392389297485, + "z": "9552257b.e12f18", + "wires": [ + [ + "6b5593ee.2a34bc" + ] + ] + }, + { + "id": "f7c78ac8.3c1058", + "type": "outcome", + "name": "Not Deployed", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 949.0039749145508, + "y": 512.0039677619934, + "z": "9552257b.e12f18", + "wires": [ + [ + "c641e0cc.9d7f" + ] + ] + }, + { + "id": "c641e0cc.9d7f", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1164.0040130615234, + "y": 641.0039205551147, + "z": "9552257b.e12f18", + "wires": [ + [ + "5bdef8d5.553548", + "15cefea7.d2def1", + "6dfd6f84.cc9c8" + ] + ] + }, + { + "id": "5bdef8d5.553548", + "type": "returnFailure", + "name": "return failure", + "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 in getting status for A1 Policy Instance. Aborting\" />", + "comments": "", + "x": 1294.0038299560547, + "y": 722.0039048194885, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "6b5593ee.2a34bc", + "type": "block", + "name": "A1 Mediator RestAPI Invocation", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1167.0040130615234, + "y": 334.00391072034836, + "z": "9552257b.e12f18", + "wires": [ + [ + "c2d8e6b5.f504d8", + "f356d787.c7f2e8", + "c564e7c.a479218", + "655080be.208e2", + "4e461392.18bdfc", + "6030c496.ec537c" + ] + ] + }, + { + "id": "f356d787.c7f2e8", + "type": "set", + "name": "set tmp variables for A1 Mediator REST API call", + "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-status-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$get-status-input.policy-type-id`\"/>\n<parameter name=\"tmp.policy-instance-id\" value=\"`$get-status-input.policy-instance-id`\"/>\n", + "comments": "", + "x": 1505.00537109375, + "y": 131.8930368423462, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "c2d8e6b5.f504d8", + "type": "record", + "name": "record", + "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 Getting status for 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`\"/>", + "comments": "", + "outputs": 1, + "x": 1426.0040016174316, + "y": 185.00390911102295, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "c564e7c.a479218", + "type": "execute", + "name": "Get status for Policy Instance", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"false\"/>", + "comments": "", + "outputs": 1, + "x": 1444.0045166015625, + "y": 388.0143041610718, + "z": "9552257b.e12f18", + "wires": [ + [ + "ccced85.7777228", + "f2c317e4.c0a588" + ] + ] + }, + { + "id": "ccced85.7777228", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1420.0039367675781, + "y": 485.00401973724365, + "z": "9552257b.e12f18", + "wires": [ + [ + "e3a55242.ba0f8" + ] + ] + }, + { + "id": "f2c317e4.c0a588", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1664.0041809082031, + "y": 356.0039281845093, + "z": "9552257b.e12f18", + "wires": [ + [ + "58943e05.6cd2c" + ] + ] + }, + { + "id": "68c4a72e.2d8038", + "type": "returnFailure", + "name": "return failure", + "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 in Getting status for A1 Policy Instance. Aborting\" />", + "comments": "", + "x": 1580.0045166015625, + "y": 592.0039892196655, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "58943e05.6cd2c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1814.0037860870361, + "y": 320.00395822525024, + "z": "9552257b.e12f18", + "wires": [ + [ + "1e2eb507.6b9d3b" + ] + ] + }, + { + "id": "1e2eb507.6b9d3b", + "type": "record", + "name": "record", + "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=\"Status of A1 Policy Instance \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>", + "comments": "", + "outputs": 1, + "x": 1994.0039100646973, + "y": 294.00390911102295, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "15cefea7.d2def1", + "type": "block", + "name": "DMAAP Reponse Publish", + "xml": "<block atomic='true'>", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1950.0040283203125, + "y": 689.0040578842163, + "z": "9552257b.e12f18", + "wires": [ + [ + "c4c2287c.45f668", + "ef09f7c9.e46938", + "ea077f87.6cf36" + ] + ] + }, + { + "id": "ef09f7c9.e46938", + "type": "execute", + "name": "execute DmaapMsg", + "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' />", + "comments": "", + "outputs": 1, + "x": 2299.0042266845703, + "y": 867.0034625530243, + "z": "9552257b.e12f18", + "wires": [ + [ + "56d4b2fa.e81c7c", + "4e9872e.f9bfd8c" + ] + ] + }, + { + "id": "c4c2287c.45f668", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getStatus'/>\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=\"Working On it\" />", + "comments": "", + "x": 2288.670944213867, + "y": 658.0040187835693, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "56d4b2fa.e81c7c", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 2514.5041122436523, + "y": 789.9207663536072, + "z": "9552257b.e12f18", + "wires": [ + [ + "5d41321f.9b1c6c" + ] + ] + }, + { + "id": "4e9872e.f9bfd8c", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 2518.5040321350098, + "y": 928.920608997345, + "z": "9552257b.e12f18", + "wires": [ + [ + "6c4b1d08.1e7724" + ] + ] + }, + { + "id": "5d41321f.9b1c6c", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2674.5039463043213, + "y": 791.9207673072815, + "z": "9552257b.e12f18", + "wires": [ + [ + "b2cf39d7.1c7108" + ] + ] + }, + { + "id": "b2cf39d7.1c7108", + "type": "returnFailure", + "name": "return failure", + "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. \" />", + "comments": "", + "x": 2856.503677368164, + "y": 782.9208431243896, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "6c4b1d08.1e7724", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 2701.5036754608154, + "y": 921.920717716217, + "z": "9552257b.e12f18", + "wires": [ + [ + "45e70b37.809a64" + ] + ] + }, + { + "id": "45e70b37.809a64", + "type": "record", + "name": "record", + "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 \"/>", + "comments": "", + "outputs": 1, + "x": 2887.5038299560547, + "y": 909.9210414886475, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "ea077f87.6cf36", + "type": "record", + "name": "record", + "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\" />\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`\" />", + "comments": "", + "outputs": 1, + "x": 2297.504165649414, + "y": 749.4589986801147, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "6dfd6f84.cc9c8", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n", + "comments": "", + "x": 1344.0041160583496, + "y": 575.0038986206055, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "ed51b6d5.6a78a8", + "type": "set", + "name": "set", + "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n", + "comments": "", + "x": 1739.757869720459, + "y": 421.00780391693115, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "1adcc935.c5c347", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 705.7578010559082, + "y": 831.0078420639038, + "z": "9552257b.e12f18", + "wires": [ + [ + "d837205f.9c11d", + "15cefea7.d2def1" + ] + ] + }, + { + "id": "d837205f.9c11d", + "type": "returnSuccess", + "name": "return success", + "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='getStatus executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n", + "comments": "", + "x": 860.7578887939453, + "y": 915.0078468322754, + "z": "9552257b.e12f18", + "wires": [] + }, + { + "id": "e3a55242.ba0f8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1566.0077781677246, + "y": 488.0078344345093, + "z": "9552257b.e12f18", + "wires": [ + [ + "ed51b6d5.6a78a8", + "15cefea7.d2def1", + "68c4a72e.2d8038" + ] + ] + }, + { + "id": "655080be.208e2", + "type": "execute", + "name": "generate A1 Mediator URL 1", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.policystatus`\"/>\n <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_type_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1502.0044250488281, + "y": 233.00390911102295, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "4e461392.18bdfc", + "type": "record", + "name": "record", + "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 getting status for 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.policyinstance-url`\"/>", + "comments": "", + "outputs": 1, + "x": 1442.0046348571777, + "y": 324.88250637054443, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + }, + { + "id": "6030c496.ec537c", + "type": "execute", + "name": "generate A1 Mediator URL 2", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.restapi.policyinstance-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstance-url\"/>\n <parameter name=\"target\" value=\"{policy_instance_id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.policy-instance-id`\"/>\n", + "comments": "", + "outputs": 1, + "x": 1501.2538757324219, + "y": 283.00391244888306, + "z": "9552257b.e12f18", + "wires": [ + [] + ] + } +]
\ No newline at end of file |