DGs for SOTN NNI based service creation
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / sotn_nni / GENERIC-RESOURCE-API_sotn-vnf-topology-operation-underlay-activate.json
index 6b71cf5..9730d51 100644 (file)
@@ -1,20 +1,20 @@
 [\r
     {\r
-        "id": "8e70cbab.9e762",\r
+        "id": "f8944be3.096ab8",\r
         "type": "dgstart",\r
         "name": "DGSTART",\r
         "outputs": 1,\r
-        "x": 192.56666564941406,\r
-        "y": 127.56666564941406,\r
-        "z": "cee6034b.da01e8",\r
+        "x": 111,\r
+        "y": 56,\r
+        "z": "9dcfec88.5f292",\r
         "wires": [\r
             [\r
-                "a562bec1.5c6bb"\r
+                "68420034.5c6d98"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "a562bec1.5c6bb",\r
+        "id": "68420034.5c6d98",\r
         "type": "service-logic",\r
         "name": "GENERIC-RESOURCE-API ${project.version}",\r
         "module": "GENERIC-RESOURCE-API",\r
         "comments": "",\r
         "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='GENERIC-RESOURCE-API' version='${project.version}'>",\r
         "outputs": 1,\r
-        "x": 323.85235595703125,\r
-        "y": 176.8047742843628,\r
-        "z": "cee6034b.da01e8",\r
+        "x": 242.2856903076172,\r
+        "y": 105.23810863494873,\r
+        "z": "9dcfec88.5f292",\r
         "wires": [\r
             [\r
-                "bd2e1e6.b1131e"\r
+                "9e33642a.9ab6b8"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "bd2e1e6.b1131e",\r
+        "id": "9e33642a.9ab6b8",\r
         "type": "method",\r
         "name": "method sotn-vnf-topology-operation-underlay-activate",\r
         "xml": "<method rpc='sotn-vnf-topology-operation-underlay-activate' mode='sync'>\n",\r
         "comments": "",\r
         "outputs": 1,\r
-        "x": 326.9952850341797,\r
-        "y": 261.5666980743408,\r
-        "z": "cee6034b.da01e8",\r
+        "x": 245.42861938476562,\r
+        "y": 190.00003242492676,\r
+        "z": "9dcfec88.5f292",\r
         "wires": [\r
             [\r
-                "948a9c7.119abe"\r
+                "f3fc4610.118298"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "948a9c7.119abe",\r
+        "id": "f3fc4610.118298",\r
         "type": "block",\r
         "name": "block : atomic",\r
-        "xml": "<block atomic=\"true\">\n",\r
-        "atomic": "false",\r
-        "comments": "",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
         "outputs": 1,\r
-        "x": 468.0940055847168,\r
-        "y": 478.6408796310425,\r
-        "z": "cee6034b.da01e8",\r
+        "x": 395.238037109375,\r
+        "y": 319.6666564941406,\r
+        "z": "9dcfec88.5f292",\r
         "wires": [\r
             [\r
-                "1b5215d4.38c512"\r
+                "321f78ca.ccdc38",\r
+                "47a0d8c5.66ef38",\r
+                "30a9bb6d.ac3de4",\r
+                "470fa21f.c90dac",\r
+                "a9e79f17.0260f",\r
+                "79db1524.d2b97c",\r
+                "47e6b5ed.41cf1c"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "1b5215d4.38c512",\r
+        "id": "321f78ca.ccdc38",\r
+        "type": "set",\r
+        "name": "set vnf-level-oper-status to Active",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />",\r
+        "comments": "",\r
+        "x": 738.3849563598633,\r
+        "y": 556.6705458434299,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "47a0d8c5.66ef38",\r
         "type": "returnSuccess",\r
         "name": "return success",\r
         "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",\r
         "comments": "",\r
-        "x": 721.566650390625,\r
-        "y": 589.566650390625,\r
-        "z": "cee6034b.da01e8",\r
+        "x": 658.571647644043,\r
+        "y": 682.5970833571628,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "30a9bb6d.ac3de4",\r
+        "type": "set",\r
+        "name": "set vnf-index and vnf-object-path",\r
+        "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $vnf-topology-operation-input.service-information.service-instance-id  + '/service-data/vnfs/vnf/'  + $vnf-topology-operation-input.vnf-information.vnf-id  + '/vnf-data/'` \" />",\r
+        "comments": "",\r
+        "x": 744.5716018676758,\r
+        "y": 504.5968001158908,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "470fa21f.c90dac",\r
+        "type": "switchNode",\r
+        "name": "switch service-data.vnfs.vnf_length",\r
+        "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 753,\r
+        "y": 259,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "bde1ee44.7683d",\r
+                "2e788e91.c6a1c2",\r
+                "946699e9.3b5b1"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "946699e9.3b5b1",\r
+        "type": "outcome",\r
+        "name": "0",\r
+        "xml": "<outcome value='0'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1145.968994140625,\r
+        "y": 224.96875,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "5b4e6761.75d918"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "5b4e6761.75d918",\r
+        "type": "returnFailure",\r
+        "name": "return failure",\r
+        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",\r
+        "comments": "",\r
+        "x": 1300.7778816223145,\r
+        "y": 243.889018535614,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "bde1ee44.7683d",\r
+        "type": "other",\r
+        "name": "Null",\r
+        "xml": "<outcome value=''>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1139.0001335144043,\r
+        "y": 264.00007152557373,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "5b4e6761.75d918"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "2e788e91.c6a1c2",\r
+        "type": "other",\r
+        "name": "other",\r
+        "xml": "<outcome value='Other'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1132.0005416870117,\r
+        "y": 297.000075340271,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "ebf17a44.2210a8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ebf17a44.2210a8",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 1279.2700843811035,\r
+        "y": 297.5547204017639,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "e3ab2fd7.ebbf08"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e3ab2fd7.ebbf08",\r
+        "type": "for",\r
+        "name": "for vidx..service-data.vnfs.vnf_length[]",\r
+        "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1525.2862014770508,\r
+        "y": 304.42864084243774,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "18572251.98d83e"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "18572251.98d83e",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1744.6358337402344,\r
+        "y": 303.96872091293335,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "4a39ea58.7fb184"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4a39ea58.7fb184",\r
+        "type": "switchNode",\r
+        "name": "switch vnfid found",\r
+        "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1898.715431213379,\r
+        "y": 303.67880296707153,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "669b0d11.8a0824"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "669b0d11.8a0824",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2109.6675758361816,\r
+        "y": 306.571494102478,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "e89a8750.1f8e18"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e89a8750.1f8e18",\r
+        "type": "set",\r
+        "name": "set tmp.vidx and ctx.vnf-data",\r
+        "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",\r
+        "comments": "",\r
+        "x": 2319.199951171875,\r
+        "y": 308.32159423828125,\r
+        "z": "9dcfec88.5f292",\r
         "wires": []\r
+    },\r
+    {\r
+        "id": "a9e79f17.0260f",\r
+        "type": "save",\r
+        "name": "update AnAI - vnf-instance.orchestration-status",\r
+        "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\"   \n\t\tkey=\"generic-vnf.vnf-id = $vnfId\" >\n<parameter name=\"orchestration-status\" value=\"Active\" />\n<parameter name=\"vnf-type\" value=\"some vnf-type\" />",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 763.9999618530273,\r
+        "y": 623.0103714736179,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "79db1524.d2b97c",\r
+        "type": "set",\r
+        "name": "copy input data to service data",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />",\r
+        "comments": "",\r
+        "x": 743.0000762939453,\r
+        "y": 454.01033284980804,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "47e6b5ed.41cf1c",\r
+        "type": "switchNode",\r
+        "name": "switch vnf-level-oper-status",\r
+        "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 729.7499389648438,\r
+        "y": 359.00390270072967,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "3e2d00ea.214d9",\r
+                "ed7ee56e.298fc8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "3e2d00ea.214d9",\r
+        "type": "outcome",\r
+        "name": "outcome Created",\r
+        "xml": "<outcome value='Created'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1109.5833320617676,\r
+        "y": 364.1149909766391,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "34b25335.603514"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ed7ee56e.298fc8",\r
+        "type": "other",\r
+        "name": "other",\r
+        "xml": "<outcome value='Other'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1087.583351135254,\r
+        "y": 414.1150024207309,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            [\r
+                "4a64950b.2e4a84"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4a64950b.2e4a84",\r
+        "type": "returnFailure",\r
+        "name": "return failure",\r
+        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",\r
+        "comments": "",\r
+        "x": 1247.0831184387207,\r
+        "y": 417.1150014670566,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "34b25335.603514",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 1319.889705657959,\r
+        "y": 375.44016626197845,\r
+        "z": "9dcfec88.5f292",\r
+        "wires": [\r
+            []\r
+        ]\r
     }\r
 ]
\ No newline at end of file