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-create.json
index 2a955c1..fe1d70f 100644 (file)
@@ -1,20 +1,20 @@
 [\r
     {\r
-        "id": "6e8e8f80.d43c1",\r
+        "id": "630403de.7c4dfc",\r
         "type": "dgstart",\r
         "name": "DGSTART",\r
         "outputs": 1,\r
-        "x": 198.56666564941406,\r
-        "y": 102.56666564941406,\r
-        "z": "fcd8d790.9bb058",\r
+        "x": 130,\r
+        "y": 71,\r
+        "z": "adc7d7d7.2ba55",\r
         "wires": [\r
             [\r
-                "bbddfda2.fd8ca8"\r
+                "80c50a18.8d75c"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "bbddfda2.fd8ca8",\r
+        "id": "80c50a18.8d75c",\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": 482.85235595703125,\r
-        "y": 163.8047742843628,\r
-        "z": "fcd8d790.9bb058",\r
+        "x": 414.2856903076172,\r
+        "y": 132.23810863494873,\r
+        "z": "adc7d7d7.2ba55",\r
         "wires": [\r
             [\r
-                "b5eed43.f629328"\r
+                "2da8c00e.5874f"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "b5eed43.f629328",\r
+        "id": "2da8c00e.5874f",\r
         "type": "method",\r
         "name": "method sotn-vnf-topology-operation-underlay-create",\r
         "xml": "<method rpc='sotn-vnf-topology-operation-underlay-create' mode='sync'>\n",\r
         "comments": "",\r
         "outputs": 1,\r
-        "x": 488.9952697753906,\r
-        "y": 248.5666961669922,\r
-        "z": "fcd8d790.9bb058",\r
+        "x": 420.42860412597656,\r
+        "y": 217.00003051757812,\r
+        "z": "adc7d7d7.2ba55",\r
         "wires": [\r
             [\r
-                "5debc633.a3523"\r
+                "c4830870.f71be"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "5debc633.a3523",\r
+        "id": "c4830870.f71be",\r
         "type": "block",\r
         "name": "block : atomic",\r
-        "xml": "<block atomic=\"true\">\n",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 790.238037109375,\r
+        "y": 241.66668701171875,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "d09b0487.d267f8",\r
+                "4e465113.c34b3",\r
+                "6d4651f1.9a44a",\r
+                "b93f8dee.f542a",\r
+                "18feff02.43bff9",\r
+                "e9275990.6ea4e",\r
+                "273e48bf.25ca5",\r
+                "4b57404f.d373b8",\r
+                "4822a493.73c54c",\r
+                "567e338.a899b4c",\r
+                "616296b0.6f36",\r
+                "cdecd2ad.ea2458",\r
+                "9b5e953e.0822e8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4e465113.c34b3",\r
+        "type": "set",\r
+        "name": "set vnf-level-oper-status to Created",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].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[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",\r
+        "comments": "",\r
+        "x": 1212.3848495483398,\r
+        "y": 605.6706197531894,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "d09b0487.d267f8",\r
+        "type": "set",\r
+        "name": "copy input data to service data",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n",\r
+        "comments": "",\r
+        "x": 1204.238037109375,\r
+        "y": 500.6668718131259,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "18feff02.43bff9",\r
+        "type": "execute",\r
+        "name": "execute generate-vnf-index",\r
+        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-id\"/>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1192.5715408325195,\r
+        "y": 450.3334558280185,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "567e338.a899b4c",\r
+        "type": "set",\r
+        "name": "set vnf-index to service data",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-id`' />\n",\r
+        "comments": "",\r
+        "x": 1203.5716171264648,\r
+        "y": 557.3334596427158,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "6d4651f1.9a44a",\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": 1219.5713577270508,\r
+        "y": 120.33337858039886,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "c4be7092.54bab",\r
+                "bebf6c90.f10358"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "c4be7092.54bab",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1454.285743713379,\r
+        "y": 115.47619893867522,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "55302818.0621f"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "55302818.0621f",\r
+        "type": "set",\r
+        "name": "set vnf-index=0",\r
+        "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",\r
+        "comments": "",\r
+        "x": 1614.5714492797852,\r
+        "y": 115.4762904914096,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "bebf6c90.f10358",\r
+        "type": "other",\r
+        "name": "other",\r
+        "xml": "<outcome value='Other'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1450.714282989502,\r
+        "y": 148.76203039009124,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "d6fccb24.04a71"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "543cefe7.718a7",\r
+        "type": "set",\r
+        "name": "set vnf-index = vnf_length",\r
+        "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",\r
+        "comments": "",\r
+        "x": 1843.5715255737305,\r
+        "y": 127.04775598365813,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "5d18757b.848c24",\r
+        "type": "for",\r
+        "name": "for each existing VNF",\r
+        "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1832.000144958496,\r
+        "y": 162.0477278502658,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "8ce4ca7d.ffb71"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "d6fccb24.04a71",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
         "atomic": "false",\r
         "comments": "",\r
         "outputs": 1,\r
-        "x": 627.0940055847168,\r
-        "y": 465.6408796310425,\r
-        "z": "fcd8d790.9bb058",\r
+        "x": 1585.428565979004,\r
+        "y": 150.76199987251312,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "543cefe7.718a7",\r
+                "5d18757b.848c24"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "8ce4ca7d.ffb71",\r
+        "type": "switchNode",\r
+        "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",\r
+        "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2225.2858810424805,\r
+        "y": 162.6192119391635,\r
+        "z": "adc7d7d7.2ba55",\r
         "wires": [\r
             [\r
-                "f1ef9959.63e988"\r
+                "46146016.cb5b58"\r
             ]\r
         ]\r
     },\r
     {\r
-        "id": "f1ef9959.63e988",\r
+        "id": "46146016.cb5b58",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2506.5715827941895,\r
+        "y": 161.1906173499301,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "14fd2dd2.04e2ea"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "fac5d84d.dacdb8",\r
+        "type": "comment",\r
+        "name": "make sure this vnf-id doesn't exist already",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 2194.428497314453,\r
+        "y": 126.19060399848968,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "b93f8dee.f542a",\r
+        "type": "set",\r
+        "name": "set new vnf_length",\r
+        "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",\r
+        "comments": "",\r
+        "x": 1150.571533203125,\r
+        "y": 398.33343505859375,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "e9275990.6ea4e",\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": 880.566650390625,\r
-        "y": 576.566650390625,\r
-        "z": "fcd8d790.9bb058",\r
+        "x": 1151.5715026855469,\r
+        "y": 868.5969713004306,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "4822a493.73c54c",\r
+        "type": "save",\r
+        "name": "save service relationship in AAI",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n      key='service-instance.service-instance-id = $service-data.service-information.service-instance-id\n         AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n         AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"generic-vnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"generic-vnf.vnf-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-id`\" />\n\n\n<!--key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->\n<!--key='service-instance.service-instance-id = $service-data.service-instance-id -->\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1184.2382736206055,\r
+        "y": 817.5968644889072,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "273e48bf.25ca5",\r
+        "type": "set",\r
+        "name": "set vnf-index and vnf-object-path",\r
+        "xml": "<set>\n<parameter name='vnfId' value='`$prop.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/'  + $prop.vnf-id  + '/vnf-data/'` \" />",\r
+        "comments": "",\r
+        "x": 1205.571533203125,\r
+        "y": 646.5968902381137,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "14fd2dd2.04e2ea",\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 id ' + $service-data.vnfs.vnf[$idx].vnf-id\n      + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n",\r
+        "comments": "",\r
+        "x": 2635.142951965332,\r
+        "y": 212.19063165504485,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "4b57404f.d373b8",\r
+        "type": "save",\r
+        "name": "save AnAI - vnf-instance.orchestration-status",\r
+        "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\"   \n\t\tkey='generic-vnf.vnf-id = $prop.vnf-id' >\n<parameter name=\"orchestration-status\" value=\"Created\" />\n<parameter name=\"in-maint\" value = \"true\" />\n<parameter name=\"vnf-type\" value='`$prop.vnfName`' />\n<parameter name=\"vnf-name\" value = \"`$prop.vnfName`\"/>\n<parameter name=\"model-invariant-id\" value = \"`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`\"/>\n<parameter name=\"model-version-id\" value = \"`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`\"/>\n<parameter name=\"model-customization-id\" value = \"`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`\"/>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1260.5458374023438,\r
+        "y": 756.2471072943881,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "1ddf67d5.b35a7",\r
+        "type": "comment",\r
+        "name": "TODO: change AAI models",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 1194.1820983886719,\r
+        "y": 715.9743230612949,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "eb3e5b54.ee7cc8",\r
+        "type": "execute",\r
+        "name": "execute split parameterName",\r
+        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1620.7395858764648,\r
+        "y": 209.75002291519195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "a93d9d55.574d98",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1424.483383178711,\r
+        "y": 214.00189593154937,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "eb3e5b54.ee7cc8",\r
+                "34cb35bb.2ef0aa"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "616296b0.6f36",\r
+        "type": "for",\r
+        "name": "for loop idx - VNF input parameters",\r
+        "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1209.7050399780273,\r
+        "y": 216.44631197769195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "a93d9d55.574d98"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "cdecd2ad.ea2458",\r
+        "type": "set",\r
+        "name": "set vnf-request-input.",\r
+        "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",\r
+        "comments": "",\r
+        "x": 1166.7046737670898,\r
+        "y": 286.77101900894195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "34cb35bb.2ef0aa",\r
+        "type": "set",\r
+        "name": "set parameterName",\r
+        "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n",\r
+        "comments": "",\r
+        "x": 1597.7395858764648,\r
+        "y": 255.75002291519195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "9b5e953e.0822e8",\r
+        "type": "for",\r
+        "name": "for each sdwan-get-request-input-param",\r
+        "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1222.7395858764648,\r
+        "y": 338.75002291519195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "42766226.3db64c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "42766226.3db64c",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1448.9722518920898,\r
+        "y": 337.09377291519195,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "85dff1eb.0e22b8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "85dff1eb.0e22b8",\r
+        "type": "switchNode",\r
+        "name": "switch vnf name",\r
+        "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1605.4722518920898,\r
+        "y": 335.0938339503482,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "2f903a44.280976"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "2f903a44.280976",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1766.4726181030273,\r
+        "y": 335.09389498550445,\r
+        "z": "adc7d7d7.2ba55",\r
+        "wires": [\r
+            [\r
+                "55b726c2.cd02d"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "55b726c2.cd02d",\r
+        "type": "set",\r
+        "name": "set vnf name",\r
+        "xml": "<set>\n<parameter name='prop.vnfName' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",\r
+        "comments": "",\r
+        "x": 1924.4727401733398,\r
+        "y": 333.6939316065982,\r
+        "z": "adc7d7d7.2ba55",\r
         "wires": []\r
     }\r
 ]
\ No newline at end of file