HTTPS Proxy support for A1 adapter southbound
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyStatus.json
index 14b08a8..85db3a5 100644 (file)
@@ -1,6 +1,6 @@
 [
     {
-        "id": "792b8892.64457",
+        "id": "7547a4fa.c7bbcc",
         "type": "service-logic",
         "name": "A1-ADAPTER-API ${project.version}",
         "module": "A1-ADAPTER-API",
         "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": 167,
-        "y": 179,
-        "z": "6c2cfe41.61b868",
+        "x": 172,
+        "y": 213,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "11f7d7b8.1b7cb8"
+                "1108b3bd.2f6f4c"
             ]
         ]
     },
     {
-        "id": "11f7d7b8.1b7cb8",
+        "id": "1108b3bd.2f6f4c",
         "type": "method",
         "name": "method getA1PolicyStatus",
         "xml": "<method rpc='getA1PolicyStatus' mode='sync'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 226,
-        "y": 300,
-        "z": "6c2cfe41.61b868",
+        "x": 231,
+        "y": 334,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "ea8cdc1c.7ad76"
+                "423ee9ab.f84d58"
             ]
         ]
     },
     {
-        "id": "606404ab.821cbc",
+        "id": "86ab57c6.4239e8",
         "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 A1 Policy Status:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-status-input.near-rt-ric-url`\"/>",
         "comments": "",
         "outputs": 1,
-        "x": 690,
-        "y": 114,
-        "z": "6c2cfe41.61b868",
+        "x": 695,
+        "y": 148,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
     },
     {
-        "id": "ea8cdc1c.7ad76",
+        "id": "423ee9ab.f84d58",
         "type": "block",
         "name": "block : atomic",
         "xml": "<block atomic='true'>",
         "atomic": "true",
         "comments": "",
         "outputs": 1,
-        "x": 431,
-        "y": 254,
-        "z": "6c2cfe41.61b868",
+        "x": 436,
+        "y": 288,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "606404ab.821cbc",
-                "722eabeb.6d1a7c",
-                "1786ef85.c617a8",
-                "9795ae5f.c333",
-                "1c69a7a7.5059e"
+                "86ab57c6.4239e8",
+                "377e4bc4.cf6254",
+                "d0dee2e1.f5a44",
+                "2064dc6c.f4a0b4",
+                "7b79073a.3842e8"
             ]
         ]
     },
     {
-        "id": "90a09247.4437",
+        "id": "9743b8a8.158568",
         "type": "dgstart",
         "name": "DGSTART",
         "outputs": 1,
-        "x": 98,
-        "y": 116,
-        "z": "6c2cfe41.61b868",
+        "x": 103,
+        "y": 150,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "792b8892.64457"
+                "7547a4fa.c7bbcc"
             ]
         ]
     },
     {
-        "id": "722eabeb.6d1a7c",
+        "id": "377e4bc4.cf6254",
         "type": "set",
         "name": "set default status value",
         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Get A1 Policy executed successfully' />",
         "comments": "",
-        "x": 731.0000610351562,
-        "y": 169,
-        "z": "6c2cfe41.61b868",
+        "x": 736.0000610351562,
+        "y": 203,
+        "z": "ba6f4cc8.60e08",
         "wires": []
     },
     {
-        "id": "1786ef85.c617a8",
+        "id": "d0dee2e1.f5a44",
         "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": 730,
-        "y": 222,
-        "z": "6c2cfe41.61b868",
+        "x": 735,
+        "y": 256,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
     },
     {
-        "id": "1c69a7a7.5059e",
+        "id": "7b79073a.3842e8",
         "type": "block",
         "name": "A1 Mediator RestAPI Invocation",
         "xml": "<block atomic='true'>",
         "atomic": "true",
         "comments": "",
         "outputs": 1,
-        "x": 760.0001220703125,
-        "y": 306,
-        "z": "6c2cfe41.61b868",
+        "x": 765.0001220703125,
+        "y": 340,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "350bef62.ead7a",
-                "42b67c54.7a5fc4",
-                "3c854250.ea03ce"
+                "f6e87f8b.c8e97",
+                "484e89c8.8a2518",
+                "106aff5e.8841f1",
+                "7df3b9b5.9298c8"
             ]
         ]
     },
     {
-        "id": "42b67c54.7a5fc4",
+        "id": "484e89c8.8a2518",
         "type": "set",
         "name": "set tmp variables for A1 Mediator REST API call",
         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$get-a1-policy-status-input.near-rt-ric-url`\"/>",
         "comments": "",
-        "x": 1122.00146484375,
-        "y": 198.88912963867188,
-        "z": "6c2cfe41.61b868",
+        "x": 1138.00146484375,
+        "y": 237.88912963867188,
+        "z": "ba6f4cc8.60e08",
         "wires": []
     },
     {
-        "id": "350bef62.ead7a",
+        "id": "f6e87f8b.c8e97",
         "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 Status.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>",
         "comments": "",
         "outputs": 1,
-        "x": 1009.0001220703125,
-        "y": 289,
-        "z": "6c2cfe41.61b868",
+        "x": 1015.0001220703125,
+        "y": 416,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
     },
     {
-        "id": "3c854250.ea03ce",
+        "id": "106aff5e.8841f1",
         "type": "execute",
         "name": "Get Policy Instance Status",
         "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=\"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": 1055.0006103515625,
-        "y": 370.0104064941406,
-        "z": "6c2cfe41.61b868",
+        "x": 1079.0006103515625,
+        "y": 544.0103759765625,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "db967cfd.662b5",
-                "f7373336.a9f2d8"
+                "f3f6f62a.f41478",
+                "969a94ea.773e38"
             ]
         ]
     },
     {
-        "id": "db967cfd.662b5",
+        "id": "f3f6f62a.f41478",
         "type": "failure",
         "name": "failure",
         "xml": "<outcome value='failure'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 1282,
-        "y": 439.0001220703125,
-        "z": "6c2cfe41.61b868",
+        "x": 1303,
+        "y": 624.0001220703125,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "e83b2b7e.0baf9"
+                "6fa34f65.cd31e"
             ]
         ]
     },
     {
-        "id": "f7373336.a9f2d8",
+        "id": "969a94ea.773e38",
         "type": "success",
         "name": "success",
         "xml": "<outcome value='success'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 1273.000244140625,
-        "y": 283.0000305175781,
-        "z": "6c2cfe41.61b868",
+        "x": 1307.000244140625,
+        "y": 470.0000305175781,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "ff2d7ebe.e41298"
+                "bb9a433.67534c"
             ]
         ]
     },
     {
-        "id": "9eba774e.8b338",
+        "id": "841abfc3.69c46",
         "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 Status. Aborting\" />",
         "comments": "",
-        "x": 1605.0006103515625,
-        "y": 493.00006103515625,
-        "z": "6c2cfe41.61b868",
+        "x": 1610.0006103515625,
+        "y": 679.0000610351562,
+        "z": "ba6f4cc8.60e08",
         "wires": []
     },
     {
-        "id": "ff2d7ebe.e41298",
+        "id": "bb9a433.67534c",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "atomic": "false",
         "comments": "",
         "outputs": 1,
-        "x": 1445.9998779296875,
-        "y": 284.00006103515625,
-        "z": "6c2cfe41.61b868",
+        "x": 1450.9998779296875,
+        "y": 470.00006103515625,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "a55d0be.aa42678",
-                "73d80df5.3d29b4",
-                "49aaac04.dffde4"
+                "53bf49b8.e46be8",
+                "23da3b63.1d7a64",
+                "e316d95e.fbfff8"
             ]
         ]
     },
     {
-        "id": "a55d0be.aa42678",
+        "id": "53bf49b8.e46be8",
         "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 Get Policy Status \"/>\n<parameter name=\"field2\" value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>",
         "comments": "",
         "outputs": 1,
-        "x": 1604,
-        "y": 230,
-        "z": "6c2cfe41.61b868",
+        "x": 1612,
+        "y": 469,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
     },
     {
-        "id": "1979a6a.06a3759",
+        "id": "45d11c3c.69ea24",
         "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": 1578.75390625,
-        "y": 386.00390625,
-        "z": "6c2cfe41.61b868",
+        "x": 1583.75390625,
+        "y": 572.00390625,
+        "z": "ba6f4cc8.60e08",
         "wires": []
     },
     {
-        "id": "9795ae5f.c333",
+        "id": "2064dc6c.f4a0b4",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "atomic": "false",
         "comments": "",
         "outputs": 1,
-        "x": 693.75390625,
-        "y": 478.00390625,
-        "z": "6c2cfe41.61b868",
+        "x": 698.75390625,
+        "y": 560.00390625,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "d253316a.832ce"
+                "fd599731.db71c8"
             ]
         ]
     },
     {
-        "id": "d253316a.832ce",
+        "id": "fd599731.db71c8",
         "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='Get Policy Status executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n",
         "comments": "",
-        "x": 854.7539672851562,
-        "y": 478.00396728515625,
-        "z": "6c2cfe41.61b868",
+        "x": 859.7539672851562,
+        "y": 560.0039672851562,
+        "z": "ba6f4cc8.60e08",
         "wires": []
     },
     {
-        "id": "e83b2b7e.0baf9",
+        "id": "6fa34f65.cd31e",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "atomic": "false",
         "comments": "",
         "outputs": 1,
-        "x": 1437.00390625,
-        "y": 438.0039367675781,
-        "z": "6c2cfe41.61b868",
+        "x": 1442.00390625,
+        "y": 624.0039367675781,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             [
-                "1979a6a.06a3759",
-                "9eba774e.8b338"
+                "45d11c3c.69ea24",
+                "841abfc3.69c46"
             ]
         ]
     },
     {
-        "id": "73d80df5.3d29b4",
+        "id": "23da3b63.1d7a64",
         "type": "execute",
         "name": "set",
         "xml": "<set>\n<parameter name='responseBody' value='`$tmp.a1-mediator-restapi.httpResponse`'/>",
         "comments": "",
         "outputs": 1,
-        "x": 1609,
-        "y": 334,
-        "z": "6c2cfe41.61b868",
+        "x": 1614,
+        "y": 520,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
     },
     {
-        "id": "49aaac04.dffde4",
+        "id": "e316d95e.fbfff8",
         "type": "execute",
         "name": "execute",
         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >\n    <parameter name=\"source\" value=\"`$a1MediatorRsp.httpResponse`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.a1-mediator-restapi.httpResponse\"/>\n    <parameter name=\"target\" value=\"\\n\"/>\n    <parameter name=\"replacement\" value=\"\"/>",
         "comments": "",
         "outputs": 1,
-        "x": 1602,
-        "y": 155,
-        "z": "6c2cfe41.61b868",
+        "x": 1616,
+        "y": 426,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "b988a0f2.cebc8",
+        "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": 1994,
+        "y": 318,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "6e6d1a6a.783024",
+        "type": "for",
+        "name": "for",
+        "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",
+        "comments": "",
+        "outputs": 1,
+        "x": 1960,
+        "y": 388,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "91e4428c.7143b"
+            ]
+        ]
+    },
+    {
+        "id": "91e4428c.7143b",
+        "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": 2138,
+        "y": 388,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "5958734e.49501c",
+        "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 A1 Policy Status: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1960,
+        "y": 451,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "d87bfe21.b6db5",
+        "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 A1 Policy Status: No proxy found on properties file \"/>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1791,
+        "y": 285,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "c12bf1b.56d2e1",
+        "type": "block",
+        "name": "block",
+        "xml": "<block>\n",
+        "atomic": "false",
+        "comments": "",
+        "outputs": 1,
+        "x": 1783,
+        "y": 353,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "b988a0f2.cebc8",
+                "6e6d1a6a.783024",
+                "5958734e.49501c",
+                "9090a68a.628a58"
+            ]
+        ]
+    },
+    {
+        "id": "9090a68a.628a58",
+        "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": 2070,
+        "y": 512,
+        "z": "ba6f4cc8.60e08",
+        "wires": []
+    },
+    {
+        "id": "768b81d4.9d20c",
+        "type": "outcome",
+        "name": "Otherwise",
+        "xml": "<outcome value='Other'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1619,
+        "y": 353,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "c12bf1b.56d2e1"
+            ]
+        ]
+    },
+    {
+        "id": "b3216caa.c1505",
+        "type": "outcome",
+        "name": "No proxy URL",
+        "xml": "<outcome value=''>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1623,
+        "y": 285,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "d87bfe21.b6db5"
+            ]
+        ]
+    },
+    {
+        "id": "5379ad2e.52cba4",
+        "type": "switchNode",
+        "name": "switch",
+        "xml": "<switch test='`$tmp.proxy-url`'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1444,
+        "y": 319,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "b3216caa.c1505",
+                "768b81d4.9d20c"
+            ]
+        ]
+    },
+    {
+        "id": "2151b182.f0aebe",
+        "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 A1 Policy Status: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1445,
+        "y": 236,
+        "z": "ba6f4cc8.60e08",
         "wires": [
             []
         ]
+    },
+    {
+        "id": "862a1de8.7e469",
+        "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": 1562,
+        "y": 161,
+        "z": "ba6f4cc8.60e08",
+        "wires": []
+    },
+    {
+        "id": "7df3b9b5.9298c8",
+        "type": "block",
+        "name": "block Substitute proxy address if available",
+        "xml": "<block>\n",
+        "atomic": "false",
+        "comments": "",
+        "outputs": 1,
+        "x": 1117,
+        "y": 326,
+        "z": "ba6f4cc8.60e08",
+        "wires": [
+            [
+                "862a1de8.7e469",
+                "2151b182.f0aebe",
+                "5379ad2e.52cba4"
+            ]
+        ]
     }
 ]
\ No newline at end of file