Bug Fix- Updated the http response code/ response message
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_putA1Policy.json
index 419d5b7..293d09c 100644 (file)
@@ -1,6 +1,6 @@
 [
     {
-        "id": "270a5aa5.bc52d6",
+        "id": "f0b343f7.2be9e",
         "type": "service-logic",
         "name": "A1-ADAPTER-API ${project.version}",
         "module": "A1-ADAPTER-API",
@@ -9,46 +9,46 @@
         "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": 171,
-        "y": 150,
-        "z": "33919dc9.0e17ba",
+        "y": 158.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "187cb7f8.135d08"
+                "2678a73a.39c8f8"
             ]
         ]
     },
     {
-        "id": "187cb7f8.135d08",
+        "id": "2678a73a.39c8f8",
         "type": "method",
         "name": "method putA1Policy",
         "xml": "<method rpc='putA1Policy' mode='sync'>\n",
         "comments": "",
         "outputs": 1,
         "x": 158,
-        "y": 219,
-        "z": "33919dc9.0e17ba",
+        "y": 227.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "60165fbc.5b22d8"
+                "d272b5cc.a1b7f8"
             ]
         ]
     },
     {
-        "id": "ca1b73bb.bd73a",
+        "id": "12301d8a.e4f432",
         "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=\"Put A1 Policy :\"/>\n<parameter name=\"field2\" value=\"`$put-a1-policy-input.near-rt-ric-url`\"/>\n<parameter name=\"field3\" value=\"`$put-a1-policy-input.body`\"/>\n",
         "comments": "",
         "outputs": 1,
         "x": 472,
-        "y": 187,
-        "z": "33919dc9.0e17ba",
+        "y": 195.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             []
         ]
     },
     {
-        "id": "60165fbc.5b22d8",
+        "id": "d272b5cc.a1b7f8",
         "type": "block",
         "name": "block : atomic",
         "xml": "<block atomic='true'>",
         "comments": "",
         "outputs": 1,
         "x": 222,
-        "y": 286,
-        "z": "33919dc9.0e17ba",
+        "y": 294.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "ca1b73bb.bd73a",
-                "3bda5968.b55f7e",
-                "a7fa8c3e.f91198",
-                "d671108f.2dd19"
+                "12301d8a.e4f432",
+                "bc37eadd.393f78",
+                "f048e341.89262",
+                "71eb89dc.50c988"
             ]
         ]
     },
     {
-        "id": "86499c8c.9221c",
+        "id": "3f8d81.fa4c128",
         "type": "dgstart",
         "name": "DGSTART",
         "outputs": 1,
         "x": 99,
-        "y": 88,
-        "z": "33919dc9.0e17ba",
+        "y": 96.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "270a5aa5.bc52d6"
+                "f0b343f7.2be9e"
             ]
         ]
     },
     {
-        "id": "3bda5968.b55f7e",
+        "id": "bc37eadd.393f78",
         "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": 506,
-        "y": 285,
-        "z": "33919dc9.0e17ba",
+        "y": 293.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             []
         ]
     },
     {
-        "id": "f71250c1.d2e79",
+        "id": "7ab1678d.f80c88",
         "type": "failure",
         "name": "failure",
         "xml": "<outcome value='failure'>\n",
         "comments": "",
         "outputs": 1,
         "x": 988.0001220703125,
-        "y": 363.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "y": 371.1109619140625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "424bcc5a.68059c"
+                "3fb495cc.83461a"
             ]
         ]
     },
     {
-        "id": "678803c.a1c0efc",
+        "id": "95b564a6.d15fe8",
         "type": "success",
         "name": "success",
         "xml": "<outcome value='success'>\n",
         "comments": "",
         "outputs": 1,
         "x": 995.0003051757812,
-        "y": 453.0000457763672,
-        "z": "33919dc9.0e17ba",
+        "y": 461.11094665527344,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "d61f47fe.10e5e8"
+                "433e6f59.30f93"
             ]
         ]
     },
     {
-        "id": "d61f47fe.10e5e8",
+        "id": "433e6f59.30f93",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "comments": "",
         "outputs": 1,
         "x": 1136.9999389648438,
-        "y": 449.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "y": 457.1109619140625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "44bf0d67.60023c"
+                "7ae91a72.664794",
+                "913c45bf.182ef8"
             ]
         ]
     },
     {
-        "id": "b1b2cbaf.574838",
+        "id": "a42156e5.b04b38",
         "type": "set",
         "name": "set tmp variables for input RPC parms",
         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$put-a1-policy-input.near-rt-ric-url`\"/>\n<parameter name=\"tmp.body\" value=\"`$put-a1-policy-input.body`\"/>",
         "comments": "",
-        "x": 884.0010375976562,
-        "y": 239.88909912109375,
-        "z": "33919dc9.0e17ba",
+        "x": 890.0010375976562,
+        "y": 20,
+        "z": "4a7b9942.c07f28",
         "wires": []
     },
     {
-        "id": "1fe61572.90f523",
+        "id": "382bcbbf.30d774",
         "type": "execute",
         "name": "Put A1 Policy",
         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$tmp.near-rt-ric-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.body`\"/>\n<parameter name=\"convertResponse\" value=\"false\"/>\n",
         "comments": "",
         "outputs": 1,
         "x": 811.00048828125,
-        "y": 411.0103759765625,
-        "z": "33919dc9.0e17ba",
+        "y": 419.12127685546875,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "f71250c1.d2e79",
-                "678803c.a1c0efc"
+                "7ab1678d.f80c88",
+                "95b564a6.d15fe8"
             ]
         ]
     },
     {
-        "id": "d671108f.2dd19",
+        "id": "71eb89dc.50c988",
         "type": "block",
         "name": "A1 Mediator RestAPI Invocation",
         "xml": "<block atomic='true'>",
         "comments": "",
         "outputs": 1,
         "x": 542.0000305175781,
-        "y": 350.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "y": 358.1109619140625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "8d62fd00.aa56e",
-                "b1b2cbaf.574838",
-                "1fe61572.90f523"
+                "33f22af5.30a6a6",
+                "a42156e5.b04b38",
+                "382bcbbf.30d774",
+                "f58a390e.bb1448"
             ]
         ]
     },
     {
-        "id": "8d62fd00.aa56e",
+        "id": "33f22af5.30a6a6",
         "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 Put A1 Policy.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>\n<parameter name=\"field3\" value=\"`$tmp.body`\"/>",
         "comments": "",
         "outputs": 1,
-        "x": 807.0000610351562,
-        "y": 335,
-        "z": "33919dc9.0e17ba",
+        "x": 792.0000610351562,
+        "y": 373.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             []
         ]
     },
     {
-        "id": "44bf0d67.60023c",
+        "id": "7ae91a72.664794",
         "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 Created.\"/>",
+        "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 Created.\"/>\n<parameter name='field2' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='field3' value='`$a1MediatorRsp.response-message`'/>",
         "comments": "",
         "outputs": 1,
         "x": 1293,
-        "y": 448.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "y": 456.1109619140625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             []
         ]
     },
     {
-        "id": "a0360147.468f3",
+        "id": "2a1d66c6.e2c83a",
         "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. Aborting A1 Policy creation\" />",
+        "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>",
         "comments": "",
         "x": 1286,
-        "y": 401,
-        "z": "33919dc9.0e17ba",
+        "y": 409.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": []
     },
     {
-        "id": "a7fa8c3e.f91198",
+        "id": "f048e341.89262",
         "type": "set",
         "name": "set default status value",
         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Put A1 Policy executed successfully' />",
         "comments": "",
         "x": 517,
-        "y": 240,
-        "z": "33919dc9.0e17ba",
+        "y": 248.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": []
     },
     {
-        "id": "424bcc5a.68059c",
+        "id": "3fb495cc.83461a",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "comments": "",
         "outputs": 1,
         "x": 1124,
-        "y": 361,
-        "z": "33919dc9.0e17ba",
+        "y": 369.11090087890625,
+        "z": "4a7b9942.c07f28",
         "wires": [
             [
-                "b8ca1bb9.7870e",
-                "a0360147.468f3"
+                "2b1ad7ca.a27288",
+                "2a1d66c6.e2c83a"
             ]
         ]
     },
     {
-        "id": "b8ca1bb9.7870e",
+        "id": "2b1ad7ca.a27288",
         "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",
+        "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>\n",
         "comments": "",
         "x": 1268,
-        "y": 307,
-        "z": "33919dc9.0e17ba",
+        "y": 315.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": []
+    },
+    {
+        "id": "4e18beb6.1fd51",
+        "type": "execute",
+        "name": "split near-rt-ric URL",
+        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n    <parameter name=\"original_string\" value=\"`$tmp.near-rt-ric-url`\" />\n    <parameter name=\"regex\" value=\"/\"/>\n    <parameter name=\"ctx_memory_result_key\" value=\"tmp.near-rt-ric-url-splitList\"/>",
+        "comments": "",
+        "outputs": 1,
+        "x": 1840,
+        "y": 136.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "942f87e2.c78888",
+        "type": "for",
+        "name": "for",
+        "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",
+        "comments": "",
+        "outputs": 1,
+        "x": 1806,
+        "y": 206.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "d1411417.1b3fd8"
+            ]
+        ]
+    },
+    {
+        "id": "d1411417.1b3fd8",
+        "type": "execute",
+        "name": "set concat url",
+        "xml": "<set>\n<parameter name='tmp.proxy-url' value=\"`$tmp.proxy-url +'/' + $tmp.near-rt-ric-url-splitList[$idx] `\" />\n\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1984,
+        "y": 206.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "71b2d26a.47135c",
+        "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=\"Put A1 Policy: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1806,
+        "y": 263.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "65d0298a.e1aef8",
+        "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=\"Put A1 Policy: No proxy found on properties file \"/>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1610,
+        "y": 172.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "500c1a89.8dca64",
+        "type": "block",
+        "name": "block",
+        "xml": "<block>\n",
+        "atomic": "false",
+        "comments": "",
+        "outputs": 1,
+        "x": 1602,
+        "y": 240.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "4e18beb6.1fd51",
+                "942f87e2.c78888",
+                "71b2d26a.47135c",
+                "1970005a.3ee34"
+            ]
+        ]
+    },
+    {
+        "id": "1970005a.3ee34",
+        "type": "set",
+        "name": "set variables for A1 Mediator with proxy url",
+        "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$tmp.proxy-url`\"/>",
+        "comments": "",
+        "x": 1916,
+        "y": 319.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": []
+    },
+    {
+        "id": "31a126f2.88900a",
+        "type": "outcome",
+        "name": "No proxy URL",
+        "xml": "<outcome value=''>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1442,
+        "y": 172.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "65d0298a.e1aef8"
+            ]
+        ]
+    },
+    {
+        "id": "3f7e5430.1f4f6c",
+        "type": "outcome",
+        "name": "Otherwise",
+        "xml": "<outcome value='Other'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1438,
+        "y": 240.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "500c1a89.8dca64"
+            ]
+        ]
+    },
+    {
+        "id": "7ec42ee0.b7f28",
+        "type": "set",
+        "name": "set tmp url variables with proxy information",
+        "xml": "<set>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",
+        "comments": "",
+        "x": 1381,
+        "y": 48.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": []
+    },
+    {
+        "id": "c930a111.4cc59",
+        "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=\"Put A1 Policy: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1264,
+        "y": 123.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "bbe2ee18.70915",
+        "type": "switchNode",
+        "name": "switch",
+        "xml": "<switch test='`$tmp.proxy-url`'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1263,
+        "y": 206.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "31a126f2.88900a",
+                "3f7e5430.1f4f6c"
+            ]
+        ]
+    },
+    {
+        "id": "f58a390e.bb1448",
+        "type": "block",
+        "name": "block Substitute proxy address if available",
+        "xml": "<block>\n",
+        "atomic": "false",
+        "comments": "",
+        "outputs": 1,
+        "x": 926,
+        "y": 205.11090087890625,
+        "z": "4a7b9942.c07f28",
+        "wires": [
+            [
+                "7ec42ee0.b7f28",
+                "c930a111.4cc59",
+                "bbe2ee18.70915"
+            ]
+        ]
+    },
+    {
+        "id": "913c45bf.182ef8",
+        "type": "set",
+        "name": "set",
+        "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>",
+        "comments": "",
+        "x": 1308,
+        "y": 514,
+        "z": "4a7b9942.c07f28",
         "wires": []
     }
 ]
\ No newline at end of file