Bug Fix- Update DG to add proxy support
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_putA1Policy.json
index 419d5b7..27669a9 100644 (file)
@@ -1,6 +1,6 @@
 [
     {
-        "id": "270a5aa5.bc52d6",
+        "id": "6fe6315.c6a1bd",
         "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": 171,
-        "y": 150,
-        "z": "33919dc9.0e17ba",
+        "x": 177,
+        "y": 269.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "187cb7f8.135d08"
+                "fb2e5825.9a3128"
             ]
         ]
     },
     {
-        "id": "187cb7f8.135d08",
+        "id": "fb2e5825.9a3128",
         "type": "method",
         "name": "method putA1Policy",
         "xml": "<method rpc='putA1Policy' mode='sync'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 158,
-        "y": 219,
-        "z": "33919dc9.0e17ba",
+        "x": 164,
+        "y": 338.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "60165fbc.5b22d8"
+                "df682f6a.462ce"
             ]
         ]
     },
     {
-        "id": "ca1b73bb.bd73a",
+        "id": "915488d9.7845e8",
         "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",
+        "x": 478,
+        "y": 306.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             []
         ]
     },
     {
-        "id": "60165fbc.5b22d8",
+        "id": "df682f6a.462ce",
         "type": "block",
         "name": "block : atomic",
         "xml": "<block atomic='true'>",
         "atomic": "true",
         "comments": "",
         "outputs": 1,
-        "x": 222,
-        "y": 286,
-        "z": "33919dc9.0e17ba",
+        "x": 228,
+        "y": 405.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "ca1b73bb.bd73a",
-                "3bda5968.b55f7e",
-                "a7fa8c3e.f91198",
-                "d671108f.2dd19"
+                "915488d9.7845e8",
+                "e2505a8d.6cb778",
+                "a9158c4b.092d",
+                "d3227515.2a39c8"
             ]
         ]
     },
     {
-        "id": "86499c8c.9221c",
+        "id": "7b9fa46b.caaa3c",
         "type": "dgstart",
         "name": "DGSTART",
         "outputs": 1,
-        "x": 99,
-        "y": 88,
-        "z": "33919dc9.0e17ba",
+        "x": 105,
+        "y": 207.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "270a5aa5.bc52d6"
+                "6fe6315.c6a1bd"
             ]
         ]
     },
     {
-        "id": "3bda5968.b55f7e",
+        "id": "e2505a8d.6cb778",
         "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",
+        "x": 512,
+        "y": 404.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             []
         ]
     },
     {
-        "id": "f71250c1.d2e79",
+        "id": "895a1021.a1ea2",
         "type": "failure",
         "name": "failure",
         "xml": "<outcome value='failure'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 988.0001220703125,
-        "y": 363.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "x": 994.0001220703125,
+        "y": 482.1109619140625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "424bcc5a.68059c"
+                "43219d41.f548b4"
             ]
         ]
     },
     {
-        "id": "678803c.a1c0efc",
+        "id": "75925e3d.bab",
         "type": "success",
         "name": "success",
         "xml": "<outcome value='success'>\n",
         "comments": "",
         "outputs": 1,
-        "x": 995.0003051757812,
-        "y": 453.0000457763672,
-        "z": "33919dc9.0e17ba",
+        "x": 1001.0003051757812,
+        "y": 572.1109466552734,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "d61f47fe.10e5e8"
+                "1675a1d6.64adbe"
             ]
         ]
     },
     {
-        "id": "d61f47fe.10e5e8",
+        "id": "1675a1d6.64adbe",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "atomic": "false",
         "comments": "",
         "outputs": 1,
-        "x": 1136.9999389648438,
-        "y": 449.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "x": 1143.9998779296875,
+        "y": 572.1109619140625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "44bf0d67.60023c"
+                "c6e4bee1.82c53",
+                "d89555ac.557618"
             ]
         ]
     },
     {
-        "id": "b1b2cbaf.574838",
+        "id": "f498cd2f.096d9",
         "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`\"/>",
+        "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`\"/>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",
         "comments": "",
-        "x": 884.0010375976562,
-        "y": 239.88909912109375,
-        "z": "33919dc9.0e17ba",
+        "x": 922.0010375976562,
+        "y": 254,
+        "z": "ef1ae006.6efce",
         "wires": []
     },
     {
-        "id": "1fe61572.90f523",
+        "id": "adc43a9e.a48a18",
         "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",
+        "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<parameter name=\"proxyUrl\" value=\"`$tmp.proxy-url`\"/>\n",
         "comments": "",
         "outputs": 1,
-        "x": 811.00048828125,
-        "y": 411.0103759765625,
-        "z": "33919dc9.0e17ba",
+        "x": 817.00048828125,
+        "y": 530.1212768554688,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "f71250c1.d2e79",
-                "678803c.a1c0efc"
+                "895a1021.a1ea2",
+                "75925e3d.bab"
             ]
         ]
     },
     {
-        "id": "d671108f.2dd19",
+        "id": "d3227515.2a39c8",
         "type": "block",
         "name": "A1 Mediator RestAPI Invocation",
         "xml": "<block atomic='true'>",
         "atomic": "true",
         "comments": "",
         "outputs": 1,
-        "x": 542.0000305175781,
-        "y": 350.00006103515625,
-        "z": "33919dc9.0e17ba",
+        "x": 548.0000305175781,
+        "y": 469.1109619140625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "8d62fd00.aa56e",
-                "b1b2cbaf.574838",
-                "1fe61572.90f523"
+                "65624437.a307ac",
+                "f498cd2f.096d9",
+                "adc43a9e.a48a18",
+                "72384bae.e338a4"
             ]
         ]
     },
     {
-        "id": "8d62fd00.aa56e",
+        "id": "65624437.a307ac",
         "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": 820.0000610351562,
+        "y": 419.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             []
         ]
     },
     {
-        "id": "44bf0d67.60023c",
+        "id": "c6e4bee1.82c53",
         "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",
+        "x": 1282,
+        "y": 550.1109619140625,
+        "z": "ef1ae006.6efce",
         "wires": [
             []
         ]
     },
     {
-        "id": "a0360147.468f3",
+        "id": "4aa855d3.13558c",
         "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",
+        "x": 1292,
+        "y": 509.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": []
     },
     {
-        "id": "a7fa8c3e.f91198",
+        "id": "a9158c4b.092d",
         "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",
+        "x": 523,
+        "y": 359.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": []
     },
     {
-        "id": "424bcc5a.68059c",
+        "id": "43219d41.f548b4",
         "type": "block",
         "name": "block",
         "xml": "<block>\n",
         "atomic": "false",
         "comments": "",
         "outputs": 1,
-        "x": 1124,
-        "y": 361,
-        "z": "33919dc9.0e17ba",
+        "x": 1133,
+        "y": 482.11090087890625,
+        "z": "ef1ae006.6efce",
         "wires": [
             [
-                "b8ca1bb9.7870e",
-                "a0360147.468f3"
+                "20980396.38371c",
+                "4aa855d3.13558c"
             ]
         ]
     },
     {
-        "id": "b8ca1bb9.7870e",
+        "id": "20980396.38371c",
         "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",
+        "x": 1278,
+        "y": 447.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": []
+    },
+    {
+        "id": "ebc637df.f0ef88",
+        "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": 1616,
+        "y": 283.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "b876b8ea.d136b8",
+        "type": "outcome",
+        "name": "No proxy URL",
+        "xml": "<outcome value=''>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1448,
+        "y": 283.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            [
+                "ebc637df.f0ef88"
+            ]
+        ]
+    },
+    {
+        "id": "dfb1d01a.73a1e",
+        "type": "outcome",
+        "name": "Otherwise",
+        "xml": "<outcome value='Other'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1444,
+        "y": 351.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            [
+                "d9a8bda2.1b53c"
+            ]
+        ]
+    },
+    {
+        "id": "d9a8bda2.1b53c",
+        "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: Proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1609,
+        "y": 352.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            []
+        ]
+    },
+    {
+        "id": "7cba1ce8.66a944",
+        "type": "switchNode",
+        "name": "switch",
+        "xml": "<switch test='`$tmp.proxy-url`'>\n",
+        "comments": "",
+        "outputs": 1,
+        "x": 1269,
+        "y": 317.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            [
+                "b876b8ea.d136b8",
+                "dfb1d01a.73a1e"
+            ]
+        ]
+    },
+    {
+        "id": "72384bae.e338a4",
+        "type": "block",
+        "name": "block check if proxy address is available",
+        "xml": "<block>\n",
+        "atomic": "false",
+        "comments": "",
+        "outputs": 1,
+        "x": 932,
+        "y": 316.11090087890625,
+        "z": "ef1ae006.6efce",
+        "wires": [
+            [
+                "7cba1ce8.66a944"
+            ]
+        ]
+    },
+    {
+        "id": "d89555ac.557618",
+        "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": 1281,
+        "y": 598,
+        "z": "ef1ae006.6efce",
         "wires": []
     }
 ]
\ No newline at end of file