Merge "Adding site Resource DG"
authorDan Timoney <dt5972@att.com>
Wed, 25 Jul 2018 14:48:39 +0000 (14:48 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 25 Jul 2018 14:48:39 +0000 (14:48 +0000)
Former-commit-id: 027c60e3bbcc371552af20947aec15a622d4daab

29 files changed:
installation/src/main/properties/generic-resource-api-dg.properties
platform-logic/datachange/src/main/json/DataChange_data-change-notification.json [new file with mode: 0644]
platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json [new file with mode: 0644]
platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc.json [new file with mode: 0644]
platform-logic/datachange/src/main/json/DataChange_update-network-to-aai.json [new file with mode: 0644]
platform-logic/datachange/src/main/json/DataChange_validate-esr-thirdparty-sdnc-input.json [new file with mode: 0644]
platform-logic/datachange/src/main/resources/graph.versions [new file with mode: 0644]
platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml [new file with mode: 0644]
platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml [new file with mode: 0644]
platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml [new file with mode: 0644]
platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml [new file with mode: 0644]
platform-logic/datachange/src/main/xml/DataChange_validate-esr-thirdparty-sdnc-input.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_connection-attachment-topology-operation.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-connection-attachment-input.json [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_connection-attachment-topology-operation.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.xml [new file with mode: 0644]
platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-connection-attachment-input.xml [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/oof-getpath.json [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/sotn-attachment-allotted-resource.json [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json [new file with mode: 0644]

index 3e1f166..0995af0 100644 (file)
@@ -23,6 +23,7 @@ restapi.network-ar.templatefile=network-provided-allotted-resources.json
 restapi.vnf-ar.templatefile=vnf-provided-allotted-resources.json
 restapi.services.templatefile=vcpe-services-service.json
 restapi.services.vnf.vfmodule.templatefile=vfmodule-vim-parameters.vgw.json
+restapi.sotn-attachment.templatefile=sotn-attachment-allotted-resource.json
 # URLs
 restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/
 restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/
@@ -39,3 +40,4 @@ restapi.parent-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/
 restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/
 restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}
 restapi.service.vnf.vfmodule-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}
+restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/
diff --git a/platform-logic/datachange/src/main/json/DataChange_data-change-notification.json b/platform-logic/datachange/src/main/json/DataChange_data-change-notification.json
new file mode 100644 (file)
index 0000000..a68422e
--- /dev/null
@@ -0,0 +1,170 @@
+[\r
+    {\r
+        "id": "14de9b29.eb77a5",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 116.00390625,\r
+        "y": 67.9999988079071,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "1630f686.0be599"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "1630f686.0be599",\r
+        "type": "service-logic",\r
+        "name": "DataChange ${project.version}",\r
+        "module": "DataChange",\r
+        "version": "${project.version}",\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='DataChange' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 302.1150550842285,\r
+        "y": 172.44447016716003,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "8b5ae719.a8f008"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "8b5ae719.a8f008",\r
+        "type": "method",\r
+        "name": "method data-change-notification",\r
+        "xml": "<method rpc='data-change-notification' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 299.5596046447754,\r
+        "y": 336.22225546836853,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "d99c1956.418f78"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "d99c1956.418f78",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 344.7818908691406,\r
+        "y": 451.1113257408142,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "fa034db9.8bac4",\r
+                "1981ae.01d4be53"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "fa034db9.8bac4",\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": 552.3377494812012,\r
+        "y": 538.5561301708221,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "560d6ca1.0b4dd4",\r
+        "type": "call",\r
+        "name": "call esr-thirdparty-sdnc",\r
+        "xml": "<call module='DataChange' rpc='esr-thirdparty-sdnc' mode='sync' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1316.3379707336426,\r
+        "y": 346.66678977012634,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "1981ae.01d4be53",\r
+        "type": "switchNode",\r
+        "name": "switch aai-node-type",\r
+        "xml": "<switch test='`$data-change-notification-input.aai-node-type`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 555.8866271972656,\r
+        "y": 414.88262701034546,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "3eac43c0.8ab16c",\r
+                "935a0267.cd419"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "3eac43c0.8ab16c",\r
+        "type": "other",\r
+        "name": "esr-thirdparty-sdnc",\r
+        "xml": "<outcome value='esr-thirdparty-sdnc'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 837.9185485839844,\r
+        "y": 346.05725717544556,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "43f3171.d9a25e8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "935a0267.cd419",\r
+        "type": "other",\r
+        "name": "other",\r
+        "xml": "<outcome value='Other'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 795.8866920471191,\r
+        "y": 413.8826596736908,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "b093dd51.fe287"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "b093dd51.fe287",\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=\"AAI node type not supported\" />",\r
+        "comments": "",\r
+        "x": 951.3312110900879,\r
+        "y": 413.99375891685486,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "43f3171.d9a25e8",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1040.0042114257812,\r
+        "y": 346.8262984752655,\r
+        "z": "bf7c0729.dcd628",\r
+        "wires": [\r
+            [\r
+                "560d6ca1.0b4dd4"\r
+            ]\r
+        ]\r
+    }\r
+]
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json
new file mode 100644 (file)
index 0000000..da0567b
--- /dev/null
@@ -0,0 +1,379 @@
+[\r
+    {\r
+        "id": "865891e7.3a6c6",\r
+        "type": "other",\r
+        "name": "update",\r
+        "xml": "<outcome value='Update'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 673.4443511962891,\r
+        "y": 212.66669368743896,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "3eefa587.6bd50a"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4e8bb18c.6ca95",\r
+        "type": "other",\r
+        "name": "delete",\r
+        "xml": "<outcome value='delete'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 701.6665267944336,\r
+        "y": 484.33349609375,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "523ab02e.031c1"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "523ab02e.031c1",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 857.1112060546875,\r
+        "y": 484.33351707458496,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "977d339.f9669d",\r
+        "type": "comment",\r
+        "name": "TODO: Delete topology from AAI",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 781.7777862548828,\r
+        "y": 447.0001811981201,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "9b67a1c0.1e23e",\r
+        "type": "switchNode",\r
+        "name": "switch aai-event-trigger",\r
+        "xml": "<switch test=\"`$data-change-notification-input.aai-event-trigger`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 457.9999771118164,\r
+        "y": 351.2222261428833,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "865891e7.3a6c6",\r
+                "4e8bb18c.6ca95"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "3eefa587.6bd50a",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 841.7781524658203,\r
+        "y": 211.11124515533447,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "8498ca44.850928",\r
+                "31425256.e48c3e",\r
+                "fd4c6f6.9751e9"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "8498ca44.850928",\r
+        "type": "execute",\r
+        "name": "execute RestApiCallNode Get token",\r
+        "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1119.4376068115234,\r
+        "y": 167.03049993515015,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "c3c1ad15.85994",\r
+                "cd6736f3.94ff18"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "c3c1ad15.85994",\r
+        "type": "success",\r
+        "name": "success",\r
+        "xml": "<outcome value='success'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1354.4376068115234,\r
+        "y": 145.03049993515015,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "e15c61b4.92509"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "cd6736f3.94ff18",\r
+        "type": "failure",\r
+        "name": "failure",\r
+        "xml": "<outcome value='failure'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1346.6876068115234,\r
+        "y": 198.6733832359314,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "40518e2c.2c734"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e15c61b4.92509",\r
+        "type": "set",\r
+        "name": "set token-id",\r
+        "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",\r
+        "comments": "",\r
+        "x": 1508.4376068115234,\r
+        "y": 146.03049993515015,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "31425256.e48c3e",\r
+        "type": "execute",\r
+        "name": "execute RestApiCallNode Get Topology",\r
+        "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1122.7710418701172,\r
+        "y": 260.73423767089844,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "ac09d1db.665eb",\r
+                "4c50157f.5bc03c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ac09d1db.665eb",\r
+        "type": "success",\r
+        "name": "success",\r
+        "xml": "<outcome value='success'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1381.3263664245605,\r
+        "y": 238.73421955108643,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "7a8d5805.fa1088"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "7a8d5805.fa1088",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1556.8818969726562,\r
+        "y": 236.40094184875488,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "7717d78.ee45028",\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=\"Error executing Create vpn rest api\" />\n",\r
+        "comments": "",\r
+        "x": 1565.1041717529297,\r
+        "y": 310.62305545806885,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "4c50157f.5bc03c",\r
+        "type": "failure",\r
+        "name": "failure",\r
+        "xml": "<outcome value='failure'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1386.770851135254,\r
+        "y": 309.84528493881226,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "7717d78.ee45028"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "fe88648c.ffce68",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 78.4443130493164,\r
+        "y": 91,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "7387008c.4a9fe"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "7387008c.4a9fe",\r
+        "type": "service-logic",\r
+        "name": "DataChange ${project.version}",\r
+        "module": "DataChange",\r
+        "version": "${project.version}",\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='DataChange' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 236.55543899536133,\r
+        "y": 132.4444613456726,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "f56e7701.2fd2c8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "f56e7701.2fd2c8",\r
+        "type": "method",\r
+        "name": "method esr-thirdparty-sdnc-discovery",\r
+        "xml": "<method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 333,\r
+        "y": 243.22224235534668,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "4c6047b0.71e118"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4c6047b0.71e118",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 241.22222900390625,\r
+        "y": 352.11122035980225,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "9b67a1c0.1e23e"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "fd4c6f6.9751e9",\r
+        "type": "for",\r
+        "name": "for each Network",\r
+        "xml": "<for index='nidx' start='0' end='`$topology.networks.network_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1054.9258041381836,\r
+        "y": 388.22217655181885,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "22efb538.f3605a"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "22efb538.f3605a",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1244.925765991211,\r
+        "y": 395.9999694824219,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            [\r
+                "995bcad0.798cf8",\r
+                "31478e5.e5c4072"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "995bcad0.798cf8",\r
+        "type": "call",\r
+        "name": "call update-network-to-aai",\r
+        "xml": "<call module='DataChange' rpc='update-network-to-aai' mode='sync' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1498.2591876983643,\r
+        "y": 459.3333396911621,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "31478e5.e5c4072",\r
+        "type": "set",\r
+        "name": "set network",\r
+        "xml": "<set>\n<parameter name='network.' value='`$topology.networks.network[$nidx].`' />\n",\r
+        "comments": "",\r
+        "x": 1450.4813079833984,\r
+        "y": 377.111083984375,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "40518e2c.2c734",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1508.2590026855469,\r
+        "y": 193.7777624130249,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "793cc07c.4e65e",\r
+        "type": "comment",\r
+        "name": "Do Nothing",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 1643.814576466878,\r
+        "y": 192.666638162401,\r
+        "z": "fce0b4d3.a9be08",\r
+        "wires": []\r
+    }\r
+]
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc.json b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc.json
new file mode 100644 (file)
index 0000000..5c40ac4
--- /dev/null
@@ -0,0 +1,320 @@
+[\r
+    {\r
+        "id": "d0fde8b6.3aa408",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 114.00390625,\r
+        "y": 42.00390625,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "4796011e.231d3"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4796011e.231d3",\r
+        "type": "service-logic",\r
+        "name": "DataChange ${project.version}",\r
+        "module": "DataChange",\r
+        "version": "${project.version}",\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='DataChange' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 300.1150550842285,\r
+        "y": 146.44837760925293,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "83e631da.db4b1"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "83e631da.db4b1",\r
+        "type": "method",\r
+        "name": "method esr-thirdparty-sdnc",\r
+        "xml": "<method rpc='esr-thirdparty-sdnc' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 297.5596046447754,\r
+        "y": 310.2261629104614,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "2d86f41b.00eefc"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "2d86f41b.00eefc",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 252.7818717956543,\r
+        "y": 445.1152181625366,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "1ccf3882.d71c77",\r
+                "41fd63bc.2e97bc",\r
+                "ba86cde8.fb9f3",\r
+                "b799af7a.5b9c9"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ba86cde8.fb9f3",\r
+        "type": "record",\r
+        "name": "record",\r
+        "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"data-change-notification\"/>\n<parameter name=\"field3\" value=\"Config\"/>\n<parameter name=\"field4\" value=\"`service-url`\"/>\n<parameter name=\"field5\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url`\"/>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 542.00390625,\r
+        "y": 516.00390625,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "1ccf3882.d71c77",\r
+        "type": "call",\r
+        "name": "call validate-esr-thirdparty-sdnc-input",\r
+        "xml": "<call module='DataChange' rpc='validate-esr-thirdparty-sdnc-input' mode='sync' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 655.7815399169922,\r
+        "y": 379.0037097930908,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "41fd63bc.2e97bc",\r
+        "type": "for",\r
+        "name": "for 0..key-data_length",\r
+        "xml": "<for index='idx' start='0' end='`$data-change-notification-input.key-data_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 590.4480133056641,\r
+        "y": 461.19469451904297,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "b1d2d6de.13b948"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "b1d2d6de.13b948",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 762.3374786376953,\r
+        "y": 460.4169397354126,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "1ad86336.4ad5cd",\r
+                "fa2d7e75.6219e",\r
+                "5d462805.1bcf28",\r
+                "44977471.592c0c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "1ad86336.4ad5cd",\r
+        "type": "switchNode",\r
+        "name": "switch service-url",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 974.5591812133789,\r
+        "y": 370.5280923843384,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "49195641.421748"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "49195641.421748",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1138.5593032836914,\r
+        "y": 369.5593252182007,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "68e2f0ac.a4549"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "68e2f0ac.a4549",\r
+        "type": "set",\r
+        "name": "set service-url",\r
+        "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value='`$data-change-notification-input.key-data[$idx].key-value`' />\n",\r
+        "comments": "",\r
+        "x": 1292.5593948364258,\r
+        "y": 369.1593189239502,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "fa2d7e75.6219e",\r
+        "type": "switchNode",\r
+        "name": "switch user-name",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 971.8489265441895,\r
+        "y": 439.7751522064209,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "4a967272.ac408c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "4a967272.ac408c",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1140.8489151000977,\r
+        "y": 437.8063955307007,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "a97aae71.052dc"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "a97aae71.052dc",\r
+        "type": "set",\r
+        "name": "set user",\r
+        "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value='`$data-change-notification-input.key-data[$idx].key-value`' />\n",\r
+        "comments": "",\r
+        "x": 1276.8490676879883,\r
+        "y": 437.40638637542725,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "5d462805.1bcf28",\r
+        "type": "switchNode",\r
+        "name": "switch password",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'password'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 969.6267585754395,\r
+        "y": 505.33070182800293,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "aa2c8a18.06def8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "aa2c8a18.06def8",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1141.6267166137695,\r
+        "y": 505.36194705963135,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "ae62fe3a.d8789"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ae62fe3a.d8789",\r
+        "type": "set",\r
+        "name": "set password",\r
+        "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value='`$data-change-notification-input.key-data[$idx].key-value`' />\n",\r
+        "comments": "",\r
+        "x": 1296.6269607543945,\r
+        "y": 503.9619264602661,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "b799af7a.5b9c9",\r
+        "type": "call",\r
+        "name": "call esr-thirdparty-sdnc-discovery",\r
+        "xml": "<call module='DataChange' rpc='esr-thirdparty-sdnc-discovery' mode='sync' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 613.4416656494141,\r
+        "y": 587.5529069900513,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "44977471.592c0c",\r
+        "type": "switchNode",\r
+        "name": "switch esr-system-info-id",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'esr-system-info-id'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 991.4480667114258,\r
+        "y": 559.3370685577393,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "e1fdba16.c57aa8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e1fdba16.c57aa8",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1166.4480438232422,\r
+        "y": 557.3682584762573,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": [\r
+            [\r
+                "3f219327.b83efc"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "3f219327.b83efc",\r
+        "type": "set",\r
+        "name": "set esr-system-info-id",\r
+        "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.id' value='`$data-change-notification-input.key-data[$idx].key-value`' />\n",\r
+        "comments": "",\r
+        "x": 1332.448013305664,\r
+        "y": 558.968282699585,\r
+        "z": "57a3a26d.f7d23c",\r
+        "wires": []\r
+    }\r
+]
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/json/DataChange_update-network-to-aai.json b/platform-logic/datachange/src/main/json/DataChange_update-network-to-aai.json
new file mode 100644 (file)
index 0000000..9e0f17a
--- /dev/null
@@ -0,0 +1,239 @@
+[\r
+    {\r
+        "id": "8623b35d.0cf2f",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 125.00390625,\r
+        "y": 106.00650644302368,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "e714b902.20b798"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e714b902.20b798",\r
+        "type": "service-logic",\r
+        "name": "DataChange ${project.version}",\r
+        "module": "DataChange",\r
+        "version": "${project.version}",\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='DataChange' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 327.0039291381836,\r
+        "y": 106.89541959762573,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "fb9820f4.4f92d"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "fb9820f4.4f92d",\r
+        "type": "method",\r
+        "name": "method update-network-to-aai",\r
+        "xml": "<method rpc='update-network-to-aai' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 336.1151580810547,\r
+        "y": 178.22874116897583,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "b1c5fee.fa526"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "b1c5fee.fa526",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 583.3373489379883,\r
+        "y": 176.78443002700806,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "d5568e89.0fd49",\r
+                "65e1e67.b95e318",\r
+                "fcfec7b9.699088"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "d5568e89.0fd49",\r
+        "type": "update",\r
+        "name": "save Zone",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='zone' \n      key='zone.zone-id = $tmp.network-id' >\n<parameter name='zone-id' value='`$tmp.network-id`' />\n<parameter name='zone-name' value='`$network.client-id`' />\n<parameter name='design-type' value='`$network.te-topology-id`' />\n<parameter name='zone-context' value='`$network.provider-id`' />\n\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 808.3371810913086,\r
+        "y": 176.00651788711548,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "af980bc1.1f72b8",\r
+        "type": "update",\r
+        "name": "save pnf",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n      key='pnf.pnf-name = $node.node-id' >\n<parameter name='pnf-name' value='`$node.node-id`' />\n<parameter name='pnf-id' value='`$node.node-id`' />\n<parameter name='in-maint' value='true' />\n\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1052.1150245666504,\r
+        "y": 271.11759901046753,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "65e1e67.b95e318",\r
+        "type": "for",\r
+        "name": "for each node",\r
+        "xml": "<for index='pidx' start='0' end='`$network.node_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 823.8927383422852,\r
+        "y": 339.33982038497925,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "af980bc1.1f72b8",\r
+                "476a4fdb.dc5f5",\r
+                "96688ca0.6a9f6",\r
+                "9b63a4a9.acd508",\r
+                "8140ea7f.0a90f8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "476a4fdb.dc5f5",\r
+        "type": "set",\r
+        "name": "set network",\r
+        "xml": "<set>\n<parameter name='node.' value='`$network.node[$pidx].`' />\n",\r
+        "comments": "",\r
+        "x": 1062.114990234375,\r
+        "y": 202.22872114181519,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "96688ca0.6a9f6",\r
+        "type": "save",\r
+        "name": "save pnf relationship to zone in AAI",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"zone\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/zones/zone/' + $tmp.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"zone.zone-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.network-id`\" />",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1138.7819213867188,\r
+        "y": 344.4509873390198,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "9b63a4a9.acd508",\r
+        "type": "for",\r
+        "name": "for each termination point",\r
+        "xml": "<for index='tidx' start='0' end='`$node.termination-point_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1099.448387145996,\r
+        "y": 497.11759424209595,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            [\r
+                "b34b1b54.abd288",\r
+                "66fee673.3f4e78",\r
+                "6031db9d.646964",\r
+                "3a479676.ca94ea"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "b34b1b54.abd288",\r
+        "type": "set",\r
+        "name": "set termination point",\r
+        "xml": "<set>\n<parameter name='tp.' value='`$node.termination-point[$tidx].`' />\n",\r
+        "comments": "",\r
+        "x": 1480.1151962280273,\r
+        "y": 384.00655603408813,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "66fee673.3f4e78",\r
+        "type": "update",\r
+        "name": "save logical-link",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link' \n      key='logical-link.link-name = $unique-ltpId' >\n<parameter name='link-name' value='`$unique-ltpId`' />\n<parameter name='link-type' value='VL' />\n<parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />\n<parameter name='in-maint' value='`$tp.svc.supported-classification.transparent`' />\n\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1463.8188934326172,\r
+        "y": 509.5621018409729,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "6031db9d.646964",\r
+        "type": "save",\r
+        "name": "save pnf relationship to logical-link in AAI",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"logical-link\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/logical-links/logical-link/' + $unique-ltpId`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"logical-link.link-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$unique-ltpId`\" />",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1542.7077331542969,\r
+        "y": 577.3398509025574,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "3a479676.ca94ea",\r
+        "type": "set",\r
+        "name": "set unique-ltpId",\r
+        "xml": "<set>\n<parameter name='unique-ltpId' value=\"`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`\" />\n",\r
+        "comments": "",\r
+        "x": 1459.0040893554688,\r
+        "y": 445.1176323890686,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "fcfec7b9.699088",\r
+        "type": "execute",\r
+        "name": "execute",\r
+        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$network.network-id`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.network-id\"/>\n    <parameter name=\"target\" value=\"/\"/>\n    <parameter name=\"replacement\" value=\"-\"/>\n    ",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 796.9974060058594,\r
+        "y": 79.99999856948853,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "8140ea7f.0a90f8",\r
+        "type": "save",\r
+        "name": "save pnf relation with esr-thirdparty-sdnc",\r
+        "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \n      key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id' \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"pnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/pnfs/pnf/' + $node.node-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$node.node-id`\" />\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1119.00390625,\r
+        "y": 414.9999985694885,\r
+        "z": "1ef7a393.52dc1c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    }\r
+]
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/json/DataChange_validate-esr-thirdparty-sdnc-input.json b/platform-logic/datachange/src/main/json/DataChange_validate-esr-thirdparty-sdnc-input.json
new file mode 100644 (file)
index 0000000..b17138e
--- /dev/null
@@ -0,0 +1,457 @@
+[\r
+    {\r
+        "id": "757023b0.c2468c",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 117.00390625,\r
+        "y": 95.99999871850014,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "7a528753.0793a8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "7a528753.0793a8",\r
+        "type": "service-logic",\r
+        "name": "DataChange ${project.version}",\r
+        "module": "DataChange",\r
+        "version": "${project.version}",\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='DataChange' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 320.11501693725586,\r
+        "y": 98.00002494454384,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "ae93aaac.418418"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ae93aaac.418418",\r
+        "type": "method",\r
+        "name": "method validate-esr-thirdparty-sdnc-input",\r
+        "xml": "<method rpc='validate-esr-thirdparty-sdnc-input' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 398.5596008300781,\r
+        "y": 220.00002479553223,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "37ee7462.da3a1c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "2152ae75.5db0e2",\r
+        "type": "failure",\r
+        "name": "failure",\r
+        "xml": "<outcome value='failure'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2487.0038986206055,\r
+        "y": 1273.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "e2ca5b21.1154c8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e2ca5b21.1154c8",\r
+        "type": "returnFailure",\r
+        "name": "return failure",\r
+        "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while splitting sna1_route\" />\n",\r
+        "comments": "",\r
+        "x": 2668.0038986206055,\r
+        "y": 1271.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "6fe2c29e.8f19cc",\r
+        "type": "failure",\r
+        "name": "failure",\r
+        "xml": "<outcome value='failure'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2485.0038986206055,\r
+        "y": 1375.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "e3dd559f.6ba7b8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e3dd559f.6ba7b8",\r
+        "type": "returnFailure",\r
+        "name": "return failure",\r
+        "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while splitting sna1_route\" />\n",\r
+        "comments": "",\r
+        "x": 2666.0038986206055,\r
+        "y": 1373.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "47680dcc.0511d4",\r
+        "type": "failure",\r
+        "name": "success",\r
+        "xml": "<outcome value='success'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2486.0038986206055,\r
+        "y": 1207.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "18757b49.6ae535"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "f3d08cd7.3ee9b",\r
+        "type": "failure",\r
+        "name": "success",\r
+        "xml": "<outcome value='success'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 2482.0038986206055,\r
+        "y": 1327.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "20888a03.0d8406"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "18757b49.6ae535",\r
+        "type": "set",\r
+        "name": "set route1 ip-prefix next-hop",\r
+        "xml": "<set>\n<parameter name='prop.l3vpn.sna1-route.ip-prefix' value='`$route1[0]`' />\n<parameter name='prop.l3vpn.sna1-route.next-hop' value='`$route1[1]`' />\n",\r
+        "comments": "",\r
+        "x": 2693.0038986206055,\r
+        "y": 1201.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "20888a03.0d8406",\r
+        "type": "set",\r
+        "name": "set route2 ip-prefix next-hop",\r
+        "xml": "<set>\n<parameter name='prop.l3vpn.sna2-route.ip-prefix' value='`$route2[0]`' />\n<parameter name='prop.l3vpn.sna2-route.next-hop' value='`$route2[1]`' />",\r
+        "comments": "",\r
+        "x": 2693.0038986206055,\r
+        "y": 1320.5555483400822,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "e1257f0.a7f488",\r
+        "type": "switchNode",\r
+        "name": "switch aai-node-type",\r
+        "xml": "<switch test='`$data-change-notification-input.aai-node-type`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 786.8929500579834,\r
+        "y": 374.5555830001831,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "ec1259f5.ebbc68"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "ec1259f5.ebbc68",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1012.6072008950368,\r
+        "y": 357.5555825914653,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "df711004.31bd3"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "df711004.31bd3",\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=\"data-change-notification-input.aai-node-type is a required input\" />\n",\r
+        "comments": "",\r
+        "x": 1164.0357668740407,\r
+        "y": 357.55558068411665,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "ecc0f598.db90c8",\r
+        "type": "switchNode",\r
+        "name": "switch aai-event-trigger",\r
+        "xml": "<switch test='`$data-change-notification-input.aai-event-trigger`'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 796.464277267456,\r
+        "y": 316.12700843811035,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "a9518242.ec786"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "a9518242.ec786",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1011.1786212921143,\r
+        "y": 314.69840812683105,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "239438cd.9f0138"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "239438cd.9f0138",\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=\"data-change-notification-input.aai-event-trigger is a required input\" />\n",\r
+        "comments": "",\r
+        "x": 1161.1785945892334,\r
+        "y": 314.6984176635742,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "4bbc510.85d9db",\r
+        "type": "for",\r
+        "name": "for 0..key-data_length",\r
+        "xml": "<for index='idx' start='0' end='`$data-change-notification-input.key-data_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 785.3373355865479,\r
+        "y": 445.0000476837158,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "de7f2e06.cc171"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "de7f2e06.cc171",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 737.2263736724854,\r
+        "y": 535.4444351196289,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "2f8a5311.978d7c",\r
+                "267435da.461d5a",\r
+                "596d52bd.fd695c"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "a0ba4f6d.060be",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1183.671136856079,\r
+        "y": 557.7778100967407,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "49a377b1.d9e3a8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "577c0f47.e83ae",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1178.2425479888916,\r
+        "y": 496.92064571380615,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "713caa1.0fcb154"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "713caa1.0fcb154",\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=\"data-change-notification-input.key-data.key-data.service-url is a required input\" />\n",\r
+        "comments": "",\r
+        "x": 1367.2424297332764,\r
+        "y": 495.92064571380615,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "8eb34243.18f14",\r
+        "type": "other",\r
+        "name": "NULL",\r
+        "xml": "<outcome value=''>",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1186.671136856079,\r
+        "y": 620.634973526001,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "347ffe80.91f072"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "37ee7462.da3a1c",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 488.892822265625,\r
+        "y": 378.77777767181396,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "ecc0f598.db90c8",\r
+                "e1257f0.a7f488",\r
+                "4bbc510.85d9db"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "2f8a5311.978d7c",\r
+        "type": "switchNode",\r
+        "name": "switch service-url",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 987.7076587677002,\r
+        "y": 495,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "577c0f47.e83ae"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "267435da.461d5a",\r
+        "type": "switchNode",\r
+        "name": "switch user-name",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 987.9973659515381,\r
+        "y": 564.2470645904541,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "a0ba4f6d.060be"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "596d52bd.fd695c",\r
+        "type": "switchNode",\r
+        "name": "switch password",\r
+        "xml": "<switch test=\"`$data-change-notification-input.key-data[$idx].key-name == 'password'`\">\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 985.7751979827881,\r
+        "y": 629.8026142120361,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            [\r
+                "8eb34243.18f14"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "49a377b1.d9e3a8",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1347.337236404419,\r
+        "y": 557.2222194671631,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "347ffe80.91f072",\r
+        "type": "block",\r
+        "name": "block",\r
+        "xml": "<block>\n",\r
+        "atomic": "false",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1350.670488357544,\r
+        "y": 626.11110496521,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "110d1cac.458883",\r
+        "type": "comment",\r
+        "name": "do nothing to support http",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 1542.8929843902588,\r
+        "y": 555.0000343322754,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "83190729.11d658",\r
+        "type": "comment",\r
+        "name": "do nothing to support http",\r
+        "info": "",\r
+        "comments": "",\r
+        "x": 1542.8927783966064,\r
+        "y": 624.9999752044678,\r
+        "z": "43ea58cb.5b56b8",\r
+        "wires": []\r
+    }\r
+]
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/resources/graph.versions b/platform-logic/datachange/src/main/resources/graph.versions
new file mode 100644 (file)
index 0000000..5c1b088
--- /dev/null
@@ -0,0 +1,5 @@
+DataChange data-change-notification ${project.version} sync
+DataChange esr-thirdparty-sdnc ${project.version} sync
+DataChange validate-esr-thirdparty-sdnc-input ${project.version} sync
+DataChange esr-thirdparty-sdnc-discovery ${project.version} sync
+DataChange update-network-to-aai ${project.version} sync
diff --git a/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml b/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml
new file mode 100644 (file)
index 0000000..76f2fe8
--- /dev/null
@@ -0,0 +1,27 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>\r
+    <method rpc='data-change-notification' mode='sync'>\r
+        <block atomic="true">\r
+            <switch test='`$data-change-notification-input.aai-node-type`'>\r
+                <outcome value='esr-thirdparty-sdnc'>\r
+                    <block atomic="true">\r
+                        <call module='DataChange' rpc='esr-thirdparty-sdnc' mode='sync' ></call>\r
+                    </block>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="AAI node type not supported" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <return status='success'>\r
+                <parameter name="ack-final-indicator" value="Y" />\r
+                <parameter name="error-code" value="200" />\r
+                <parameter name="error-message" value="`$error-message`" />\r
+            </return>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
new file mode 100644 (file)
index 0000000..ba2ea39
--- /dev/null
@@ -0,0 +1,67 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>\r
+    <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>\r
+        <block atomic="true">\r
+            <switch test="`$data-change-notification-input.aai-event-trigger`">\r
+                <outcome value='Update'>\r
+                    <block atomic="true">\r
+                        <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                            <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />\r
+                            <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />\r
+                            <parameter name="format" value="json"/>\r
+                            <parameter name="httpMethod" value="post"/>\r
+                            <parameter name="responsePrefix" value="token-result"/>\r
+                            <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>\r
+                            <parameter name="trustStorePassword" value="adminadmin"/>\r
+                            <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>\r
+                            <parameter name="keyStorePassword" value="adminadmin"/>\r
+                            <outcome value='success'>\r
+                                <set>\r
+                                    <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\r
+                                </set>\r
+                            </outcome>\r
+                            <outcome value='failure'>\r
+                                <block></block>\r
+                            </outcome>\r
+                        </execute>\r
+                        <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                            <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />\r
+                            <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />\r
+                            <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />\r
+                            <parameter name="format" value="json"/>\r
+                            <parameter name="httpMethod" value="get"/>\r
+                            <parameter name="responsePrefix" value="topology"/>\r
+                            <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>\r
+                            <parameter name="trustStorePassword" value="adminadmin"/>\r
+                            <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>\r
+                            <parameter name="keyStorePassword" value="adminadmin"/>\r
+                            <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />\r
+                            <outcome value='success'>\r
+                                <block atomic="true"></block>\r
+                            </outcome>\r
+                            <outcome value='failure'>\r
+                                <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="Error executing Create vpn rest api" />\r
+                                </return>\r
+                            </outcome>\r
+                        </execute>\r
+                        <for index='nidx' start='0' end='`$topology.networks.network_length`' >\r
+                            <block>\r
+                                <set>\r
+                                    <parameter name='network.' value='`$topology.networks.network[$nidx].`' />\r
+                                </set>\r
+                                <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>\r
+                            </block>\r
+                        </for>\r
+                    </block>\r
+                </outcome>\r
+                <outcome value='delete'>\r
+                    <block atomic="true"></block>\r
+                </outcome>\r
+            </switch>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml
new file mode 100644 (file)
index 0000000..33d91a7
--- /dev/null
@@ -0,0 +1,50 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>\r
+    <method rpc='esr-thirdparty-sdnc' mode='sync'>\r
+        <block atomic="true">\r
+            <call module='DataChange' rpc='validate-esr-thirdparty-sdnc-input' mode='sync' ></call>\r
+            <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`' >\r
+                <block>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`">\r
+                        <outcome value='true'>\r
+                            <set>\r
+                                <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value='`$data-change-notification-input.key-data[$idx].key-value`' />\r
+                            </set>\r
+                        </outcome>\r
+                    </switch>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`">\r
+                        <outcome value='true'>\r
+                            <set>\r
+                                <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value='`$data-change-notification-input.key-data[$idx].key-value`' />\r
+                            </set>\r
+                        </outcome>\r
+                    </switch>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'password'`">\r
+                        <outcome value='true'>\r
+                            <set>\r
+                                <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value='`$data-change-notification-input.key-data[$idx].key-value`' />\r
+                            </set>\r
+                        </outcome>\r
+                    </switch>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'esr-system-info-id'`">\r
+                        <outcome value='true'>\r
+                            <set>\r
+                                <parameter name='prop.sdncRestApi.thirdpartySdnc.id' value='`$data-change-notification-input.key-data[$idx].key-value`' />\r
+                            </set>\r
+                        </outcome>\r
+                    </switch>\r
+                </block>\r
+            </for>\r
+            <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">\r
+                <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>\r
+                <parameter name="field1" value="__TIMESTAMP__"/>\r
+                <parameter name="field2" value="data-change-notification"/>\r
+                <parameter name="field3" value="Config"/>\r
+                <parameter name="field4" value="`service-url`"/>\r
+                <parameter name="field5" value="`$prop.sdncRestApi.thirdpartySdnc.url`"/>\r
+            </record>\r
+            <call module='DataChange' rpc='esr-thirdparty-sdnc-discovery' mode='sync' ></call>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml
new file mode 100644 (file)
index 0000000..cdd0edb
--- /dev/null
@@ -0,0 +1,69 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>\r
+    <method rpc='update-network-to-aai' mode='sync'>\r
+        <block atomic="true">\r
+            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+                <parameter name="source" value="`$network.network-id`"/>\r
+                <parameter name="outputPath" value="tmp.network-id"/>\r
+                <parameter name="target" value="/"/>\r
+                <parameter name="replacement" value="-"/>\r
+            </execute>\r
+            <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='zone' \r
+      key='zone.zone-id = $tmp.network-id' >\r
+                <parameter name='zone-id' value='`$tmp.network-id`' />\r
+                <parameter name='zone-name' value='`$network.client-id`' />\r
+                <parameter name='design-type' value='`$network.te-topology-id`' />\r
+                <parameter name='zone-context' value='`$network.provider-id`' />\r
+            </save>\r
+            <for index='pidx' start='0' end='`$network.node_length`' >\r
+                <set>\r
+                    <parameter name='node.' value='`$network.node[$pidx].`' />\r
+                </set>\r
+                <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \r
+      key='pnf.pnf-name = $node.node-id' >\r
+                    <parameter name='pnf-name' value='`$node.node-id`' />\r
+                    <parameter name='pnf-id' value='`$node.node-id`' />\r
+                    <parameter name='in-maint' value='true' />\r
+                </save>\r
+                <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \r
+      key='pnf.pnf-name = $node.node-id' force="true" pfx="tmp.AnAI-data">\r
+                    <parameter name="relationship-list.relationship[0].related-to" value="zone" />\r
+                    <parameter name="relationship-list.relationship[0].related-link" value="`'/network/zones/zone/' + $tmp.network-id`" />\r
+                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="zone.zone-id" />\r
+                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.network-id`" />\r
+                </save>\r
+                <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \r
+      key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id' \r
+      force="true" pfx="tmp.AnAI-data">\r
+                    <parameter name="relationship-list.relationship[0].related-to" value="pnf" />\r
+                    <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $node.node-id`" />\r
+                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name" />\r
+                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$node.node-id`" />\r
+                </save>\r
+                <for index='tidx' start='0' end='`$node.termination-point_length`' >\r
+                    <set>\r
+                        <parameter name='tp.' value='`$node.termination-point[$tidx].`' />\r
+                    </set>\r
+                    <set>\r
+                        <parameter name='unique-ltpId' value="`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`" />\r
+                    </set>\r
+                    <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link' \r
+      key='logical-link.link-name = $unique-ltpId' >\r
+                        <parameter name='link-name' value='`$unique-ltpId`' />\r
+                        <parameter name='link-type' value='VL' />\r
+                        <parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />\r
+                        <parameter name='in-maint' value='`$tp.svc.supported-classification.transparent`' />\r
+                    </save>\r
+                    <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \r
+      key='pnf.pnf-name = $node.node-id' force="true" pfx="tmp.AnAI-data">\r
+                        <parameter name="relationship-list.relationship[0].related-to" value="logical-link" />\r
+                        <parameter name="relationship-list.relationship[0].related-link" value="`'/network/logical-links/logical-link/' + $unique-ltpId`" />\r
+                        <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="logical-link.link-name" />\r
+                        <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-ltpId`" />\r
+                    </save>\r
+                </for>\r
+            </for>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_validate-esr-thirdparty-sdnc-input.xml b/platform-logic/datachange/src/main/xml/DataChange_validate-esr-thirdparty-sdnc-input.xml
new file mode 100644 (file)
index 0000000..9c4443c
--- /dev/null
@@ -0,0 +1,49 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>\r
+    <method rpc='validate-esr-thirdparty-sdnc-input' mode='sync'>\r
+        <block atomic="true">\r
+            <switch test='`$data-change-notification-input.aai-event-trigger`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="data-change-notification-input.aai-event-trigger is a required input" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <switch test='`$data-change-notification-input.aai-node-type`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="data-change-notification-input.aai-node-type is a required input" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`' >\r
+                <block>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`">\r
+                        <outcome value=''>\r
+                            <return status='failure'>\r
+                                <parameter name='ack-final' value='Y'/>\r
+                                <parameter name="error-code" value="500" />\r
+                                <parameter name="error-message" value="data-change-notification-input.key-data.key-data.service-url is a required input" />\r
+                            </return>\r
+                        </outcome>\r
+                    </switch>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`">\r
+                        <outcome value=''>\r
+                            <block></block>\r
+                        </outcome>\r
+                    </switch>\r
+                    <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'password'`">\r
+                        <outcome value=''>\r
+                            <block></block>\r
+                        </outcome>\r
+                    </switch>\r
+                </block>\r
+            </for>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_connection-attachment-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_connection-attachment-topology-operation.json
new file mode 100644 (file)
index 0000000..77d885a
--- /dev/null
@@ -0,0 +1,536 @@
+[
+  {
+    "id": "b2143086.a417",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 109.03125,
+    "y": 37.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "7e88a37a.69419c"
+      ]
+    ]
+  },
+  {
+    "id": "7e88a37a.69419c",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 247.03126525878906,
+    "y": 98.03124809265137,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "90bc847a.1e90f8"
+      ]
+    ]
+  },
+  {
+    "id": "90bc847a.1e90f8",
+    "type": "method",
+    "name": "connection-attachment-topology-operation",
+    "xml": "<method rpc='connection-attachment-topology-operation' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 282.0312805175781,
+    "y": 146.03127670288086,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "bf0dea50.c6f6f8"
+      ]
+    ]
+  },
+  {
+    "id": "bf0dea50.c6f6f8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 207.03125,
+    "y": 224.03124237060547,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "4b652dbe.7deec4",
+        "976e09a7.a23c78",
+        "d692689.8b14098",
+        "f2e8c4be.f6edf8"
+      ]
+    ]
+  },
+  {
+    "id": "4b652dbe.7deec4",
+    "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",
+    "comments": "",
+    "x": 421.40042877197266,
+    "y": 836.8741173744202,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "976e09a7.a23c78",
+    "type": "switchNode",
+    "name": "switch svc-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 428.0311737060547,
+    "y": 383.44496059417725,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "7df40438.8d552c",
+        "854b6002.a361e",
+        "d0a5f285.16e91",
+        "a7c210e.8aeb8f",
+        "d7a3669.7308f98"
+      ]
+    ]
+  },
+  {
+    "id": "d692689.8b14098",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:validate-connection-attachment-input",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-connection-attachment-input' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 619.6026916503906,
+    "y": 204.01640129089355,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "7df40438.8d552c",
+    "type": "other",
+    "name": "activate",
+    "xml": "<outcome value='activate'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 643.3169174194336,
+    "y": 392.58784008026123,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "c747bb59.396bf8"
+      ]
+    ]
+  },
+  {
+    "id": "854b6002.a361e",
+    "type": "other",
+    "name": "deactivate",
+    "xml": "<outcome value='deactivate'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 653.3169784545898,
+    "y": 673.5880031585693,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "5f2c7e54.e5319"
+      ]
+    ]
+  },
+  {
+    "id": "d0a5f285.16e91",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 642.6502876281738,
+    "y": 758.9214267730713,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "63b93e5c.700f6"
+      ]
+    ]
+  },
+  {
+    "id": "63b93e5c.700f6",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"sdnc-request-header.svc-action is invalid\" />\n",
+    "comments": "",
+    "x": 824.6502838134766,
+    "y": 757.9214363098145,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "f2e8c4be.f6edf8",
+    "type": "set",
+    "name": "Set final indicator to Y",
+    "xml": "<set>\n<parameter name=\"ack-final\" value=\"Y\"/>",
+    "comments": "",
+    "x": 440.4281234741211,
+    "y": 796.0324559211731,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a7c210e.8aeb8f",
+    "type": "other",
+    "name": "create",
+    "xml": "<outcome value='create'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 642.5576133728027,
+    "y": 257.19257259368896,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "8d1575e7.3d39d8"
+      ]
+    ]
+  },
+  {
+    "id": "d7a3669.7308f98",
+    "type": "other",
+    "name": "delete",
+    "xml": "<outcome value='delete'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 647.8909645080566,
+    "y": 533.8593759536743,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "347f7912.887506"
+      ]
+    ]
+  },
+  {
+    "id": "380d46d2.a08ada",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-attachment-topology-operation-create",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-create' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1537.1175537109375,
+    "y": 208.57203483581543,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "8d1575e7.3d39d8",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 833.5313034057617,
+    "y": 256.0312566757202,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "b4498aac.7cb2b8",
+        "ed77a730.056558"
+      ]
+    ]
+  },
+  {
+    "id": "b4498aac.7cb2b8",
+    "type": "outcome",
+    "name": "CreateSOTNAttachmentInstance",
+    "xml": "<outcome value='CreateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1088.864517211914,
+    "y": 208.03106307983398,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "380d46d2.a08ada"
+      ]
+    ]
+  },
+  {
+    "id": "ed77a730.056558",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1018.8646240234375,
+    "y": 299.69779205322266,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "1b79383c.71b538"
+      ]
+    ]
+  },
+  {
+    "id": "1b79383c.71b538",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`\" />\n",
+    "comments": "",
+    "x": 1184.5312881469727,
+    "y": 300.03125762939453,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "b97ace55.086d3",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-attachment-topology-operation-activate",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-activate' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1546.5312957763672,
+    "y": 343.03125953674316,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "a6785aab.86f948",
+    "type": "outcome",
+    "name": "ActivateSOTNAttachmentInstance",
+    "xml": "<outcome value='ActivateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1096.278335571289,
+    "y": 345.4902935028076,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "b97ace55.086d3"
+      ]
+    ]
+  },
+  {
+    "id": "d100865f.7e59f8",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1026.2784423828125,
+    "y": 437.1570224761963,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "19062ead.ade691"
+      ]
+    ]
+  },
+  {
+    "id": "bbd40a3d.52a218",
+    "type": "outcome",
+    "name": "DeactivateSOTNAttachmentInstance",
+    "xml": "<outcome value='DeactivateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1115.8645477294922,
+    "y": 484.0310802459717,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "cdb50b2f.8ff328"
+      ]
+    ]
+  },
+  {
+    "id": "6647d681.d75a78",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1030.8645706176758,
+    "y": 575.6977853775024,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "dab4a1b3.5c9b3"
+      ]
+    ]
+  },
+  {
+    "id": "cdb50b2f.8ff328",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-attachment-topology-operation-deactivate",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-deactivate' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1574.5313720703125,
+    "y": 484.03126335144043,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "8c01d720.070a78",
+    "type": "outcome",
+    "name": "DeleteSOTNAttachmentInstance",
+    "xml": "<outcome value='DeleteSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1104.8644638061523,
+    "y": 625.0310564041138,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "58c79286.6e607c"
+      ]
+    ]
+  },
+  {
+    "id": "aa83e7c.d9f1218",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1034.8645706176758,
+    "y": 716.6977853775024,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "4e0c491c.1e9da8"
+      ]
+    ]
+  },
+  {
+    "id": "58c79286.6e607c",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-attachment-topology-operation-delete",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-delete' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1560.5313415527344,
+    "y": 626.0312671661377,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "c747bb59.396bf8",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 831.0313110351562,
+    "y": 397.03126335144043,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "a6785aab.86f948",
+        "d100865f.7e59f8"
+      ]
+    ]
+  },
+  {
+    "id": "347f7912.887506",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 845.03125,
+    "y": 538.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "bbd40a3d.52a218",
+        "6647d681.d75a78"
+      ]
+    ]
+  },
+  {
+    "id": "5f2c7e54.e5319",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 848.03125,
+    "y": 673.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+      [
+        "8c01d720.070a78",
+        "aa83e7c.d9f1218"
+      ]
+    ]
+  },
+  {
+    "id": "19062ead.ade691",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`\" />\n",
+    "comments": "",
+    "x": 1190.03125,
+    "y": 437.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "dab4a1b3.5c9b3",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`\" />\n",
+    "comments": "",
+    "x": 1198.03125,
+    "y": 577.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "4e0c491c.1e9da8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`\" />\n",
+    "comments": "",
+    "x": 1203.03125,
+    "y": 716.03125,
+    "z": "efb71132.eba6e",
+    "wires": [
+
+    ]
+  }
+]
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.json
new file mode 100644 (file)
index 0000000..4b055d1
--- /dev/null
@@ -0,0 +1,2970 @@
+[
+  {
+    "id": "a77629b2.29acf8",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 104.03125,
+    "y": 31.999999523162842,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "2a935009.ef91b"
+      ]
+    ]
+  },
+  {
+    "id": "2a935009.ef91b",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 316.03125381469727,
+    "y": 104.00001668930054,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "394d3966.f7a306"
+      ]
+    ]
+  },
+  {
+    "id": "394d3966.f7a306",
+    "type": "method",
+    "name": "sotn-attachment-topology-operation-activate",
+    "xml": "<method rpc='sotn-attachment-topology-operation-activate' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 304.0313720703125,
+    "y": 191.99999952316284,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "3355788a.12aa08"
+      ]
+    ]
+  },
+  {
+    "id": "3355788a.12aa08",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 320.0313720703125,
+    "y": 747.000244140625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "3df84881.f08dd8",
+        "d2f1b91d.444978",
+        "e6d1c52b.520cc8",
+        "1587558f.923b5a",
+        "606696e.6cc0f68",
+        "6558b5c9.5b8bec",
+        "d1e1bdb5.615f1",
+        "c7d4c837.69f1a8",
+        "f3e22a0c.d8db48",
+        "cb89d188.f33cc",
+        "3bc10ee7.beb432",
+        "bef55f2e.ad6b3",
+        "36004db7.4505d2",
+        "d7f464d6.9ac5f8",
+        "a66d68ee.9308e8",
+        "9ab0f309.357b6",
+        "f9e2a4f.0cf5858",
+        "6afb5fe5.f951c",
+        "7b232ea8.d345"
+      ]
+    ]
+  },
+  {
+    "id": "3df84881.f08dd8",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-id,etc",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n",
+    "comments": "",
+    "x": 717.0248107910156,
+    "y": 145.99348640441895,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "66bc483f.e63618",
+    "type": "comment",
+    "name": "set tmp ar-id to fetch resource from MDSAL",
+    "info": "",
+    "comments": "",
+    "x": 745.9851226806641,
+    "y": 110.02528238296509,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d2f1b91d.444978",
+    "type": "set",
+    "name": "set tmp.ar.self-link",
+    "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
+    "comments": "",
+    "x": 671.0247497558594,
+    "y": 238.99349164962769,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c7d4c837.69f1a8",
+    "type": "execute",
+    "name": "execute Properties",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 677.2866401672363,
+    "y": 326.66022062301636,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "e6d1c52b.520cc8",
+    "type": "execute",
+    "name": "generate allotted-resource url",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 709.2866668701172,
+    "y": 414.6602020263672,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "1587558f.923b5a",
+    "type": "get-resource",
+    "name": "get-resource connection-attachment-allotted-resource",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id/' pfx='mdsal-ar' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 780.0247650146484,
+    "y": 504.7712607383728,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "9d21fc06.56c9b",
+        "b5f5dd22.5d92a"
+      ]
+    ]
+  },
+  {
+    "id": "4c5a1d8d.682774",
+    "type": "comment",
+    "name": "GET connection-attachment-allotted-resource from mdsal",
+    "info": "",
+    "comments": "",
+    "x": 786.8395614624023,
+    "y": 476.53857946395874,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "6cf9a5a4.2b253c",
+    "type": "comment",
+    "name": "Used for setting output to API Handler",
+    "info": "",
+    "comments": "",
+    "x": 725.0247802734375,
+    "y": 205.99350118637085,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "15f9c1a1.7257ee",
+    "type": "comment",
+    "name": "Obtain different URL, template location etc",
+    "info": "For saving resource information to MDSAL & for AAI",
+    "comments": "",
+    "x": 743.0247459411621,
+    "y": 291.88238191604614,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b17883ed.6bb59",
+    "type": "comment",
+    "name": "Used to Get AR by id to MDSAL, same as self-link",
+    "info": "",
+    "comments": "",
+    "x": 769.0247650146484,
+    "y": 378.88234090805054,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9d21fc06.56c9b",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1079.6979675292969,
+    "y": 489.9999918937683,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a51a2d9d.383d"
+      ]
+    ]
+  },
+  {
+    "id": "a51a2d9d.383d",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1248.6979713439941,
+    "y": 488.4998927116394,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "1edb162f.f7047a"
+      ]
+    ]
+  },
+  {
+    "id": "1edb162f.f7047a",
+    "type": "switchNode",
+    "name": "switch cr length",
+    "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1459.5552139282227,
+    "y": 488.1190218925476,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "2c727498.5563ec",
+        "cc396d19.c6009"
+      ]
+    ]
+  },
+  {
+    "id": "2c727498.5563ec",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1648.8885192871094,
+    "y": 488.1189799308777,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "94f9a14a.aa9d1"
+      ]
+    ]
+  },
+  {
+    "id": "94f9a14a.aa9d1",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic='true'>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1833.4124088287354,
+    "y": 485.0238137245178,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ccbbcb55.91af38",
+        "ca13a843.2cf298",
+        "b1755c5c.5e7d2"
+      ]
+    ]
+  },
+  {
+    "id": "151fea4f.a51286",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1792.5502090454102,
+    "y": 566.0660452842712,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b5f5dd22.5d92a",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1071.5497703552246,
+    "y": 525.0660767555237,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "318eef9c.54777"
+      ]
+    ]
+  },
+  {
+    "id": "318eef9c.54777",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1251.5497207641602,
+    "y": 525.7326273918152,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "151fea4f.a51286"
+      ]
+    ]
+  },
+  {
+    "id": "cc396d19.c6009",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1637.2164726257324,
+    "y": 525.3993401527405,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "151fea4f.a51286"
+      ]
+    ]
+  },
+  {
+    "id": "ccbbcb55.91af38",
+    "type": "set",
+    "name": "set connection-attachment-ar from get",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.' value='$mdsal-ar.connection-attachment-allotted-resource[0].' />\n",
+    "comments": "",
+    "x": 2201.4758911132812,
+    "y": 454.0000534057617,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b1755c5c.5e7d2",
+    "type": "set",
+    "name": "set oper-status",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-ar.allotted-resource-status.rpc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n",
+    "comments": "",
+    "x": 2135.4759216308594,
+    "y": 527.4285559654236,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ca13a843.2cf298",
+    "type": "switchNode",
+    "name": "switch order-status",
+    "xml": "<switch test='`$connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2145.475700378418,
+    "y": 492.9999899864197,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "c5c8df87.d7496",
+        "96fbbcc4.3796a"
+      ]
+    ]
+  },
+  {
+    "id": "c5c8df87.d7496",
+    "type": "outcome",
+    "name": "outcome Created",
+    "xml": "<outcome value='Created'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2381.075782775879,
+    "y": 487.00002098083496,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "88f78e4e.b4f9"
+      ]
+    ]
+  },
+  {
+    "id": "96fbbcc4.3796a",
+    "type": "outcome",
+    "name": "outcome Other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2374.7902221679688,
+    "y": 526.4286289215088,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "935468c0.294618"
+      ]
+    ]
+  },
+  {
+    "id": "88f78e4e.b4f9",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2595.546298980713,
+    "y": 488.37565517425537,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "935468c0.294618",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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\" \n    value=\"`'Existing connection-attachment-allotted-resource with order status of ' + $connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n",
+    "comments": "",
+    "x": 2614.6980018615723,
+    "y": 529.0000190734863,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "cd666072.c4472",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-get-request-input-param",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 967.3342895507812,
+    "y": 594.4935550689697,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "f3e22a0c.d8db48",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 649.3403663635254,
+    "y": 594.4998416900635,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "cd666072.c4472"
+      ]
+    ]
+  },
+  {
+    "id": "606696e.6cc0f68",
+    "type": "get-resource",
+    "name": "get-resource parent-service-data",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 714.0316772460938,
+    "y": 736.5316162109375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "f37fbd01.3a27c",
+        "a7659493.fc2068"
+      ]
+    ]
+  },
+  {
+    "id": "3f9c5fc2.bcfea",
+    "type": "comment",
+    "name": "GET parent-service-data from mdsal to check existence of other End point",
+    "info": "",
+    "comments": "",
+    "x": 834.0316162109375,
+    "y": 665.5315551757812,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a4aef874.7e7e88",
+    "type": "for",
+    "name": "for pidx..mdsal-psd.provided-allotted-resources.provided-allotted-resource[]",
+    "xml": "<for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1723.2160968780518,
+    "y": 904.0041084289551,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "c0e3f5d5.ead6e8"
+      ]
+    ]
+  },
+  {
+    "id": "6558b5c9.5b8bec",
+    "type": "switchNode",
+    "name": "switch mdsal-psd.provided-allotted-resources_length",
+    "xml": "<switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 780.2154541015625,
+    "y": 880.7180786132812,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "c8d5ad22.c170b",
+        "7c868dde.220b24",
+        "5e4728c1.e810e8"
+      ]
+    ]
+  },
+  {
+    "id": "c8d5ad22.c170b",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1112.3582763671875,
+    "y": 1157.5755004882812,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "bad30438.d05408"
+      ]
+    ]
+  },
+  {
+    "id": "3a4d0461.4005dc",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1306.4856853485107,
+    "y": 898.7015209197998,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a4aef874.7e7e88",
+        "e5572f4b.0166d"
+      ]
+    ]
+  },
+  {
+    "id": "c0e3f5d5.ead6e8",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test=\"`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2158.3274974823,
+    "y": 904.0040054321289,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ac0df227.58a1c",
+        "39a3c95.9a56f36"
+      ]
+    ]
+  },
+  {
+    "id": "ac0df227.58a1c",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2367.1377239227295,
+    "y": 876.4684953689575,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "22a29502.ccff9a"
+      ]
+    ]
+  },
+  {
+    "id": "64186f05.4be35",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2546.8984203338623,
+    "y": 940.3256740570068,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "482d5120.f30ca",
+        "a13cbdb.502bd4"
+      ]
+    ]
+  },
+  {
+    "id": "482d5120.f30ca",
+    "type": "set",
+    "name": "set tmp.pidx and ptx.consumed-ar",
+    "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n<parameter name='tmp.provided-ar.' value='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$pidx].`' />\n<parameter name='tmp.found-in-ar' value='true' />\n<parameter name='tmp.ep-available' value='true' />",
+    "comments": "",
+    "x": 2803.755926132202,
+    "y": 914.8971881866455,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a13cbdb.502bd4",
+    "type": "break",
+    "name": "break",
+    "xml": "<break>\n",
+    "comments": "",
+    "x": 2714.6166439056396,
+    "y": 961.6532039642334,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f72ddcab.98ba7",
+    "type": "comment",
+    "name": "Check existence of other AR in parent service data",
+    "info": "Check if other allotted resource is available.",
+    "comments": "",
+    "x": 769.993896484375,
+    "y": 814.8928833007812,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "7c868dde.220b24",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1124.0107231140137,
+    "y": 1028.6772651672363,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "4884d527.f966cc"
+      ]
+    ]
+  },
+  {
+    "id": "bad30438.d05408",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1285.0106201171875,
+    "y": 1156.6772422790527,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "5e4728c1.e810e8",
+    "type": "other",
+    "name": "outcome 2",
+    "xml": "<outcome value='2'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1132.010705947876,
+    "y": 899.6772212982178,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "3a4d0461.4005dc"
+      ]
+    ]
+  },
+  {
+    "id": "22a29502.ccff9a",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2525.1219387054443,
+    "y": 875.6772384643555,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "39a3c95.9a56f36",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2366.1219387054443,
+    "y": 938.6772384643555,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "64186f05.4be35"
+      ]
+    ]
+  },
+  {
+    "id": "e5572f4b.0166d",
+    "type": "switchNode",
+    "name": "switch tmp.found-in-ar",
+    "xml": "<switch test='`$tmp.found-in-ar`'>\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1553.0106105804443,
+    "y": 975.4549942016602,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "23e2fd66.fcd7c2"
+      ]
+    ]
+  },
+  {
+    "id": "23e2fd66.fcd7c2",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1776.0106563568115,
+    "y": 974.5661640167236,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "8fa1eba4.3c67f8"
+      ]
+    ]
+  },
+  {
+    "id": "8fa1eba4.3c67f8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1966.0106868743896,
+    "y": 974.5662136077881,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "5c438258.2817dc"
+      ]
+    ]
+  },
+  {
+    "id": "5c438258.2817dc",
+    "type": "get-resource",
+    "name": "get-resource provided-ar.allotted-resource",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.provided-ar.allotted-resource-id/' pfx='mdsal-other-ar' >",
+    "comments": "",
+    "outputs": 1,
+    "x": 2271.4550399780273,
+    "y": 1026.5662593841553,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "75e596c5.28a268",
+        "3fc2682f.986b78"
+      ]
+    ]
+  },
+  {
+    "id": "75e596c5.28a268",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2571.128242492676,
+    "y": 1011.7949905395508,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "2d352ea7.0e12c2"
+      ]
+    ]
+  },
+  {
+    "id": "3fc2682f.986b78",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2562.9800453186035,
+    "y": 1046.8610754013062,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "1ccb7b0b.274855"
+      ]
+    ]
+  },
+  {
+    "id": "abb4ba72.e83978",
+    "type": "switchNode",
+    "name": "switch mdsal-psd.networks_length",
+    "xml": "<switch test='`$mdsal-psd.networks.network_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1550.3441162109375,
+    "y": 1127.8997802734375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "7abae666.d51f58",
+        "f199acdb.1cc56"
+      ]
+    ]
+  },
+  {
+    "id": "f199acdb.1cc56",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1829.343994140625,
+    "y": 1137.78857421875,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "362dc46c.af4b8c"
+      ]
+    ]
+  },
+  {
+    "id": "7abae666.d51f58",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1823.3441162109375,
+    "y": 1197.78857421875,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "7c1c105.99f43f"
+      ]
+    ]
+  },
+  {
+    "id": "7c1c105.99f43f",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: Incorrect state found more then 1 network\" />\n    \n",
+    "comments": "",
+    "x": 1979.9964599609375,
+    "y": 1198.890380859375,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "df5ebca6.dc1ea",
+    "type": "set",
+    "name": "set tmp.network.",
+    "xml": "<set>\n<parameter name='tmp.network.' value='`$mdsal-psd.networks.network[0].`' />\n",
+    "comments": "",
+    "x": 2276.7888259887695,
+    "y": 1121.7887411117554,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4884d527.f966cc",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1296.455078125,
+    "y": 1029.7885131835938,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "abb4ba72.e83978"
+      ]
+    ]
+  },
+  {
+    "id": "362dc46c.af4b8c",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2021.1217041015625,
+    "y": 1140.7884521484375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "df5ebca6.dc1ea",
+        "37668a8f.d84a36"
+      ]
+    ]
+  },
+  {
+    "id": "37668a8f.d84a36",
+    "type": "for",
+    "name": "for nidx..tmp.network.network-data.network-request-input.network...[]",
+    "xml": "<for index='nidx' start='0' end='`$tmp.network.network-data.network-request-input.network-input-parameters.param_length`' >",
+    "comments": "",
+    "outputs": 1,
+    "x": 2438.1218338012695,
+    "y": 1188.7885284423828,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "8d783898.486c38"
+      ]
+    ]
+  },
+  {
+    "id": "8d783898.486c38",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2809.67724609375,
+    "y": 1221.7884521484375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "f4f7612.08260a",
+        "4421135d.084d2c",
+        "5f144f0e.31549",
+        "37e78cdf.278a44",
+        "ed440eb3.36c94",
+        "f75e941b.01edb8",
+        "5523625.526319c",
+        "882c3718.7bb828",
+        "dae6d839.a75e08",
+        "bc77042c.0ab858"
+      ]
+    ]
+  },
+  {
+    "id": "f4f7612.08260a",
+    "type": "switchNode",
+    "name": "switch access-node-id",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$nidx].name == 'access-node-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 3015.1881942749023,
+    "y": 1069.7990770339966,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "5989197c.f6f7f8"
+      ]
+    ]
+  },
+  {
+    "id": "5989197c.f6f7f8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3204.1878204345703,
+    "y": 1071.7989416122437,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "b51d0ed2.6b0e5"
+      ]
+    ]
+  },
+  {
+    "id": "b51d0ed2.6b0e5",
+    "type": "set",
+    "name": "set tmp.found-in-network tmp.ep-available",
+    "xml": "<set>\n<parameter name='tmp.found-in-network' value='true' />\n<parameter name='tmp.ep-available' value='true' />",
+    "comments": "",
+    "x": 3457.1879959106445,
+    "y": 1071.3989877700806,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4421135d.084d2c",
+    "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",
+    "comments": "",
+    "x": 2996.1772994995117,
+    "y": 1526.7884120941162,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d1e1bdb5.615f1",
+    "type": "switchNode",
+    "name": "switch tmp.ep-available",
+    "xml": "<switch test='`$tmp.ep-available`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 706.3440551757812,
+    "y": 1292.2327880859375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "32c06766.90eaa8",
+        "3e428e4a.b1f8b2"
+      ]
+    ]
+  },
+  {
+    "id": "3e428e4a.b1f8b2",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 925.0107746124268,
+    "y": 1341.5661449432373,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "5db74705.3b89f8"
+      ]
+    ]
+  },
+  {
+    "id": "32c06766.90eaa8",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 929.8995761871338,
+    "y": 1250.5662059783936,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "64e7831f.72ebbc"
+      ]
+    ]
+  },
+  {
+    "id": "64e7831f.72ebbc",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1076.8995723724365,
+    "y": 1252.4550189971924,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "5db74705.3b89f8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1095.121862411499,
+    "y": 1339.5661029815674,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "3c2f6627.61512a",
+        "380c3c36.553114",
+        "42f94a2e.999604"
+      ]
+    ]
+  },
+  {
+    "id": "3c2f6627.61512a",
+    "type": "switchNode",
+    "name": "switch tmp.found-in-ar",
+    "xml": "<switch test='`$tmp.found-in-ar`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1325.23291015625,
+    "y": 1274.566162109375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "d79615f7.087d78",
+        "1c319701.787ef9"
+      ]
+    ]
+  },
+  {
+    "id": "d79615f7.087d78",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1545.677282333374,
+    "y": 1260.5661029815674,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ba9cd8cc.15f248"
+      ]
+    ]
+  },
+  {
+    "id": "1c319701.787ef9",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1546.67724609375,
+    "y": 1306.566162109375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "719bb92a.4ee018"
+      ]
+    ]
+  },
+  {
+    "id": "ba9cd8cc.15f248",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1733.232946395874,
+    "y": 1257.5661029815674,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a6fc819d.1ebca"
+      ]
+    ]
+  },
+  {
+    "id": "719bb92a.4ee018",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1734.23291015625,
+    "y": 1305.566162109375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "815fbac.230c748"
+      ]
+    ]
+  },
+  {
+    "id": "25783fac.20762",
+    "type": "comment",
+    "name": "GET connection-attachment-ar to store AR data from mdsal",
+    "info": "",
+    "comments": "",
+    "x": 2265.5040397644043,
+    "y": 416.5039129257202,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b02bb1b6.e7f4b",
+    "type": "comment",
+    "name": "Set source end point",
+    "info": "",
+    "comments": "",
+    "x": 671.0039176940918,
+    "y": 562.2539224624634,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "cb89d188.f33cc",
+    "type": "set",
+    "name": "set tmp.ar.parent-service-instance-id",
+    "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
+    "comments": "",
+    "x": 725,
+    "y": 701,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f37fbd01.3a27c",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 961,
+    "y": 729,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "204f751a.862bca"
+      ]
+    ]
+  },
+  {
+    "id": "a7659493.fc2068",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 952.8518028259277,
+    "y": 764.0660848617554,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "7b61e92b.2f9e78"
+      ]
+    ]
+  },
+  {
+    "id": "7b61e92b.2f9e78",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1128.00048828125,
+    "y": 760.3334350585938,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "204f751a.862bca",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1112,
+    "y": 727,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "1ccb7b0b.274855",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN provided attachment resource not found\" />\n    \n",
+    "comments": "",
+    "x": 2732.9999256134033,
+    "y": 1048.0000953674316,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "2d352ea7.0e12c2",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2716.9999256134033,
+    "y": 1009.0000953674316,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "3bc10ee7.beb432",
+    "type": "set",
+    "name": "set tmp.found-in-ar tmp.found-in-network tmp.ep-available to false",
+    "xml": "<set>\n<parameter name='tmp.found-in-ar' value='false' />\n<parameter name='tmp.found-in-network' value='false' />\n<parameter name='tmp.ep-available' value='false' />",
+    "comments": "",
+    "x": 817,
+    "y": 846,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c79a6189.fcf2c",
+    "type": "comment",
+    "name": "If other EP exists set destination end point",
+    "info": "Check if other allotted resource is available.",
+    "comments": "",
+    "x": 757,
+    "y": 1217,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "bac44858.bd4fb8",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1524,
+    "y": 1423,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "43736465.ded50c",
+        "1f0536d6.03d209",
+        "1c6c8b83.e7b554",
+        "804dff2.f416",
+        "faab91d9.9baa6",
+        "40922023.6161",
+        "cce7fa52.3ac5b8",
+        "afdc2a42.250d98"
+      ]
+    ]
+  },
+  {
+    "id": "43736465.ded50c",
+    "type": "switchNode",
+    "name": "switch access-node-id",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'access-node-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1760.51025390625,
+    "y": 1356.0103759765625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "327e9777.bfc4d8"
+      ]
+    ]
+  },
+  {
+    "id": "1f0536d6.03d209",
+    "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",
+    "comments": "",
+    "x": 1733.5002059936523,
+    "y": 1661.0003395080566,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "1c6c8b83.e7b554",
+    "type": "switchNode",
+    "name": "switch access-ltp-id",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'access-ltp-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1752.0000839233398,
+    "y": 1399.777907371521,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a140ea29.0beb08"
+      ]
+    ]
+  },
+  {
+    "id": "804dff2.f416",
+    "type": "switchNode",
+    "name": "switch clientSignal",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'clientSignal'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1746.0001220703125,
+    "y": 1445.7779541015625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ce02a989.0990f8"
+      ]
+    ]
+  },
+  {
+    "id": "faab91d9.9baa6",
+    "type": "switchNode",
+    "name": "switch cVLAN",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'cVLAN'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1729.9896240234375,
+    "y": 1484.7674560546875,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "f26df0a2.edf49"
+      ]
+    ]
+  },
+  {
+    "id": "327e9777.bfc4d8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1938.22216796875,
+    "y": 1356.666748046875,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ded3a3b2.bb6de"
+      ]
+    ]
+  },
+  {
+    "id": "ded3a3b2.bb6de",
+    "type": "set",
+    "name": "set dst-access-node-id",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.access-node-id' value='`$tmp.ep.parameters.param[$idx].value`' />",
+    "comments": "",
+    "x": 2111.22216796875,
+    "y": 1356.2667236328125,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a140ea29.0beb08",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1933.7120361328125,
+    "y": 1399.4342041015625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "d26fb8e0.ff59f8"
+      ]
+    ]
+  },
+  {
+    "id": "ce02a989.0990f8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1933.7120361328125,
+    "y": 1445.4342041015625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ee911b75.034b28"
+      ]
+    ]
+  },
+  {
+    "id": "f26df0a2.edf49",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1933.7015380859375,
+    "y": 1484.423828125,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "16f5641b.4b39fc"
+      ]
+    ]
+  },
+  {
+    "id": "380c3c36.553114",
+    "type": "for",
+    "name": "for idx..tmp.ep.parameters[]",
+    "xml": "<for index='idx' start='0' end='`$tmp.ep.parameters.param_length`' >",
+    "comments": "",
+    "outputs": 1,
+    "x": 1342,
+    "y": 1356,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "bac44858.bd4fb8"
+      ]
+    ]
+  },
+  {
+    "id": "a6fc819d.1ebca",
+    "type": "set",
+    "name": "set tmp.ep.parameters",
+    "xml": "<set>\n<parameter name='tmp.ep.parameters' value='`$mdsal-other-ar.allotted-resource-data.connection-attachment-topology.connection-attachment-parameters`' />",
+    "comments": "",
+    "x": 1945,
+    "y": 1257,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "815fbac.230c748",
+    "type": "set",
+    "name": "set tmp.ep.parameters",
+    "xml": "<set>\n<parameter name='tmp.ep.parameters' value='`$tmp.network.network-data.network-request-input.network-input-parameters`' />\n",
+    "comments": "",
+    "x": 1945.999963760376,
+    "y": 1301.0000591278076,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d26fb8e0.ff59f8",
+    "type": "set",
+    "name": "set dst-access-node-id",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$tmp.ep.parameters.param[$idx].value`' />",
+    "comments": "",
+    "x": 2111,
+    "y": 1399,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ee911b75.034b28",
+    "type": "set",
+    "name": "set dst-clientSignal",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.clientSignal' value='`$tmp.ep.parameters.param[$idx].value`' />",
+    "comments": "",
+    "x": 2105,
+    "y": 1443,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "16f5641b.4b39fc",
+    "type": "set",
+    "name": "set dst-cVLAN",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.cVLAN' value='`$tmp.ep.parameters.param[$idx].value`' />",
+    "comments": "",
+    "x": 2096,
+    "y": 1482,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "42f94a2e.999604",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 736,
+    "y": 1584,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "cb687dc5.52b2d",
+        "4ed51df6.e8ec54"
+      ]
+    ]
+  },
+  {
+    "id": "164aff86.323ed",
+    "type": "comment",
+    "name": "Get controller info and send request",
+    "info": "",
+    "comments": "",
+    "x": 686,
+    "y": 1546,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9edea41a.d68a58",
+    "type": "execute",
+    "name": "execute RestApiCallNode Create ethernet Service",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + 'restconf/data/ietf-eth-tran-service:etht-svc'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"patch\"/>\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
+    "comments": "",
+    "outputs": 1,
+    "x": 1379.0000305175781,
+    "y": 2062.0007610321045,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "616e1655.379198",
+        "b0089735.e037f8"
+      ]
+    ]
+  },
+  {
+    "id": "616e1655.379198",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1666.0000228881836,
+    "y": 2083.0007104873657,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "96c14b60.8835b8"
+      ]
+    ]
+  },
+  {
+    "id": "96c14b60.8835b8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "comments": "",
+    "outputs": 1,
+    "x": 1835.9999618530273,
+    "y": 2086.0007104873657,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "a39478d4.ff01e8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error executing Create vpn rest api\" />\n",
+    "comments": "",
+    "x": 1836.0000839233398,
+    "y": 2042.0007104873657,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b0089735.e037f8",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1668.9999618530273,
+    "y": 2042.0007104873657,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a39478d4.ff01e8"
+      ]
+    ]
+  },
+  {
+    "id": "ed031fec.cf219",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1018.7622451782227,
+    "y": 2481.953144431114,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "2bd27313.7e4a0c"
+      ]
+    ]
+  },
+  {
+    "id": "2bd27313.7e4a0c",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"AAI failed\" />\n",
+    "comments": "",
+    "x": 1185.2861251831055,
+    "y": 2493.572215437889,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "581d8c50.26f904",
+    "type": "failure",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1025.8575325012207,
+    "y": 2514.715112090111,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "2bd27313.7e4a0c"
+      ]
+    ]
+  },
+  {
+    "id": "9aeb74dd.a24a08",
+    "type": "comment",
+    "name": "Save Resource to AAI",
+    "info": "",
+    "comments": "",
+    "x": 737.8099594116211,
+    "y": 2464.302532672882,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9158a090.142c2",
+    "type": "comment",
+    "name": "TODO: Rework after confirmation from AAI",
+    "info": "",
+    "comments": "",
+    "x": 1038.1688690185547,
+    "y": 2441.873571395874,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f9e2a4f.0cf5858",
+    "type": "set",
+    "name": "set output to api handler",
+    "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
+    "comments": "",
+    "x": 752.5776557922363,
+    "y": 2385.828013896942,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "6afb5fe5.f951c",
+    "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",
+    "comments": "",
+    "x": 720.9907379150391,
+    "y": 2546.443766117096,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9ab0f309.357b6",
+    "type": "execute",
+    "name": "execute RestApiCallNode - PUT AR by id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 802.309757232666,
+    "y": 2293.4687876701355,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "cf614e80.0a4b3",
+        "6d53da86.669ad4",
+        "131ccd05.2f3143"
+      ]
+    ]
+  },
+  {
+    "id": "cf614e80.0a4b3",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1070.9511337280273,
+    "y": 2344.8001994118094,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ef1dfc84.71501"
+      ]
+    ]
+  },
+  {
+    "id": "6d53da86.669ad4",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1061.9511833190918,
+    "y": 2313.300225161016,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ef1dfc84.71501"
+      ]
+    ]
+  },
+  {
+    "id": "131ccd05.2f3143",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1065.7012214660645,
+    "y": 2283.6573300361633,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "e18bb85.a259b48"
+      ]
+    ]
+  },
+  {
+    "id": "ef1dfc84.71501",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
+    "comments": "",
+    "x": 1231.7012214660645,
+    "y": 2314.050249002874,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "e18bb85.a259b48",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1207.3571891784668,
+    "y": 2279.8494992256165,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "bef55f2e.ad6b3",
+    "type": "set",
+    "name": "set ar-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-status.action' value=\"`$connection-attachment-topology-operation-input.request-information.request-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value=\"connection-attachment-topology-operation\" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$connection-attachment-topology-operation-input.request-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$connection-attachment-topology-operation-input.service-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.` \" />",
+    "comments": "",
+    "x": 707.5233535766602,
+    "y": 2144.849767923355,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d7f464d6.9ac5f8",
+    "type": "execute",
+    "name": "execute getTime",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 724.809196472168,
+    "y": 2217.4693655967712,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "a66d68ee.9308e8",
+    "type": "set",
+    "name": "set allotted-resource-oper-status",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",
+    "comments": "",
+    "x": 774.7962760925293,
+    "y": 2254.420445919037,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "36004db7.4505d2",
+    "type": "set",
+    "name": "set model-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` \" />",
+    "comments": "",
+    "x": 721.3648948669434,
+    "y": 2184.0244183540344,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "8c652fd0.4d9e2",
+    "type": "comment",
+    "name": "Prepare data for allotted-resource addition to MDSAL",
+    "info": "This will add to allotted-resource which is present inside service.",
+    "comments": "",
+    "x": 834.698356628418,
+    "y": 2105.0243704319,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "69186aa2.60ef84",
+    "type": "comment",
+    "name": "Add to allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 776.2781829833984,
+    "y": 2072.437672138214,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "7b232ea8.d345",
+    "type": "update",
+    "name": "update AAI allotted-resource",
+    "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`\" />\n\t<parameter name=\"operational-status\" value=\"Active\" />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 764.2542381286621,
+    "y": 2501.754675388336,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "ed031fec.cf219",
+        "581d8c50.26f904"
+      ]
+    ]
+  },
+  {
+    "id": "cb687dc5.52b2d",
+    "type": "execute",
+    "name": "execute RestApiCallNode getPath from OOF",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.oof-getpath.templatefile`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.restapi.connection-oof-url'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.oof.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.oof.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"oof\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
+    "comments": "",
+    "outputs": 1,
+    "x": 1043.0040130615234,
+    "y": 1572.2544918060303,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "e275a7ba.f6ec08",
+        "ec20f395.66c91"
+      ]
+    ]
+  },
+  {
+    "id": "e275a7ba.f6ec08",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1350.0039558410645,
+    "y": 1593.2543387413025,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "d000e963.b327a8"
+      ]
+    ]
+  },
+  {
+    "id": "d000e963.b327a8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "comments": "",
+    "outputs": 1,
+    "x": 1520.0038948059082,
+    "y": 1596.2543387413025,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "773ede9b.4ecb",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error executing Create vpn rest api\" />\n",
+    "comments": "",
+    "x": 1520.0040168762207,
+    "y": 1552.2543387413025,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ec20f395.66c91",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1353.0038948059082,
+    "y": 1552.2543387413025,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "773ede9b.4ecb"
+      ]
+    ]
+  },
+  {
+    "id": "461ac2a4.5bdfec",
+    "type": "comment",
+    "name": "Get VPNs from OOF",
+    "info": "",
+    "comments": "",
+    "x": 963.0079040527344,
+    "y": 1535.2584590911865,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4ed51df6.e8ec54",
+    "type": "for",
+    "name": "for vidx..oof.vpns_length[]",
+    "xml": "<for index='vidx' start='0' end='`$oof.vpns_length`' >",
+    "comments": "",
+    "outputs": 1,
+    "x": 994.0039024353027,
+    "y": 1656.5040574073792,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "fa8596fd.dc6fb8"
+      ]
+    ]
+  },
+  {
+    "id": "9e6cff97.3e047",
+    "type": "comment",
+    "name": "Loop through VPN and configure them",
+    "info": "",
+    "comments": "",
+    "x": 1016.004020690918,
+    "y": 1620.0043177604675,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "5f144f0e.31549",
+    "type": "switchNode",
+    "name": "switch name",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'name'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2994.7882919311523,
+    "y": 1167.1217517852783,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "36d080c6.aaac9"
+      ]
+    ]
+  },
+  {
+    "id": "36d080c6.aaac9",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3181.788299560547,
+    "y": 1161.1216888427734,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "dd94e80d.e79a58"
+      ]
+    ]
+  },
+  {
+    "id": "dd94e80d.e79a58",
+    "type": "set",
+    "name": "set etht-svc-name & bandwidth-profile-name",
+    "xml": "<set>\n<parameter name='prop.global.sotn.etht-svc-name' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n<parameter name='prop.global.sotn.bandwidth-profile-name' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3443.788589477539,
+    "y": 1147.721715927124,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "37e78cdf.278a44",
+    "type": "switchNode",
+    "name": "switch description",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'description'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3005.627960205078,
+    "y": 1205.1216869354248,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "87cfc59c.1be938"
+      ]
+    ]
+  },
+  {
+    "id": "87cfc59c.1be938",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3175.627960205078,
+    "y": 1201.1216869354248,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "af30cb49.aad268"
+      ]
+    ]
+  },
+  {
+    "id": "af30cb49.aad268",
+    "type": "set",
+    "name": "set etht-svc-descr",
+    "xml": "<set>\n<parameter name='prop.global.sotn.etht-svc-descr' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3362.961400985718,
+    "y": 1199.5828437805176,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ed440eb3.36c94",
+    "type": "switchNode",
+    "name": "switch tenantId",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'tenantId'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2991.010353088379,
+    "y": 1251.455090522766,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "824d6eab.2a9f8"
+      ]
+    ]
+  },
+  {
+    "id": "824d6eab.2a9f8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3183.010341644287,
+    "y": 1244.4550142288208,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "58ea9e80.950b3"
+      ]
+    ]
+  },
+  {
+    "id": "58ea9e80.950b3",
+    "type": "set",
+    "name": "set tenantId",
+    "xml": "<set>\n<parameter name='prop.global.sotn.tenantId' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3351.010341644287,
+    "y": 1245.0550203323364,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "5523625.526319c",
+    "type": "switchNode",
+    "name": "switch CIR",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'CIR'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2977.849998474121,
+    "y": 1338.455072402954,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "6cc5147d.9f838c"
+      ]
+    ]
+  },
+  {
+    "id": "6cc5147d.9f838c",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3185.850067138672,
+    "y": 1334.4550857543945,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "5119c20c.53e31c"
+      ]
+    ]
+  },
+  {
+    "id": "5119c20c.53e31c",
+    "type": "set",
+    "name": "set cir",
+    "xml": "<set>\n<parameter name='prop.sotn.cir' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3335.1833877563477,
+    "y": 1332.9162330627441,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f75e941b.01edb8",
+    "type": "switchNode",
+    "name": "switch vpnType",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'vpnType'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2997.1584701538086,
+    "y": 1292.2327914237976,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "94f8c651.7d4c68"
+      ]
+    ]
+  },
+  {
+    "id": "94f8c651.7d4c68",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3184.1584701538086,
+    "y": 1288.2327914237976,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "a2401fbd.0e5a6"
+      ]
+    ]
+  },
+  {
+    "id": "a2401fbd.0e5a6",
+    "type": "set",
+    "name": "set vpnType",
+    "xml": "<set>\n<parameter name='prop.global.sotn.vpnType' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3353.49210357666,
+    "y": 1285.693956375122,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "882c3718.7bb828",
+    "type": "switchNode",
+    "name": "switch EIR",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'EIR'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2979.140449523926,
+    "y": 1381.1529388427734,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "6a090cfc.b29bc4"
+      ]
+    ]
+  },
+  {
+    "id": "6a090cfc.b29bc4",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3181.140411376953,
+    "y": 1376.152958869934,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "7cfdc8c0.796128"
+      ]
+    ]
+  },
+  {
+    "id": "7cfdc8c0.796128",
+    "type": "set",
+    "name": "set eir",
+    "xml": "<set>\n<parameter name='prop.global.sotn.eir' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3337.4739151000977,
+    "y": 1375.614094734192,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "dae6d839.a75e08",
+    "type": "switchNode",
+    "name": "switch color-aware",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'color-aware'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3006.1407203674316,
+    "y": 1435.152904510498,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "1c170ed.c3c73f1"
+      ]
+    ]
+  },
+  {
+    "id": "1c170ed.c3c73f1",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3184.140724182129,
+    "y": 1429.1528968811035,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "aafef618.cfb6d8"
+      ]
+    ]
+  },
+  {
+    "id": "aafef618.cfb6d8",
+    "type": "set",
+    "name": "set colorAware",
+    "xml": "<set>\n<parameter name='prop.global.sotn.colorAware' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3365.4741020202637,
+    "y": 1428.614055633545,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "bc77042c.0ab858",
+    "type": "switchNode",
+    "name": "switch coupling-flag",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'coupling-flag'`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3006.140727996826,
+    "y": 1481.1529293060303,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "9c20abd0.a9e0c8"
+      ]
+    ]
+  },
+  {
+    "id": "9c20abd0.a9e0c8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3184.1407203674316,
+    "y": 1473.1528978347778,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "28950acd.c17166"
+      ]
+    ]
+  },
+  {
+    "id": "28950acd.c17166",
+    "type": "set",
+    "name": "set couplingFlag",
+    "xml": "<set>\n<parameter name='prop.global.sotn.couplingFlag' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 3369.4741020202637,
+    "y": 1473.6140804290771,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "dddada55.283bb8",
+    "type": "comment",
+    "name": "Check if other EP exists in SOTNConnectionResource",
+    "info": "",
+    "comments": "",
+    "x": 3109.3440551757812,
+    "y": 1034.7883319854736,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "e2fb1fc.98e08e",
+    "type": "comment",
+    "name": "Get other global parameters from network",
+    "info": "",
+    "comments": "",
+    "x": 3080.3438568115234,
+    "y": 1126.7882843017578,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "40922023.6161",
+    "type": "switchNode",
+    "name": "switch access-provider-id",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'access-provider-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1767.56591796875,
+    "y": 1530.232666015625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "dcc5b1ab.d080a"
+      ]
+    ]
+  },
+  {
+    "id": "dcc5b1ab.d080a",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1954.56591796875,
+    "y": 1526.232666015625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "61749b73.8eae04"
+      ]
+    ]
+  },
+  {
+    "id": "61749b73.8eae04",
+    "type": "set",
+    "name": "set access-provider-id",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.access-provider-id' value='`$tmp.ep.parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 2122.56591796875,
+    "y": 1526.8326721191406,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "cce7fa52.3ac5b8",
+    "type": "switchNode",
+    "name": "switch access-client-id",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'access-client-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1758.565933227539,
+    "y": 1573.2431144714355,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "17cba761.8a69d9"
+      ]
+    ]
+  },
+  {
+    "id": "17cba761.8a69d9",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1945.565933227539,
+    "y": 1569.2431144714355,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "e72fdf36.f1b28"
+      ]
+    ]
+  },
+  {
+    "id": "e72fdf36.f1b28",
+    "type": "set",
+    "name": "set access-client-id",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.access-client-id' value='`$tmp.ep.parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 2113.565933227539,
+    "y": 1569.8431205749512,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "afdc2a42.250d98",
+    "type": "switchNode",
+    "name": "switch access-topology-id",
+    "xml": "<switch test=\"`$tmp.ep.parameters.param[$idx].name == 'access-topology-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 1771.5658779144287,
+    "y": 1615.2431454658508,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "d336b3c.0b7875"
+      ]
+    ]
+  },
+  {
+    "id": "d336b3c.0b7875",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1958.5658779144287,
+    "y": 1611.2431454658508,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "85508473.900a98"
+      ]
+    ]
+  },
+  {
+    "id": "85508473.900a98",
+    "type": "set",
+    "name": "set access-topology-id",
+    "xml": "<set>\n<parameter name='prop.remote.connection-attachment.access-topology-id' value='`$tmp.ep.parameters.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 2126.5658779144287,
+    "y": 1611.8431515693665,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "fa8596fd.dc6fb8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1066.1213836669922,
+    "y": 1742.3442287445068,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "9edea41a.d68a58",
+        "abb09171.f6ee",
+        "abc114d6.41e528",
+        "9b39618e.ffe5f"
+      ]
+    ]
+  },
+  {
+    "id": "521aa066.c8761",
+    "type": "set",
+    "name": "set controller data",
+    "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n",
+    "comments": "",
+    "x": 1764.56591796875,
+    "y": 1896.6771240234375,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "abb09171.f6ee",
+    "type": "get-resource",
+    "name": "get-resource esr-thirdparty-sdnc",
+    "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1328.0658569335938,
+    "y": 1955.6771240234375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "b2bcb2cd.da9e",
+        "d1f1ad90.96011",
+        "bed51f39.f008"
+      ]
+    ]
+  },
+  {
+    "id": "b2bcb2cd.da9e",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1567.0658569335938,
+    "y": 1908.6771240234375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "521aa066.c8761"
+      ]
+    ]
+  },
+  {
+    "id": "d1f1ad90.96011",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1570.5568237304688,
+    "y": 1956.2511596679688,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "d02c15ce.c1c438"
+      ]
+    ]
+  },
+  {
+    "id": "bed51f39.f008",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1565.8898315429688,
+    "y": 1997.58447265625,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "1dfb5bf0.cbb2c4"
+      ]
+    ]
+  },
+  {
+    "id": "d02c15ce.c1c438",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
+    "comments": "",
+    "x": 1747.1282348632812,
+    "y": 1944.5368957519531,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "1dfb5bf0.cbb2c4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
+    "comments": "",
+    "x": 1753.6623878479004,
+    "y": 1993.0236654281616,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "abc114d6.41e528",
+    "type": "get-resource",
+    "name": "get-resource pnf",
+    "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"pnf\" \n\t\tkey=\"pnf.pnf-name = $oof.vpn.access-node-id AND \n\t\t     depth = '0'\"\n        pfx='tmp.aai.pnf' local-only='false' >\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1274.56591796875,
+    "y": 1768.6771240234375,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "e5c7f4bb.a977b8",
+        "c9ac24e7.49a298",
+        "89a637ca.249d28"
+      ]
+    ]
+  },
+  {
+    "id": "e5c7f4bb.a977b8",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1621.5658569335938,
+    "y": 1772.6771545410156,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "9bb25e1d.4626"
+      ]
+    ]
+  },
+  {
+    "id": "c9ac24e7.49a298",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1625.0568237304688,
+    "y": 1820.2511901855469,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "700f50e2.2becf"
+      ]
+    ]
+  },
+  {
+    "id": "89a637ca.249d28",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1620.3898315429688,
+    "y": 1861.5845031738281,
+    "z": "205403e9.560efc",
+    "wires": [
+      [
+        "634a1d02.90e474"
+      ]
+    ]
+  },
+  {
+    "id": "700f50e2.2becf",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`\" />\n\n",
+    "comments": "",
+    "x": 1801.6282348632812,
+    "y": 1808.5369262695312,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "634a1d02.90e474",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`\" />\n\n",
+    "comments": "",
+    "x": 1808.1623878479004,
+    "y": 1857.0236959457397,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9bb25e1d.4626",
+    "type": "set",
+    "name": "set tmp.thirdparty-sdnc-id",
+    "xml": "<set>\n<parameter name='tmp.thirdparty-sdnc-id' value=\"`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`\" />\n",
+    "comments": "",
+    "x": 1825.5658569335938,
+    "y": 1759.6771545410156,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f371e386.134de",
+    "type": "comment",
+    "name": "get domain controller information",
+    "info": "",
+    "comments": "",
+    "x": 1319.0697860717773,
+    "y": 1734.6810216903687,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9b39618e.ffe5f",
+    "type": "set",
+    "name": "set oof.vpn",
+    "xml": "<set>\n<parameter name='oof.vpn.' value='`$oof.vpns[$vidx].`' />",
+    "comments": "",
+    "x": 1256.5658874511719,
+    "y": 1695.7881488800049,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ab06a549.912008",
+    "type": "comment",
+    "name": "TODO: Add VPN resource and its relation with SOTN Connectivity resource",
+    "info": "",
+    "comments": "",
+    "x": 1452.0103912353516,
+    "y": 2134.6769676208496,
+    "z": "205403e9.560efc",
+    "wires": [
+      
+    ]
+  }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
new file mode 100644 (file)
index 0000000..df8edd0
--- /dev/null
@@ -0,0 +1,1281 @@
+[
+  {
+    "id": "325842f8.71766e",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 107.03125,
+    "y": 44.03125,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "260e5d2a.9ebe72"
+      ]
+    ]
+  },
+  {
+    "id": "260e5d2a.9ebe72",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 319.03125381469727,
+    "y": 116.0312671661377,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "aa492387.d875a"
+      ]
+    ]
+  },
+  {
+    "id": "aa492387.d875a",
+    "type": "method",
+    "name": "sotn-attachment-topology-operation-create",
+    "xml": "<method rpc='sotn-attachment-topology-operation-create' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 307.0313720703125,
+    "y": 204.03125,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "3ba2475a.82b468"
+      ]
+    ]
+  },
+  {
+    "id": "3ba2475a.82b468",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 227.03130340576172,
+    "y": 953.0314979553223,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "5b9fedc5.bb21a4",
+        "1c8d2bb9.f29f94",
+        "269db4cc.d4abfc",
+        "373e17e2.9acc38",
+        "5fd13a1.e2465c4",
+        "acb04fc4.b40f4",
+        "574b7ca7.0881c4",
+        "35a496d5.57302a",
+        "950a621f.7b821",
+        "5dbf4a35.fd12c4",
+        "5accbcde.210f64",
+        "de4bba44.8919f8",
+        "a1a37b4b.52c8a8",
+        "63023c8e.9fcb64",
+        "a6efd3b6.3278d",
+        "994d951b.a5b738",
+        "8ee1af3e.bbe67",
+        "ad95dda4.7a6dd",
+        "efc5e53d.5d75a8",
+        "72c54e75.d1648",
+        "850178e9.7d2408",
+        "d5054e0.23964b",
+        "acacc6b8.9b06e8"
+      ]
+    ]
+  },
+  {
+    "id": "741c9c3f.224ea4",
+    "type": "comment",
+    "name": "Set allotted resource id if not sent by SO",
+    "info": "",
+    "comments": "",
+    "x": 698.1079406738281,
+    "y": 128.46516609191895,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "5b9fedc5.bb21a4",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 657.0312805175781,
+    "y": 169.03124237060547,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "8be7a33f.276ac",
+        "503fc7ba.f0e4b8"
+      ]
+    ]
+  },
+  {
+    "id": "8be7a33f.276ac",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 908.0313301086426,
+    "y": 131.03122925758362,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "32f9a898.99bcd8"
+      ]
+    ]
+  },
+  {
+    "id": "503fc7ba.f0e4b8",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 909.03125,
+    "y": 191.03123784065247,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "4eae44ec.25255c"
+      ]
+    ]
+  },
+  {
+    "id": "4eae44ec.25255c",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-id",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n",
+    "comments": "",
+    "x": 1141.031234741211,
+    "y": 191.03124260902405,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "1c8d2bb9.f29f94",
+    "type": "set",
+    "name": "set tmp.ar.self-link",
+    "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
+    "comments": "",
+    "x": 629.0311737060547,
+    "y": 404.031307220459,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "269db4cc.d4abfc",
+    "type": "execute",
+    "name": "execute Properties",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 635.2930946350098,
+    "y": 489.69798469543457,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "373e17e2.9acc38",
+    "type": "execute",
+    "name": "generate allotted-resource tmp.ar-url",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 682.2930755615234,
+    "y": 573.6979522705078,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "32f9a898.99bcd8",
+    "type": "execute",
+    "name": "execute tmp.ar.allotted-resource-id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"tmp.ar.allotted-resource-id\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1123.031307220459,
+    "y": 132.03123497962952,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "4b3e3360.e596bc"
+      ]
+    ]
+  },
+  {
+    "id": "4b3e3360.e596bc",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1341.031349182129,
+    "y": 132.0311987400055,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "a0c9c52c.3e6d68"
+      ]
+    ]
+  },
+  {
+    "id": "a0c9c52c.3e6d68",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while generation allotted resource ID\" />\n",
+    "comments": "",
+    "x": 1507.0313034057617,
+    "y": 132.03121304512024,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "5fd13a1.e2465c4",
+    "type": "get-resource",
+    "name": "get-resource connection-attachment-allotted-resource",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.ar.allotted-resource-id/' pfx='mdsal-ar' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 730.03125,
+    "y": 668.8090553283691,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "2117b9a.1971446"
+      ]
+    ]
+  },
+  {
+    "id": "2117b9a.1971446",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1050.0313301086426,
+    "y": 670.8090124130249,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "7534c2b3.76410c"
+      ]
+    ]
+  },
+  {
+    "id": "bd6696ff.0a7a78",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error: Existing connection attachment allotted resource\" />\n    \n",
+    "comments": "",
+    "x": 1783.5497093200684,
+    "y": 671.8750839233398,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "8d0e7e60.f9de9",
+    "type": "comment",
+    "name": "Check for non existence of allotted resource",
+    "info": "",
+    "comments": "",
+    "x": 694.0312881469727,
+    "y": 634.8091058731079,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "e79f21cd.1a744",
+    "type": "for",
+    "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
+    "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1592.6979064941406,
+    "y": 867.0312929153442,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "e0cc70b5.ec5cb"
+      ]
+    ]
+  },
+  {
+    "id": "574b7ca7.0881c4",
+    "type": "switchNode",
+    "name": "switch service-data.consumed-allotted-resources_length",
+    "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 745.6972923278809,
+    "y": 827.7452943325043,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "d641745.a8dc988",
+        "10ab333.e534fcd"
+      ]
+    ]
+  },
+  {
+    "id": "d641745.a8dc988",
+    "type": "other",
+    "name": "outcome Null",
+    "xml": "<outcome value=''>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1067.840175628662,
+    "y": 830.6027162075043,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "7824e75b.697748"
+      ]
+    ]
+  },
+  {
+    "id": "10ab333.e534fcd",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1055.8401794433594,
+    "y": 873.6027176380157,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "c987fa4d.92cd08"
+      ]
+    ]
+  },
+  {
+    "id": "c987fa4d.92cd08",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1215.967269897461,
+    "y": 871.7286942005157,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "e79f21cd.1a744",
+        "bae4bbfe.22ddd8",
+        "de19c440.aed268"
+      ]
+    ]
+  },
+  {
+    "id": "7824e75b.697748",
+    "type": "set",
+    "name": "set cidx",
+    "xml": "<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n",
+    "comments": "",
+    "x": 1226.6971473693848,
+    "y": 830.3167788982391,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "35a496d5.57302a",
+    "type": "set",
+    "name": "set consumed allotted resources",
+    "xml": "<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n",
+    "comments": "",
+    "x": 671.554573059082,
+    "y": 900.31689453125,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "bae4bbfe.22ddd8",
+    "type": "switchNode",
+    "name": "switch tmp.found-cidx",
+    "xml": "<switch test='`$tmp.found-cidx`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1405.082317352295,
+    "y": 903.7402169704437,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "c9bdea6f.ae8408"
+      ]
+    ]
+  },
+  {
+    "id": "c9bdea6f.ae8408",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1595.0822715759277,
+    "y": 903.7401540279388,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "f4a1002.ec0e9"
+      ]
+    ]
+  },
+  {
+    "id": "f4a1002.ec0e9",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1761.0822715759277,
+    "y": 903.7401540279388,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "efdba6bf.3fa178"
+      ]
+    ]
+  },
+  {
+    "id": "e0cc70b5.ec5cb",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2066.8093872070312,
+    "y": 867.0312767028809,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "cf1bcffb.5a97a"
+      ]
+    ]
+  },
+  {
+    "id": "cf1bcffb.5a97a",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2291.619115829468,
+    "y": 869.4956977367401,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "9a928449.d9e6c8"
+      ]
+    ]
+  },
+  {
+    "id": "efdba6bf.3fa178",
+    "type": "set",
+    "name": "set tmp.cidx",
+    "xml": "<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n",
+    "comments": "",
+    "x": 2006.955617904663,
+    "y": 904.2518508434296,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "69a27589.0e830c",
+    "type": "comment",
+    "name": "Add to consumed service consumed-allotted-resources in mdsal",
+    "info": "Prepare data and add to service-data",
+    "comments": "",
+    "x": 764.6984901428223,
+    "y": 757.0312271118164,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "b960d74c.b75ab8",
+    "type": "comment",
+    "name": "This set resource will be added to MDSAL by provider code",
+    "info": "Below we add to service-data.consumed-allotted-resource at last index",
+    "comments": "",
+    "x": 747.0313453674316,
+    "y": 864.8093509674072,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "d5054e0.23964b",
+    "type": "update",
+    "name": "update AAI allotted-resource",
+    "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`\" />\n\t<parameter name=\"operational-status\" value=\"Created\" />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 647.7220878601074,
+    "y": 1893.5631588697433,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "5db3e01e.d4ead",
+        "cde1c5f3.767a98"
+      ]
+    ]
+  },
+  {
+    "id": "5db3e01e.d4ead",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 903.4839973449707,
+    "y": 1876.5156625509262,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "3608fdb3.1050e2"
+      ]
+    ]
+  },
+  {
+    "id": "3608fdb3.1050e2",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"AAI failed\" />\n",
+    "comments": "",
+    "x": 1070.0078773498535,
+    "y": 1888.134733557701,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "cde1c5f3.767a98",
+    "type": "failure",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 910.5792846679688,
+    "y": 1909.2776302099228,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "3608fdb3.1050e2"
+      ]
+    ]
+  },
+  {
+    "id": "c4afab5c.baa998",
+    "type": "comment",
+    "name": "Save Resource to AAI",
+    "info": "",
+    "comments": "",
+    "x": 622.5317115783691,
+    "y": 1858.865050792694,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "88151412.9744b8",
+    "type": "comment",
+    "name": "Set allotted resource type if not sent by SO",
+    "info": "",
+    "comments": "",
+    "x": 701.0312194824219,
+    "y": 248.0312442779541,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "acb04fc4.b40f4",
+    "type": "switchNode",
+    "name": "switch allotted-resource-type",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 661.9545211791992,
+    "y": 281.59730529785156,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "66623b13.496cd4",
+        "4d39f4a7.b07cdc"
+      ]
+    ]
+  },
+  {
+    "id": "66623b13.496cd4",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 906.9546241760254,
+    "y": 252.59730625152588,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "98a097ca.0fb138"
+      ]
+    ]
+  },
+  {
+    "id": "4d39f4a7.b07cdc",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 907.9545440673828,
+    "y": 312.5973148345947,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "487657c2.991598"
+      ]
+    ]
+  },
+  {
+    "id": "487657c2.991598",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-type",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n",
+    "comments": "",
+    "x": 1139.9545288085938,
+    "y": 312.5973196029663,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "45c27762.ed75b8",
+    "type": "comment",
+    "name": "For storage in AAI connection-attachment-topology",
+    "info": "",
+    "comments": "",
+    "x": 723.0312042236328,
+    "y": 372.03126525878906,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "9a37b9ec.57f5d8",
+    "type": "comment",
+    "name": "Obtain different URL, template location etc",
+    "info": "For saving resource information to MDSAL & for AAI",
+    "comments": "",
+    "x": 701.0312004089355,
+    "y": 454.92014598846436,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "92fc6e78.11aa",
+    "type": "comment",
+    "name": "Used for Put AR by id to MDSAL",
+    "info": "",
+    "comments": "",
+    "x": 665.0312347412109,
+    "y": 538.9201374053955,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "920f2559.59f028",
+    "type": "comment",
+    "name": "Obtain the last index in services",
+    "info": "ServiceData is added by Provider code",
+    "comments": "",
+    "x": 663.4757118225098,
+    "y": 792.9201095104218,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "78b042c2.3a757c",
+    "type": "comment",
+    "name": "TODO: Rework after confirmation from AAI",
+    "info": "",
+    "comments": "",
+    "x": 922.8906211853027,
+    "y": 1836.436089515686,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "850178e9.7d2408",
+    "type": "set",
+    "name": "set output to api handler",
+    "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
+    "comments": "",
+    "x": 636.2993774414062,
+    "y": 1806.3904213905334,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "acacc6b8.9b06e8",
+    "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",
+    "comments": "",
+    "x": 605.7124900817871,
+    "y": 1941.006284236908,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "98a097ca.0fb138",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-type",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value=\"SOTNAttachmentInstance\" />\n",
+    "comments": "",
+    "x": 1146.0313110351562,
+    "y": 253.0312328338623,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "ad95dda4.7a6dd",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-get-request-input-param",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 761.0254058837891,
+    "y": 1637.5250849723816,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "72c54e75.d1648",
+    "type": "execute",
+    "name": "execute RestApiCallNode - PUT AR by id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 696.0314865112305,
+    "y": 1678.0312724113464,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "cee5ccdb.56f91",
+        "343b1a53.f93b56",
+        "d836f528.1e2818"
+      ]
+    ]
+  },
+  {
+    "id": "cee5ccdb.56f91",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 964.6728630065918,
+    "y": 1729.3626841530204,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "7a6b84bb.83fdac"
+      ]
+    ]
+  },
+  {
+    "id": "343b1a53.f93b56",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 955.6729125976562,
+    "y": 1697.862709902227,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "7a6b84bb.83fdac"
+      ]
+    ]
+  },
+  {
+    "id": "d836f528.1e2818",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 959.4229507446289,
+    "y": 1668.2198147773743,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "2a50bed0.d894a2"
+      ]
+    ]
+  },
+  {
+    "id": "7a6b84bb.83fdac",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
+    "comments": "",
+    "x": 1125.422950744629,
+    "y": 1698.6127337440848,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "2a50bed0.d894a2",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1101.0789184570312,
+    "y": 1664.4119839668274,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "de4bba44.8919f8",
+    "type": "execute",
+    "name": "execute RestApiCallNode - Update parent provided service AR",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"parent\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 761.0312156677246,
+    "y": 1198.031394958496,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "193ed140.775b6f",
+        "5734aea.1129c5",
+        "1e7e5c60.a431d4"
+      ]
+    ]
+  },
+  {
+    "id": "193ed140.775b6f",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1083.3392333984375,
+    "y": 1243.0296125411987,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "f7734abc.a1eef8"
+      ]
+    ]
+  },
+  {
+    "id": "5734aea.1129c5",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1074.339282989502,
+    "y": 1211.5296382904053,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "f7734abc.a1eef8"
+      ]
+    ]
+  },
+  {
+    "id": "1e7e5c60.a431d4",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1078.0893211364746,
+    "y": 1181.8867431655526,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "850e7d60.6ac59"
+      ]
+    ]
+  },
+  {
+    "id": "f7734abc.a1eef8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
+    "comments": "",
+    "x": 1244.0893211364746,
+    "y": 1212.2796621322632,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "850e7d60.6ac59",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1219.745288848877,
+    "y": 1178.0789123550057,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "34f114cf.2fe48c",
+    "type": "comment",
+    "name": "Put the parent allotted resource in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 685.0311508178711,
+    "y": 1166.0312938690186,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "63023c8e.9fcb64",
+    "type": "set",
+    "name": "set connection-attachment-ar-identifiers",
+    "xml": "<set>\n<parameter name='connection-attachment-ar-identifiers.consuming-service-instance-id' value=\"`$connection-attachment-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n",
+    "comments": "",
+    "x": 685.3883056640625,
+    "y": 1400.6029052734375,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a1a37b4b.52c8a8",
+    "type": "set",
+    "name": "set ar-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.action' value=\"`$connection-attachment-topology-operation-input.request-information.request-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value=\"connection-attachment-topology-operation\" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$connection-attachment-topology-operation-input.request-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$connection-attachment-topology-operation-input.service-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.' value=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.` \" />",
+    "comments": "",
+    "x": 596.2451171875,
+    "y": 1359.4122314453125,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a6efd3b6.3278d",
+    "type": "set",
+    "name": "set identifiers in overall structure",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.' \nvalue=\"`$connection-attachment-ar-identifiers.`\" />\n\n\n",
+    "comments": "",
+    "x": 662.1981048583984,
+    "y": 1442.698115348816,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "994d951b.a5b738",
+    "type": "execute",
+    "name": "execute getTime",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 613.5309715270996,
+    "y": 1525.0316753387451,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "8ee1af3e.bbe67",
+    "type": "set",
+    "name": "set allotted-resource-oper-status",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",
+    "comments": "",
+    "x": 664.5180320739746,
+    "y": 1560.9828262329102,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "efc5e53d.5d75a8",
+    "type": "set",
+    "name": "set model-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` \" />",
+    "comments": "",
+    "x": 606.0866241455078,
+    "y": 1479.586974143982,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "21b74746.c42fa8",
+    "type": "comment",
+    "name": "Prepare data for allotted-resource addition to MDSAL",
+    "info": "This will add to allotted-resource which is present inside service.",
+    "comments": "",
+    "x": 723.4201202392578,
+    "y": 1319.5868339538574,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "5accbcde.210f64",
+    "type": "execute",
+    "name": "generate parent-ar url - replace allotted-resource-id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 726.5312461853027,
+    "y": 1129.0312910079956,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "5dbf4a35.fd12c4",
+    "type": "execute",
+    "name": "generate parent-ar url - replace service-instance-id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 727.5311851501465,
+    "y": 1091.03134059906,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "52e7ff5.9702d",
+    "type": "comment",
+    "name": "Prepare Parent AR URL",
+    "info": "Preparation to set provided-allotted-resource in parent service instance",
+    "comments": "",
+    "x": 634.5316009521484,
+    "y": 1019.0313377380371,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "950a621f.7b821",
+    "type": "set",
+    "name": "set tmp.ar.parent-service-instance-id",
+    "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
+    "comments": "",
+    "x": 679.5314331054688,
+    "y": 1055.53125,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "60a92f9f.3244e",
+    "type": "comment",
+    "name": "Required for filling template values",
+    "info": "This is done because connection-attachment is generic resource and doesn't have specific parameters",
+    "comments": "",
+    "x": 669.0316314697266,
+    "y": 1606.531012058258,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "9a928449.d9e6c8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource as cosumed allotted resource already exists.\" />\n",
+    "comments": "",
+    "x": 2479.7880859375,
+    "y": 867.6770629882812,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "de19c440.aed268",
+    "type": "set",
+    "name": "set tmp.found-cidx",
+    "xml": "<set>\n<parameter name='tmp.found-cidx' value=\"`false`\" />\n\n\n",
+    "comments": "",
+    "x": 1395.6773529052734,
+    "y": 824.3438148498535,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a7c16e9b.5cd68",
+    "type": "comment",
+    "name": "Add to parent services provided-allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 744.2327270507812,
+    "y": 980.0104694366455,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "d7647e1e.888aa",
+    "type": "comment",
+    "name": "Add to allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 664.9999465942383,
+    "y": 1287.0001356601715,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "7534c2b3.76410c",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1212.031150817871,
+    "y": 670.3089017868042,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "c557a49c.3881b8"
+      ]
+    ]
+  },
+  {
+    "id": "c557a49c.3881b8",
+    "type": "switchNode",
+    "name": "switch cr length",
+    "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1399.8885307312012,
+    "y": 670.9280371665955,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "3936a0.d4fa496"
+      ]
+    ]
+  },
+  {
+    "id": "3936a0.d4fa496",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1599.2216529846191,
+    "y": 670.9281158447266,
+    "z": "5611e7fd.31c9b8",
+    "wires": [
+      [
+        "bd6696ff.0a7a78"
+      ]
+    ]
+  }
+]
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.json
new file mode 100644 (file)
index 0000000..f4f4f06
--- /dev/null
@@ -0,0 +1,1777 @@
+[
+  {
+    "id": "8f583882.aaba08",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 107.66669082641602,
+    "y": 36.000003814697266,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "1c8f0b92.b2d0f4"
+      ]
+    ]
+  },
+  {
+    "id": "1c8f0b92.b2d0f4",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 319.6666946411133,
+    "y": 108.00002098083496,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "7867cbb1.cd6464"
+      ]
+    ]
+  },
+  {
+    "id": "7867cbb1.cd6464",
+    "type": "method",
+    "name": "sotn-attachment-topology-operation-deactivate",
+    "xml": "<method rpc='sotn-attachment-topology-operation-deactivate' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 307.6668128967285,
+    "y": 196.00000381469727,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "788e5fc3.c5d94"
+      ]
+    ]
+  },
+  {
+    "id": "788e5fc3.c5d94",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 323.6668128967285,
+    "y": 751.0002484321594,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "ed3ad3e3.7e5ae",
+        "bfd4a9cf.aa7918",
+        "9c88cb66.2575d8",
+        "8484c7db.980518",
+        "3abce4e4.32a12c",
+        "d7eaa0c2.0d298",
+        "601263d0.9079dc",
+        "290c05a0.21ca9a",
+        "dfdf08a.1b550f8",
+        "5040dd33.924624",
+        "7ff9e776.cf4d98",
+        "5af6e72b.9d69a8",
+        "2d9aed4c.fcfbd2",
+        "1d49bda0.f37e32",
+        "285d454d.f5f90a",
+        "c5b69925.729378",
+        "bc602338.67328",
+        "f080d760.856678",
+        "8e738bcf.052208"
+      ]
+    ]
+  },
+  {
+    "id": "ed3ad3e3.7e5ae",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-id,etc",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n",
+    "comments": "",
+    "x": 720.6602516174316,
+    "y": 149.99349069595337,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4411681c.96fbf8",
+    "type": "comment",
+    "name": "set tmp ar-id to fetch resource from MDSAL",
+    "info": "",
+    "comments": "",
+    "x": 749.6205635070801,
+    "y": 114.02528667449951,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "bfd4a9cf.aa7918",
+    "type": "set",
+    "name": "set tmp.ar.self-link",
+    "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
+    "comments": "",
+    "x": 674.6601905822754,
+    "y": 242.9934959411621,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "290c05a0.21ca9a",
+    "type": "execute",
+    "name": "execute Properties",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 680.9220809936523,
+    "y": 330.6602249145508,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "9c88cb66.2575d8",
+    "type": "execute",
+    "name": "generate allotted-resource url",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 712.9221076965332,
+    "y": 418.6602063179016,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "8484c7db.980518",
+    "type": "get-resource",
+    "name": "get-resource connection-attachment-allotted-resource",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id/' pfx='mdsal-ar' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 783.6602058410645,
+    "y": 508.7712650299072,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "4af802cd.0768bc",
+        "9704e270.344da"
+      ]
+    ]
+  },
+  {
+    "id": "eec65610.3652f8",
+    "type": "comment",
+    "name": "GET connection-attachment-allotted-resource from mdsal",
+    "info": "",
+    "comments": "",
+    "x": 790.4750022888184,
+    "y": 480.53858375549316,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "eed42f31.59a27",
+    "type": "comment",
+    "name": "Used for setting output to API Handler",
+    "info": "",
+    "comments": "",
+    "x": 728.6602210998535,
+    "y": 209.99350547790527,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a03ab63b.9e0678",
+    "type": "comment",
+    "name": "Obtain different URL, template location etc",
+    "info": "For saving resource information to MDSAL & for AAI",
+    "comments": "",
+    "x": 746.6601867675781,
+    "y": 295.88238620758057,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "94d139ba.87f2c8",
+    "type": "comment",
+    "name": "Used to Get AR by id to MDSAL, same as self-link",
+    "info": "",
+    "comments": "",
+    "x": 772.6602058410645,
+    "y": 382.88234519958496,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4af802cd.0768bc",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1083.333408355713,
+    "y": 493.99999618530273,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "a5fa6dd6.43795"
+      ]
+    ]
+  },
+  {
+    "id": "a5fa6dd6.43795",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1252.3334121704102,
+    "y": 492.4998970031738,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "2f8c441e.efd2ec"
+      ]
+    ]
+  },
+  {
+    "id": "2f8c441e.efd2ec",
+    "type": "switchNode",
+    "name": "switch cr length",
+    "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1463.1906547546387,
+    "y": 492.11902618408203,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "e3552b55.2b7868",
+        "579fccfb.5c4c54"
+      ]
+    ]
+  },
+  {
+    "id": "e3552b55.2b7868",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1652.5239601135254,
+    "y": 492.1189842224121,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "81b472dd.735a8"
+      ]
+    ]
+  },
+  {
+    "id": "81b472dd.735a8",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic='true'>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1837.0478496551514,
+    "y": 489.02381801605225,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "d81a29f1.be9278",
+        "d95be879.b1bde8",
+        "f4a4bf1b.b7da1"
+      ]
+    ]
+  },
+  {
+    "id": "31667ce1.fcbca4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1796.1856498718262,
+    "y": 570.0660495758057,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9704e270.344da",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1075.1852111816406,
+    "y": 529.0660810470581,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "766c605e.af77c"
+      ]
+    ]
+  },
+  {
+    "id": "766c605e.af77c",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1255.1851615905762,
+    "y": 529.7326316833496,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "31667ce1.fcbca4"
+      ]
+    ]
+  },
+  {
+    "id": "579fccfb.5c4c54",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1640.8519134521484,
+    "y": 529.3993444442749,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "31667ce1.fcbca4"
+      ]
+    ]
+  },
+  {
+    "id": "d81a29f1.be9278",
+    "type": "set",
+    "name": "set connection-attachment-ar from get",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.' value='$mdsal-ar.connection-attachment-allotted-resource[0].' />\n",
+    "comments": "",
+    "x": 2206.1111946105957,
+    "y": 456.0000344514847,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f4a4bf1b.b7da1",
+    "type": "set",
+    "name": "set oper-status",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-ar.allotted-resource-status.rpc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n",
+    "comments": "",
+    "x": 2139.1113624572754,
+    "y": 531.428560256958,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d95be879.b1bde8",
+    "type": "switchNode",
+    "name": "switch order-status",
+    "xml": "<switch test='`$connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2149.111141204834,
+    "y": 496.9999942779541,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "e17a8fee.41d4",
+        "d3c8707c.374dc"
+      ]
+    ]
+  },
+  {
+    "id": "e17a8fee.41d4",
+    "type": "outcome",
+    "name": "outcome Active",
+    "xml": "<outcome value='Active'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2384.711223602295,
+    "y": 491.0000252723694,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "b89c0370.1273d"
+      ]
+    ]
+  },
+  {
+    "id": "d3c8707c.374dc",
+    "type": "outcome",
+    "name": "outcome Other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2378.4256629943848,
+    "y": 530.4286332130432,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "e88e83ff.2b0bf"
+      ]
+    ]
+  },
+  {
+    "id": "b89c0370.1273d",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2599.181739807129,
+    "y": 492.3756594657898,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "e88e83ff.2b0bf",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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\" \n    value=\"`'Existing connection-attachment-allotted-resource with order status of ' + $connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n",
+    "comments": "",
+    "x": 2618.3334426879883,
+    "y": 533.0000233650208,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "190989d8.d87b76",
+    "type": "call",
+    "name": "call GENERIC-RESOURCE-API:sotn-get-request-input-param",
+    "xml": "<call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 970.9697303771973,
+    "y": 598.4935593605042,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "dfdf08a.1b550f8",
+    "type": "block",
+    "name": "block: atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 652.9758071899414,
+    "y": 598.4998459815979,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "190989d8.d87b76"
+      ]
+    ]
+  },
+  {
+    "id": "3abce4e4.32a12c",
+    "type": "get-resource",
+    "name": "get-resource parent-service-data",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 717.6671180725098,
+    "y": 740.5316205024719,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "d140a12c.bd2ea",
+        "58621e56.68c4e"
+      ]
+    ]
+  },
+  {
+    "id": "aa132cfc.b387f",
+    "type": "comment",
+    "name": "GET parent-service-data from mdsal to check existence of other End point",
+    "info": "",
+    "comments": "",
+    "x": 837.6670570373535,
+    "y": 669.5315594673157,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "21ab6599.b5b88a",
+    "type": "for",
+    "name": "for pidx..mdsal-psd.provided-allotted-resources.provided-allotted-resource[]",
+    "xml": "<for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1726.8515377044678,
+    "y": 908.0041127204895,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "c38adf24.2987b"
+      ]
+    ]
+  },
+  {
+    "id": "d7eaa0c2.0d298",
+    "type": "switchNode",
+    "name": "switch mdsal-psd.provided-allotted-resources_length",
+    "xml": "<switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 783.8508949279785,
+    "y": 884.7180829048157,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "bab04a0a.986c28",
+        "ab941040.d9d58",
+        "e7f0f49a.c55b08"
+      ]
+    ]
+  },
+  {
+    "id": "bab04a0a.986c28",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1115.9937705993652,
+    "y": 1108.5755522474647,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "a85c2828.9226f8"
+      ]
+    ]
+  },
+  {
+    "id": "edfa14d3.f5d668",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1310.1211261749268,
+    "y": 902.7015252113342,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "21ab6599.b5b88a"
+      ]
+    ]
+  },
+  {
+    "id": "c38adf24.2987b",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test=\"`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2161.962938308716,
+    "y": 908.0040097236633,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "3532dc3f.6daa04",
+        "1210338.3b3d5cd"
+      ]
+    ]
+  },
+  {
+    "id": "3532dc3f.6daa04",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2370.7731647491455,
+    "y": 880.468499660492,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "7bfabe83.461c6"
+      ]
+    ]
+  },
+  {
+    "id": "515af9c1.8559f8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2550.5338611602783,
+    "y": 944.3256783485413,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "39e1b1c2.1c69fe",
+        "9b2b2091.9723d"
+      ]
+    ]
+  },
+  {
+    "id": "39e1b1c2.1c69fe",
+    "type": "set",
+    "name": "set tmp.pidx and ptx.consumed-ar",
+    "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n<parameter name='tmp.provided-ar.' value='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$pidx].`' />\n<parameter name='tmp.found-in-ar' value='true' />\n<parameter name='tmp.ep-available' value='true' />",
+    "comments": "",
+    "x": 2807.391366958618,
+    "y": 918.8971924781799,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9b2b2091.9723d",
+    "type": "break",
+    "name": "break",
+    "xml": "<break>\n",
+    "comments": "",
+    "x": 2718.2520847320557,
+    "y": 965.6532082557678,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "2b8d3c6c.b14764",
+    "type": "comment",
+    "name": "Check existence of other AR in parent service data",
+    "info": "Check if other allotted resource is available.",
+    "comments": "",
+    "x": 773.629337310791,
+    "y": 818.8928875923157,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ab941040.d9d58",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1127.6461639404297,
+    "y": 1032.6772694587708,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "46264523.92ecdc"
+      ]
+    ]
+  },
+  {
+    "id": "a85c2828.9226f8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1288.6461143493652,
+    "y": 1107.6772940382361,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "e7f0f49a.c55b08",
+    "type": "other",
+    "name": "outcome 2",
+    "xml": "<outcome value='2'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1135.646146774292,
+    "y": 903.6772255897522,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "edfa14d3.f5d668"
+      ]
+    ]
+  },
+  {
+    "id": "7bfabe83.461c6",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2528.7573795318604,
+    "y": 879.6772427558899,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "1210338.3b3d5cd",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2369.7573795318604,
+    "y": 942.6772427558899,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "515af9c1.8559f8"
+      ]
+    ]
+  },
+  {
+    "id": "e9cc6dee.5133e",
+    "type": "switchNode",
+    "name": "switch mdsal-psd.networks_length",
+    "xml": "<switch test='`$mdsal-psd.networks.network_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1563.9796333312988,
+    "y": 1032.8997707366943,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "30e9e8da.9a5228",
+        "80fd341d.8b4a38"
+      ]
+    ]
+  },
+  {
+    "id": "80fd341d.8b4a38",
+    "type": "other",
+    "name": "outcome 1",
+    "xml": "<outcome value='1'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1835.9796562194824,
+    "y": 1006.7886056900024,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "eab56bbb.5b2d38"
+      ]
+    ]
+  },
+  {
+    "id": "30e9e8da.9a5228",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1829.979778289795,
+    "y": 1066.7886056900024,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "9cd991eb.ad6e9"
+      ]
+    ]
+  },
+  {
+    "id": "9cd991eb.ad6e9",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: Incorrect state found more then 1 network\" />\n    \n",
+    "comments": "",
+    "x": 1986.632122039795,
+    "y": 1067.8904123306274,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "750841f5.89bfd",
+    "type": "set",
+    "name": "set tmp.network.",
+    "xml": "<set>\n<parameter name='tmp.network.' value='`$mdsal-psd.networks.network[0].`' />\n",
+    "comments": "",
+    "x": 2271.424503326416,
+    "y": 1007.788761138916,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "46264523.92ecdc",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1300.090518951416,
+    "y": 1033.7885174751282,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "e9cc6dee.5133e"
+      ]
+    ]
+  },
+  {
+    "id": "eab56bbb.5b2d38",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2027.75736618042,
+    "y": 1009.7884836196899,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "750841f5.89bfd",
+        "56082b6e.f90444"
+      ]
+    ]
+  },
+  {
+    "id": "56082b6e.f90444",
+    "type": "for",
+    "name": "for nidx..tmp.network.network-data.network-request-input.network...[]",
+    "xml": "<for index='nidx' start='0' end='`$tmp.network.network-data.network-request-input.network-input-parameters.param_length`' >",
+    "comments": "",
+    "outputs": 1,
+    "x": 2447.7576332092285,
+    "y": 1069.7884712219238,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "ad111a8e.73a1d8"
+      ]
+    ]
+  },
+  {
+    "id": "ad111a8e.73a1d8",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 2813.3130168914795,
+    "y": 1069.7885303497314,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "92d17a75.9c6dc8",
+        "60c80c93.08db54"
+      ]
+    ]
+  },
+  {
+    "id": "92d17a75.9c6dc8",
+    "type": "switchNode",
+    "name": "switch access-node-id",
+    "xml": "<switch test=\"`$tmp.network.network-data.network-request-input.network-input-parameters.param[$nidx].name == 'access-node-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 3017.8232707977295,
+    "y": 1072.798906326294,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "abca5378.b72d3"
+      ]
+    ]
+  },
+  {
+    "id": "abca5378.b72d3",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 3204.8232707977295,
+    "y": 1073.798906326294,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "db6a8374.5ea08"
+      ]
+    ]
+  },
+  {
+    "id": "db6a8374.5ea08",
+    "type": "set",
+    "name": "set tmp.found-in-network tmp.ep-available",
+    "xml": "<set>\n<parameter name='tmp.found-in-network' value='true' />\n<parameter name='tmp.ep-available' value='true' />",
+    "comments": "",
+    "x": 3455.823278427124,
+    "y": 1073.3988485336304,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "60c80c93.08db54",
+    "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",
+    "comments": "",
+    "x": 3000.81316947937,
+    "y": 1117.7885055541992,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "601263d0.9079dc",
+    "type": "switchNode",
+    "name": "switch tmp.ep-available",
+    "xml": "<switch test='`$tmp.ep-available`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 709.9794960021973,
+    "y": 1296.232792377472,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "89a90f2c.398bf",
+        "80d65700.60d008"
+      ]
+    ]
+  },
+  {
+    "id": "80d65700.60d008",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 928.6462154388428,
+    "y": 1345.5661492347717,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "844986d4.f4d158"
+      ]
+    ]
+  },
+  {
+    "id": "89a90f2c.398bf",
+    "type": "outcomeTrue",
+    "name": "false",
+    "xml": "<outcome value='false'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 933.5350170135498,
+    "y": 1254.566210269928,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "9208b0d4.846ab"
+      ]
+    ]
+  },
+  {
+    "id": "9208b0d4.846ab",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1080.5350131988525,
+    "y": 1256.4550232887268,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "844986d4.f4d158",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1098.757303237915,
+    "y": 1343.5661072731018,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "fc82177c.3c8168",
+        "6c1300b3.838e9",
+        "b83c0ca8.2fbee"
+      ]
+    ]
+  },
+  {
+    "id": "27f851f0.33167e",
+    "type": "comment",
+    "name": "GET connection-attachment-ar to store AR data from mdsal",
+    "info": "",
+    "comments": "",
+    "x": 2269.1394805908203,
+    "y": 420.50391721725464,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "105428a7.c0fa47",
+    "type": "comment",
+    "name": "Set source end point",
+    "info": "",
+    "comments": "",
+    "x": 674.6393585205078,
+    "y": 566.2539267539978,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "5040dd33.924624",
+    "type": "set",
+    "name": "set tmp.ar.parent-service-instance-id",
+    "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
+    "comments": "",
+    "x": 728.635440826416,
+    "y": 705.0000042915344,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d140a12c.bd2ea",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 964.635440826416,
+    "y": 733.0000042915344,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "ef017607.27ae68"
+      ]
+    ]
+  },
+  {
+    "id": "58621e56.68c4e",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 956.4872436523438,
+    "y": 768.0660891532898,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "50c1da8b.6785d4"
+      ]
+    ]
+  },
+  {
+    "id": "50c1da8b.6785d4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1131.635929107666,
+    "y": 764.3334393501282,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "ef017607.27ae68",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1115.635440826416,
+    "y": 731.0000042915344,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "7ff9e776.cf4d98",
+    "type": "set",
+    "name": "set tmp.found-in-ar tmp.found-in-network tmp.ep-available to false",
+    "xml": "<set>\n<parameter name='tmp.found-in-ar' value='false' />\n<parameter name='tmp.found-in-network' value='false' />\n<parameter name='tmp.ep-available' value='false' />",
+    "comments": "",
+    "x": 820.635440826416,
+    "y": 850.0000042915344,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "6020d2b5.ff31bc",
+    "type": "comment",
+    "name": "If other EP exists delete from domain controller",
+    "info": "",
+    "comments": "",
+    "x": 760.635440826416,
+    "y": 1221.0000042915344,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "1d5ec4d8.fd16cb",
+    "type": "set",
+    "name": "set controller data",
+    "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n",
+    "comments": "",
+    "x": 1814.6355590820312,
+    "y": 1374.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "6c1300b3.838e9",
+    "type": "get-resource",
+    "name": "get-resource esr-thirdparty-sdnc",
+    "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1378.135498046875,
+    "y": 1433.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "9b0a24a5.e3c928",
+        "3d4157e0.0e2b48",
+        "47d559b2.2326f8"
+      ]
+    ]
+  },
+  {
+    "id": "9b0a24a5.e3c928",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1617.135498046875,
+    "y": 1386.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "1d5ec4d8.fd16cb"
+      ]
+    ]
+  },
+  {
+    "id": "3d4157e0.0e2b48",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1620.62646484375,
+    "y": 1433.574055671692,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "4d76fe9.b9e25"
+      ]
+    ]
+  },
+  {
+    "id": "47d559b2.2326f8",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1615.95947265625,
+    "y": 1474.9073686599731,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "4373fee3.5c15e"
+      ]
+    ]
+  },
+  {
+    "id": "4d76fe9.b9e25",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
+    "comments": "",
+    "x": 1797.1978759765625,
+    "y": 1421.8597917556763,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "4373fee3.5c15e",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
+    "comments": "",
+    "x": 1803.7320289611816,
+    "y": 1470.3465614318848,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "fc82177c.3c8168",
+    "type": "get-resource",
+    "name": "get-resource pnf",
+    "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"pnf\" \n\t\tkey=\"pnf.pnf-name = $prop.connection-attachement.access-node-id AND \n\t\t     depth = '0'\"\n        pfx='tmp.aai.pnf' local-only='false' >\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1324.6355590820312,
+    "y": 1246.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "71aef88f.e0bf68",
+        "2c74406b.e0e78",
+        "5d3880b0.6e762"
+      ]
+    ]
+  },
+  {
+    "id": "71aef88f.e0bf68",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1671.635498046875,
+    "y": 1250.0000505447388,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "a198897a.59b5a8"
+      ]
+    ]
+  },
+  {
+    "id": "2c74406b.e0e78",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1675.12646484375,
+    "y": 1297.57408618927,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "c41f8753.3bbf68"
+      ]
+    ]
+  },
+  {
+    "id": "5d3880b0.6e762",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1670.45947265625,
+    "y": 1338.9073991775513,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "f23816e4.5d6938"
+      ]
+    ]
+  },
+  {
+    "id": "c41f8753.3bbf68",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`\" />\n\n",
+    "comments": "",
+    "x": 1851.6978759765625,
+    "y": 1285.8598222732544,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f23816e4.5d6938",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`\" />\n\n",
+    "comments": "",
+    "x": 1858.2320289611816,
+    "y": 1334.346591949463,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a198897a.59b5a8",
+    "type": "set",
+    "name": "set tmp.thirdparty-sdnc-id",
+    "xml": "<set>\n<parameter name='tmp.thirdparty-sdnc-id' value=\"`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`\" />\n",
+    "comments": "",
+    "x": 1875.635498046875,
+    "y": 1237.0000505447388,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "193624d6.cf45fb",
+    "type": "comment",
+    "name": "get domain controller information",
+    "info": "",
+    "comments": "",
+    "x": 1369.1394271850586,
+    "y": 1212.0039176940918,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b83c0ca8.2fbee",
+    "type": "execute",
+    "name": "execute RestApiCallNode Delete ethernet Service",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + 'restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances=' + $prop.connection-attachment.sotnVpnName`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"delete\"/>\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
+    "comments": "",
+    "outputs": 1,
+    "x": 1426.6355590820312,
+    "y": 1538.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "157d151e.8db5fb",
+        "dc587393.0f491"
+      ]
+    ]
+  },
+  {
+    "id": "157d151e.8db5fb",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1713.635498046875,
+    "y": 1561.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "22b1ca9.6034f36"
+      ]
+    ]
+  },
+  {
+    "id": "22b1ca9.6034f36",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "comments": "",
+    "outputs": 1,
+    "x": 1883.6354370117188,
+    "y": 1564.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "949096af.7825e8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error executing Create vpn rest api\" />\n",
+    "comments": "",
+    "x": 1883.6355590820312,
+    "y": 1520.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "dc587393.0f491",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1716.6354370117188,
+    "y": 1520.0000200271606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "949096af.7825e8"
+      ]
+    ]
+  },
+  {
+    "id": "83d13f6d.0d8cd",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 984.397403717041,
+    "y": 1879.9526022672653,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "3bbdd84b.d766e8"
+      ]
+    ]
+  },
+  {
+    "id": "3bbdd84b.d766e8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"AAI failed\" />\n",
+    "comments": "",
+    "x": 1150.9212837219238,
+    "y": 1891.5716732740402,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "55a09cbe.8cef84",
+    "type": "failure",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 991.4926910400391,
+    "y": 1912.714569926262,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "3bbdd84b.d766e8"
+      ]
+    ]
+  },
+  {
+    "id": "5f6a467a.dfacc8",
+    "type": "comment",
+    "name": "Save Resource to AAI",
+    "info": "",
+    "comments": "",
+    "x": 703.4451179504395,
+    "y": 1862.3019905090332,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "79627cb0.0dbb74",
+    "type": "comment",
+    "name": "TODO: Rework after confirmation from AAI",
+    "info": "",
+    "comments": "",
+    "x": 1003.804027557373,
+    "y": 1839.8730292320251,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "bc602338.67328",
+    "type": "set",
+    "name": "set output to api handler",
+    "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
+    "comments": "",
+    "x": 718.2128143310547,
+    "y": 1783.8274717330933,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "f080d760.856678",
+    "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",
+    "comments": "",
+    "x": 686.6258964538574,
+    "y": 1944.443223953247,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c5b69925.729378",
+    "type": "execute",
+    "name": "execute RestApiCallNode - PUT AR by id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 767.9449157714844,
+    "y": 1691.4682455062866,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "c8f2c95e.7a0b78",
+        "edc7bb51.8c2ee8",
+        "a8558f0e.c66f3"
+      ]
+    ]
+  },
+  {
+    "id": "c8f2c95e.7a0b78",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1036.5862922668457,
+    "y": 1742.7996572479606,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "456ce311.27ccec"
+      ]
+    ]
+  },
+  {
+    "id": "edc7bb51.8c2ee8",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1027.5863418579102,
+    "y": 1711.299682997167,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "456ce311.27ccec"
+      ]
+    ]
+  },
+  {
+    "id": "a8558f0e.c66f3",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1031.3363800048828,
+    "y": 1681.6567878723145,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "fc3cc6b.7a5fa38"
+      ]
+    ]
+  },
+  {
+    "id": "456ce311.27ccec",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
+    "comments": "",
+    "x": 1197.3363800048828,
+    "y": 1712.049706839025,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "fc3cc6b.7a5fa38",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1172.9923477172852,
+    "y": 1677.8489570617676,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "5af6e72b.9d69a8",
+    "type": "set",
+    "name": "set ar-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-status.action' value=\"`$connection-attachment-topology-operation-input.request-information.request-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value=\"connection-attachment-topology-operation\" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$connection-attachment-topology-operation-input.request-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$connection-attachment-topology-operation-input.service-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.` \" />",
+    "comments": "",
+    "x": 673.1585121154785,
+    "y": 1542.8492257595062,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "1d49bda0.f37e32",
+    "type": "execute",
+    "name": "execute getTime",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 690.4443550109863,
+    "y": 1615.4688234329224,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "285d454d.f5f90a",
+    "type": "set",
+    "name": "set allotted-resource-oper-status",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",
+    "comments": "",
+    "x": 740.4314346313477,
+    "y": 1652.419903755188,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "2d9aed4c.fcfbd2",
+    "type": "set",
+    "name": "set model-data",
+    "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` \" />",
+    "comments": "",
+    "x": 687.0000534057617,
+    "y": 1582.0238761901855,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9565d730.07f7d8",
+    "type": "comment",
+    "name": "Prepare data for allotted-resource addition to MDSAL",
+    "info": "This will add to allotted-resource which is present inside service.",
+    "comments": "",
+    "x": 800.3335151672363,
+    "y": 1503.0238282680511,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b61bb52.fd12048",
+    "type": "comment",
+    "name": "Add to allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 741.9133415222168,
+    "y": 1470.4371299743652,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "8e738bcf.052208",
+    "type": "update",
+    "name": "update AAI allotted-resource",
+    "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`\" />\n\t<parameter name=\"operational-status\" value=\"PendingDelete\" />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 729.8893966674805,
+    "y": 1899.7541332244873,
+    "z": "b5ee72b6.6e8c5",
+    "wires": [
+      [
+        "83d13f6d.0d8cd",
+        "55a09cbe.8cef84"
+      ]
+    ]
+  }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.json
new file mode 100644 (file)
index 0000000..ca5ca89
--- /dev/null
@@ -0,0 +1,1013 @@
+[
+  {
+    "id": "40d74cd7.316a14",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 101,
+    "y": 40,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "f8cb9b5e.038868"
+      ]
+    ]
+  },
+  {
+    "id": "f8cb9b5e.038868",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 313.00000381469727,
+    "y": 112.0000171661377,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "a82adde1.bdf47"
+      ]
+    ]
+  },
+  {
+    "id": "a82adde1.bdf47",
+    "type": "method",
+    "name": "sotn-attachment-topology-operation-delete",
+    "xml": "<method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 301.0001220703125,
+    "y": 200,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "949cc74.207fe38"
+      ]
+    ]
+  },
+  {
+    "id": "949cc74.207fe38",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 317.0001220703125,
+    "y": 755.0002446174622,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "e8c0ed11.a9ee2",
+        "acbb646b.d77cc8",
+        "fd6eb40b.cdb328",
+        "9e6bdd2.2396b2",
+        "b1c2a911.f82f08",
+        "90800e39.89524",
+        "3735d68f.ab66da",
+        "c9fb1b0b.8e8c48",
+        "3438f4ce.6e83dc",
+        "8443751c.74bd98",
+        "4de78821.6f3c58",
+        "bcd52af9.df1738",
+        "9273699a.4d08c8",
+        "85ce8a7e.f20d58"
+      ]
+    ]
+  },
+  {
+    "id": "e8c0ed11.a9ee2",
+    "type": "set",
+    "name": "set tmp.ar.allotted-resource-id,etc",
+    "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n",
+    "comments": "",
+    "x": 713.9935607910156,
+    "y": 153.9934868812561,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "43da58d7.610758",
+    "type": "comment",
+    "name": "set tmp ar-id to fetch resource from MDSAL",
+    "info": "",
+    "comments": "",
+    "x": 742.9538726806641,
+    "y": 118.02528285980225,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "acbb646b.d77cc8",
+    "type": "set",
+    "name": "set tmp.ar.self-link",
+    "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
+    "comments": "",
+    "x": 667.9934997558594,
+    "y": 246.99349212646484,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "90800e39.89524",
+    "type": "execute",
+    "name": "execute Properties",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 674.2553901672363,
+    "y": 334.6602210998535,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "fd6eb40b.cdb328",
+    "type": "execute",
+    "name": "generate allotted-resource url",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 706.2554168701172,
+    "y": 422.66020250320435,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "1905b8ab.ca3847",
+    "type": "comment",
+    "name": "Used for setting output to API Handler",
+    "info": "",
+    "comments": "",
+    "x": 721.9935302734375,
+    "y": 213.993501663208,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "472b5b53.359df4",
+    "type": "comment",
+    "name": "Obtain different URL, template location etc",
+    "info": "For saving resource information to MDSAL & for AAI",
+    "comments": "",
+    "x": 739.9934959411621,
+    "y": 299.8823823928833,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "e758b3f.c00a45",
+    "type": "comment",
+    "name": "Used to Get AR by id to MDSAL, same as self-link",
+    "info": "",
+    "comments": "",
+    "x": 765.9935150146484,
+    "y": 386.8823413848877,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "9e6bdd2.2396b2",
+    "type": "get-resource",
+    "name": "get-resource parent-service-data",
+    "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 713.0003890991211,
+    "y": 912.531683921814,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "376a6931.f70fe6",
+        "344c3669.3f542a"
+      ]
+    ]
+  },
+  {
+    "id": "7df855f0.47079c",
+    "type": "comment",
+    "name": "GET parent-service-data from mdsal to check existence of other End point",
+    "info": "",
+    "comments": "",
+    "x": 833.0003280639648,
+    "y": 841.5316228866577,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "3af49e65.969612",
+    "type": "for",
+    "name": "for pidx..mdsal-psd.provided-allotted-resources.provided-allotted-resource[]",
+    "xml": "<for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1644.1849060058594,
+    "y": 1017.0042171478271,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "c4ca63d9.fd59d"
+      ]
+    ]
+  },
+  {
+    "id": "b1c2a911.f82f08",
+    "type": "switchNode",
+    "name": "switch mdsal-psd.provided-allotted-resources_length",
+    "xml": "<switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 772.1841125488281,
+    "y": 1001.7180595397949,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "af927d7b.49dce",
+        "fc0125f.d3b43d8"
+      ]
+    ]
+  },
+  {
+    "id": "97446eab.09441",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1258.4543991088867,
+    "y": 1057.7015590667725,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "3af49e65.969612",
+        "7aae58e1.7b18c8"
+      ]
+    ]
+  },
+  {
+    "id": "c4ca63d9.fd59d",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test=\"`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2063.2962188720703,
+    "y": 1017.0040645599365,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "637d9cfe.cdf994"
+      ]
+    ]
+  },
+  {
+    "id": "3735d68f.ab66da",
+    "type": "set",
+    "name": "set tmp.ar.parent-service-instance-id",
+    "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
+    "comments": "",
+    "x": 723.9687118530273,
+    "y": 877.0000677108765,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "376a6931.f70fe6",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 959.9687118530273,
+    "y": 905.0000677108765,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "eee1cf23.532fa"
+      ]
+    ]
+  },
+  {
+    "id": "344c3669.3f542a",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 951.8205146789551,
+    "y": 940.0661525726318,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "38d98c77.5a5dc4"
+      ]
+    ]
+  },
+  {
+    "id": "38d98c77.5a5dc4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: SOTN resource not found\" />\n    \n",
+    "comments": "",
+    "x": 1126.9692001342773,
+    "y": 936.3335027694702,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "eee1cf23.532fa",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1110.9687118530273,
+    "y": 903.0000677108765,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "fd82a90d.c15198",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 952.7306861877441,
+    "y": 1186.9527963399887,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "a5f6bd09.ffa1d"
+      ]
+    ]
+  },
+  {
+    "id": "a5f6bd09.ffa1d",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"AAI failed\" />\n",
+    "comments": "",
+    "x": 1119.254566192627,
+    "y": 1198.5718673467636,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "399e5f25.1d673",
+    "type": "failure",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 959.8259735107422,
+    "y": 1219.7147639989853,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "a5f6bd09.ffa1d"
+      ]
+    ]
+  },
+  {
+    "id": "c1db391c.684108",
+    "type": "comment",
+    "name": "TODO: Rework after confirmation from AAI",
+    "info": "",
+    "comments": "",
+    "x": 1084.137351989746,
+    "y": 1137.8731961250305,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c9fb1b0b.8e8c48",
+    "type": "set",
+    "name": "set output to api handler",
+    "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
+    "comments": "",
+    "x": 685.5460739135742,
+    "y": 1150.8276634216309,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "3438f4ce.6e83dc",
+    "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",
+    "comments": "",
+    "x": 654.9591789245605,
+    "y": 1251.4434180259705,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "8443751c.74bd98",
+    "type": "execute",
+    "name": "execute RestApiCallNode - PUT AR by id",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='Delete' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 739.6666641235352,
+    "y": 511.3333625793457,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "800033f.1bbe0d",
+        "b5b39fe4.c4cab",
+        "11a37ef9.11cf81"
+      ]
+    ]
+  },
+  {
+    "id": "800033f.1bbe0d",
+    "type": "not-found",
+    "name": "not-found",
+    "xml": "<outcome value='not-found'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1008.3080406188965,
+    "y": 562.6647743210196,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "84c30bf1.79ce98"
+      ]
+    ]
+  },
+  {
+    "id": "b5b39fe4.c4cab",
+    "type": "failure",
+    "name": "failure",
+    "xml": "<outcome value='failure'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 999.3080902099609,
+    "y": 531.1648000702262,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "84c30bf1.79ce98"
+      ]
+    ]
+  },
+  {
+    "id": "11a37ef9.11cf81",
+    "type": "success",
+    "name": "success",
+    "xml": "<outcome value='success'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1003.0581283569336,
+    "y": 501.52190494537354,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "b7efe17a.65f42"
+      ]
+    ]
+  },
+  {
+    "id": "84c30bf1.79ce98",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
+    "comments": "",
+    "x": 1169.0581283569336,
+    "y": 531.9148239120841,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b7efe17a.65f42",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1144.714096069336,
+    "y": 497.71407413482666,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        
+      ]
+    ]
+  },
+  {
+    "id": "67cf0e71.e946f",
+    "type": "comment",
+    "name": "Delete Allotted Resource",
+    "info": "",
+    "comments": "",
+    "x": 687.0000457763672,
+    "y": 480.0000286102295,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c1be7c26.8538e",
+    "type": "for",
+    "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
+    "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1637.00390625,
+    "y": 717.00390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "b702145d.d12dd8"
+      ]
+    ]
+  },
+  {
+    "id": "4de78821.6f3c58",
+    "type": "switchNode",
+    "name": "switch service-data.consumed-allotted-resources_length",
+    "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 790.0032920837402,
+    "y": 677.71790766716,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "9fcadeb2.7ddd3",
+        "f277a541.5d4da8"
+      ]
+    ]
+  },
+  {
+    "id": "9fcadeb2.7ddd3",
+    "type": "other",
+    "name": "outcome Null",
+    "xml": "<outcome value=''>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1114.1461563110352,
+    "y": 660.5753421783447,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "6ed5686.b9f1498"
+      ]
+    ]
+  },
+  {
+    "id": "f277a541.5d4da8",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1100.1461791992188,
+    "y": 723.5753309726715,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "a167b159.d1f0a"
+      ]
+    ]
+  },
+  {
+    "id": "a167b159.d1f0a",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1260.2732696533203,
+    "y": 721.7013075351715,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "c1be7c26.8538e",
+        "a14b9903.574488"
+      ]
+    ]
+  },
+  {
+    "id": "bcd52af9.df1738",
+    "type": "set",
+    "name": "set consumed allotted resources for deletion",
+    "xml": "<set>\n<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].\" value=\"\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`' />\n\n",
+    "comments": "",
+    "x": 746.8606262207031,
+    "y": 748.28955078125,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "b702145d.d12dd8",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2075.1155166625977,
+    "y": 713.0040283203125,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "5f8fbf17.00afa"
+      ]
+    ]
+  },
+  {
+    "id": "5f8fbf17.00afa",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2270.925338745117,
+    "y": 712.4683527946472,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "c51401e.55444"
+      ]
+    ]
+  },
+  {
+    "id": "43e9034f.c4ea2c",
+    "type": "set",
+    "name": "set tmp.cidx",
+    "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
+    "comments": "",
+    "x": 2582.26171875,
+    "y": 672.2246131896973,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "cdccd47e.bede38",
+    "type": "comment",
+    "name": "Delete consumed service consumed-allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 801.0045623779297,
+    "y": 610.0038724095793,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "d296b738.04dcc8",
+    "type": "comment",
+    "name": "This set resource will be deleted in MDSAL by provider code",
+    "info": "",
+    "comments": "",
+    "x": 791.337345123291,
+    "y": 714.781964302063,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "8922e52b.01caf8",
+    "type": "comment",
+    "name": "Obtain the index of conusumed AR",
+    "info": "",
+    "comments": "",
+    "x": 713.7817535400391,
+    "y": 641.8927326202393,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "6ed5686.b9f1498",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Resource to be deleted doesn't exist in MDSAL.\" />\n",
+    "comments": "",
+    "x": 1276.00390625,
+    "y": 661.00390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "e0029499.0fe808",
+    "type": "break",
+    "name": "break",
+    "xml": "<break>\n",
+    "comments": "",
+    "x": 2574.003875732422,
+    "y": 732.2540216445923,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "c51401e.55444",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2420.003936767578,
+    "y": 713.2539558410645,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "43e9034f.c4ea2c",
+        "e0029499.0fe808"
+      ]
+    ]
+  },
+  {
+    "id": "f81fb204.590a8",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"resource to be deleted is not available in mdsal\" />\n",
+    "comments": "",
+    "x": 1730.25390625,
+    "y": 770.25390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "1a2d8fc2.146df",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1592.75390625,
+    "y": 770.25390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "f81fb204.590a8"
+      ]
+    ]
+  },
+  {
+    "id": "a14b9903.574488",
+    "type": "switchNode",
+    "name": "switch tmp.cidx ",
+    "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1438.75390625,
+    "y": 770.25390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "1a2d8fc2.146df"
+      ]
+    ]
+  },
+  {
+    "id": "a2784c5c.f26de",
+    "type": "comment",
+    "name": "Delete provided service provided-allotted-resources in mdsal",
+    "info": "",
+    "comments": "",
+    "x": 787.5039215087891,
+    "y": 806.00390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "fc0125f.d3b43d8",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1081.5039596557617,
+    "y": 1054.7539730072021,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "97446eab.09441"
+      ]
+    ]
+  },
+  {
+    "id": "af927d7b.49dce",
+    "type": "other",
+    "name": "outcome Null",
+    "xml": "<outcome value=''>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1093.5038833618164,
+    "y": 991.7539174556732,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "29d2e8ba.860218"
+      ]
+    ]
+  },
+  {
+    "id": "29d2e8ba.860218",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"Resource to be deleted doesn't exist in MDSAL.\" />\n",
+    "comments": "",
+    "x": 1255.3616333007812,
+    "y": 992.1824815273285,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "8fbe7fb5.2044c",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"resource to be deleted is not available in mdsal\" />\n",
+    "comments": "",
+    "x": 1752.75390625,
+    "y": 1088.75390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "99d40761.083518",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1615.25390625,
+    "y": 1088.75390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "8fbe7fb5.2044c"
+      ]
+    ]
+  },
+  {
+    "id": "7aae58e1.7b18c8",
+    "type": "switchNode",
+    "name": "switch tmp.pidx ",
+    "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1461.25390625,
+    "y": 1088.75390625,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "99d40761.083518"
+      ]
+    ]
+  },
+  {
+    "id": "637d9cfe.cdf994",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2262.503963470459,
+    "y": 1014.7539739608765,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "240168eb.ef4528"
+      ]
+    ]
+  },
+  {
+    "id": "fb4a1e64.0992d",
+    "type": "set",
+    "name": "set tmp.pidx",
+    "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
+    "comments": "",
+    "x": 2580.8404235839844,
+    "y": 973.5101690292358,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "a63547e2.d5edc8",
+    "type": "break",
+    "name": "break",
+    "xml": "<break>\n",
+    "comments": "",
+    "x": 2572.5825805664062,
+    "y": 1033.5395774841309,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "240168eb.ef4528",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 2418.5826416015625,
+    "y": 1014.539511680603,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "fb4a1e64.0992d",
+        "a63547e2.d5edc8"
+      ]
+    ]
+  },
+  {
+    "id": "9273699a.4d08c8",
+    "type": "set",
+    "name": "set provided allotted resources for deletion",
+    "xml": "<set>\n<parameter name=\"service-data.provided-allotted-resources.consumed-allotted-resource[$pidx].\" value=\"\" />\n<parameter name='service-data.provided-allotted-resources.consumed-allotted-resource_length' value='`$service-data.provided-allotted-resources.consumed-allotted-resource_length - 1`' />\n\n",
+    "comments": "",
+    "x": 741.0039215087891,
+    "y": 1052.003957748413,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      
+    ]
+  },
+  {
+    "id": "85ce8a7e.f20d58",
+    "type": "update",
+    "name": "update AAI allotted-resource",
+    "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='allotted-resource'  \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 698.2226791381836,
+    "y": 1206.7543272972107,
+    "z": "344982e2.7dca5e",
+    "wires": [
+      [
+        "fd82a90d.c15198",
+        "399e5f25.1d673"
+      ]
+    ]
+  }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.json
new file mode 100644 (file)
index 0000000..f9a6bb1
--- /dev/null
@@ -0,0 +1,481 @@
+[
+  {
+    "id": "78c3c512.2a5cfc",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 113.03125,
+    "y": 43.03125,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "c8295f65.8fc4c"
+      ]
+    ]
+  },
+  {
+    "id": "c8295f65.8fc4c",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 325.03125381469727,
+    "y": 115.0312671661377,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "cb959304.88093"
+      ]
+    ]
+  },
+  {
+    "id": "cb959304.88093",
+    "type": "method",
+    "name": "sotnt-get-saved-ar-param",
+    "xml": "<method rpc='sotn-get-saved-ar-param' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 313.0313720703125,
+    "y": 203.03125,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "f53a4fe7.e10d8"
+      ]
+    ]
+  },
+  {
+    "id": "f53a4fe7.e10d8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 320.03126525878906,
+    "y": 289.0313081741333,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "cb3c00be.eadaf"
+      ]
+    ]
+  },
+  {
+    "id": "cb3c00be.eadaf",
+    "type": "for",
+    "name": "for each sotn-get-request-input-param",
+    "xml": "<for index='idx' start='0' end='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param_length`' >\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 356.6980285644531,
+    "y": 371.697904586792,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "9fceee94.c7352"
+      ]
+    ]
+  },
+  {
+    "id": "9fceee94.c7352",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 621.5315322875977,
+    "y": 281.03129625320435,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "ac9e17c4.666db8",
+        "68c68212.dc993c",
+        "66615c8e.b750a4",
+        "4a64e3ec.0803bc",
+        "d49b138b.9b447",
+        "1f7b915.12bc26f",
+        "fcc00482.9d4728",
+        "be269c99.3195",
+        "d97ebcd8.acf64"
+      ]
+    ]
+  },
+  {
+    "id": "ac9e17c4.666db8",
+    "type": "switchNode",
+    "name": "switch sotnVpnName",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'sotnVpnName'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 848.53125,
+    "y": 79.03128051757812,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "4f0e4c80.dde4f4"
+      ]
+    ]
+  },
+  {
+    "id": "4f0e4c80.dde4f4",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1035.53125,
+    "y": 75.03128051757812,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "ca00e2af.bb58d"
+      ]
+    ]
+  },
+  {
+    "id": "ca00e2af.bb58d",
+    "type": "set",
+    "name": "set sotnVpnName",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.sotnVpnName' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1203.53125,
+    "y": 75.63128662109375,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "68c68212.dc993c",
+    "type": "switchNode",
+    "name": "switch access-provider-id",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-provider-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 849.0416793823242,
+    "y": 138.03128051757812,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "a284600c.21032"
+      ]
+    ]
+  },
+  {
+    "id": "a284600c.21032",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1036.0416793823242,
+    "y": 134.03128051757812,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "226a73cd.788cbc"
+      ]
+    ]
+  },
+  {
+    "id": "226a73cd.788cbc",
+    "type": "set",
+    "name": "set access-provider-id",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.access-provider-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1204.0416793823242,
+    "y": 134.63128662109375,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "66615c8e.b750a4",
+    "type": "switchNode",
+    "name": "switch access-client-id",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-client-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 851.0417404174805,
+    "y": 191.04170036315918,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "2b01edeb.bc12c2"
+      ]
+    ]
+  },
+  {
+    "id": "2b01edeb.bc12c2",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1038.0417404174805,
+    "y": 187.04170036315918,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "ce9ed833.dd9e08"
+      ]
+    ]
+  },
+  {
+    "id": "ce9ed833.dd9e08",
+    "type": "set",
+    "name": "set access-client-id",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.access-client-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1206.0417404174805,
+    "y": 187.6417064666748,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "4a64e3ec.0803bc",
+    "type": "switchNode",
+    "name": "switch access-topology-id",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-topology-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 847.0417404174805,
+    "y": 257.0417003631592,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "cd0931d.fc24dd"
+      ]
+    ]
+  },
+  {
+    "id": "cd0931d.fc24dd",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1034.0417404174805,
+    "y": 253.04170036315918,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "ae46664c.2ac008"
+      ]
+    ]
+  },
+  {
+    "id": "ae46664c.2ac008",
+    "type": "set",
+    "name": "set access-topology-id",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.access-topology-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1202.0417404174805,
+    "y": 253.6417064666748,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "d49b138b.9b447",
+    "type": "switchNode",
+    "name": "switch access-node-id",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-node-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 852.0417404174805,
+    "y": 311.04169845581055,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "c9b215fc.9adfd8"
+      ]
+    ]
+  },
+  {
+    "id": "c9b215fc.9adfd8",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1039.0417404174805,
+    "y": 307.04169845581055,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "faf7a4cf.251418"
+      ]
+    ]
+  },
+  {
+    "id": "faf7a4cf.251418",
+    "type": "set",
+    "name": "set access-node-id",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.access-node-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1207.0417404174805,
+    "y": 307.6417045593262,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "1f7b915.12bc26f",
+    "type": "switchNode",
+    "name": "switch access-ltp-id",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-ltp-id'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 854.0417404174805,
+    "y": 373.04165840148926,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "672f4f35.c2cfa"
+      ]
+    ]
+  },
+  {
+    "id": "672f4f35.c2cfa",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1041.0417404174805,
+    "y": 369.04165840148926,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "f006294d.d5f238"
+      ]
+    ]
+  },
+  {
+    "id": "f006294d.d5f238",
+    "type": "set",
+    "name": "set access-ltp-id",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.access-ltp-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1209.0417404174805,
+    "y": 369.6416645050049,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "fcc00482.9d4728",
+    "type": "switchNode",
+    "name": "switch clientSignal",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'clientSignal'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 858.0417404174805,
+    "y": 439.0416650772095,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "c5ace371.7d146"
+      ]
+    ]
+  },
+  {
+    "id": "c5ace371.7d146",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1045.0417404174805,
+    "y": 435.0416650772095,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "6652e4bd.26a58c"
+      ]
+    ]
+  },
+  {
+    "id": "6652e4bd.26a58c",
+    "type": "set",
+    "name": "set clientSignal",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.clientSignal' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1213.0417404174805,
+    "y": 435.6416711807251,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "be269c99.3195",
+    "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",
+    "comments": "",
+    "x": 851.0313720703125,
+    "y": 553.031268119812,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "d97ebcd8.acf64",
+    "type": "switchNode",
+    "name": "switch cVLAN",
+    "xml": "<switch test=\"`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'cVLAN'`\">",
+    "comments": "",
+    "outputs": 1,
+    "x": 857.03125,
+    "y": 491.0312194824219,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "b35b1b6b.cc2e38"
+      ]
+    ]
+  },
+  {
+    "id": "b35b1b6b.cc2e38",
+    "type": "outcomeTrue",
+    "name": "true",
+    "xml": "<outcome value='true'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1044.03125,
+    "y": 487.0312194824219,
+    "z": "be273250.67063",
+    "wires": [
+      [
+        "d9b42ffa.b44df"
+      ]
+    ]
+  },
+  {
+    "id": "d9b42ffa.b44df",
+    "type": "set",
+    "name": "set cVLAN",
+    "xml": "<set>\n<parameter name='prop.connection-attachment.cVLAN' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\n",
+    "comments": "",
+    "x": 1212.03125,
+    "y": 487.6312255859375,
+    "z": "be273250.67063",
+    "wires": [
+
+    ]
+  }
+]
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-connection-attachment-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-connection-attachment-input.json
new file mode 100644 (file)
index 0000000..fa77c6f
--- /dev/null
@@ -0,0 +1,993 @@
+[
+  {
+    "id": "193b8ebe.168931",
+    "type": "dgstart",
+    "name": "DGSTART",
+    "outputs": 1,
+    "x": 133.03125,
+    "y": 58.03125,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "516b96b5.f39508"
+      ]
+    ]
+  },
+  {
+    "id": "516b96b5.f39508",
+    "type": "service-logic",
+    "name": "GENERIC-RESOURCE-API ${project.version}",
+    "module": "GENERIC-RESOURCE-API",
+    "version": "${project.version}",
+    "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='GENERIC-RESOURCE-API' version='${project.version}'>",
+    "outputs": 1,
+    "x": 262.3169708251953,
+    "y": 153.26932334899902,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "d1fe8042.cc5a4"
+      ]
+    ]
+  },
+  {
+    "id": "d1fe8042.cc5a4",
+    "type": "method",
+    "name": "method validate-connection-attachment-input",
+    "xml": "<method rpc='validate-connection-attachment-input' mode='sync'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 258.94793701171875,
+    "y": 249.28427839279175,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b05ac558.fc0298"
+      ]
+    ]
+  },
+  {
+    "id": "b05ac558.fc0298",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 265.94799041748047,
+    "y": 367.28428649902344,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "11b2d666.19a8fa",
+        "a0f1dfee.c1db9",
+        "57efdb7e.7de474",
+        "e66639cf.56aa48"
+      ]
+    ]
+  },
+  {
+    "id": "11b2d666.19a8fa",
+    "type": "switchNode",
+    "name": "switch  svc-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 671.9479293823242,
+    "y": 24.28428077697754,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "563fe857.005428"
+      ]
+    ]
+  },
+  {
+    "id": "563fe857.005428",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 883.6623001098633,
+    "y": 24.28429126739502,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "bf9c002.703e6"
+      ]
+    ]
+  },
+  {
+    "id": "bf9c002.703e6",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"sdnc-request-header.svc-request-id is a required input\" />\n",
+    "comments": "",
+    "x": 1058.0908508300781,
+    "y": 23.28428363800049,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a0f1dfee.c1db9",
+    "type": "switchNode",
+    "name": "switch svc-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 656.9478225708008,
+    "y": 366.2843084335327,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "6b1eefd1.a4726",
+        "517bdb12.579b84",
+        "352e24a0.788a7c",
+        "92374a0f.2f7d98",
+        "eb87ceea.db236"
+      ]
+    ]
+  },
+  {
+    "id": "6b1eefd1.a4726",
+    "type": "outcome",
+    "name": "create",
+    "xml": "<outcome value='create'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 882.4479789733887,
+    "y": 194.28435230255127,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "2f04939.a9b436c"
+      ]
+    ]
+  },
+  {
+    "id": "517bdb12.579b84",
+    "type": "outcome",
+    "name": "delete",
+    "xml": "<outcome value='delete'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 884.4599838256836,
+    "y": 772.1745042800903,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "c9b924ac.aa4418"
+      ]
+    ]
+  },
+  {
+    "id": "352e24a0.788a7c",
+    "type": "other",
+    "name": "other",
+    "xml": "<outcome value='Other'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 885.2218246459961,
+    "y": 958.6029243469238,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "313b0ba4.9277b4"
+      ]
+    ]
+  },
+  {
+    "id": "313b0ba4.9277b4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
+    "comments": "",
+    "x": 1068.793357849121,
+    "y": 959.2220649719238,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "c9b924ac.aa4418",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1066.6028099060059,
+    "y": 772.8409547805786,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "21ee0580.01132a"
+      ]
+    ]
+  },
+  {
+    "id": "72eb1342.c73a6c",
+    "type": "other",
+    "name": "DeleteSOTNAttachmentInstance",
+    "xml": "<outcome value='DeleteSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1380.3171997070312,
+    "y": 786.8409357070923,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "a0b8065a.68d4e8"
+      ]
+    ]
+  },
+  {
+    "id": "77510c5b.922da4",
+    "type": "other",
+    "name": "Other",
+    "xml": "<outcome value='Other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1313.3174514770508,
+    "y": 875.8410797119141,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "69dd5310.b0e50c"
+      ]
+    ]
+  },
+  {
+    "id": "69dd5310.b0e50c",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"request-information.request-action is required to be DeleteNetworkInstance for svc-action=delete\" />\n",
+    "comments": "",
+    "x": 1500.3174514770508,
+    "y": 876.8410797119141,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a0b8065a.68d4e8",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1743.3170852661133,
+    "y": 500.84095668792725,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "6c6e8419.13924c",
+        "d81b196b.de9bf8"
+      ]
+    ]
+  },
+  {
+    "id": "6c6e8419.13924c",
+    "type": "switchNode",
+    "name": "switch allotted-resource-id",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1994.3169059753418,
+    "y": 536.8409214019775,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "3455ba94.f30a46"
+      ]
+    ]
+  },
+  {
+    "id": "3455ba94.f30a46",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2005.3169212341309,
+    "y": 625.8409004211426,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "42c69ed2.4c6e3"
+      ]
+    ]
+  },
+  {
+    "id": "42c69ed2.4c6e3",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"network-request-input.network-input-parameters.name is a required input\" />\n",
+    "comments": "",
+    "x": 2161.745632171631,
+    "y": 624.8409004211426,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "d81b196b.de9bf8",
+    "type": "execute",
+    "name": "execute requiredParameter",
+    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id\" value=\"$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id\"/>\n\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1997.0313415527344,
+    "y": 464.98375606536865,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "57efdb7e.7de474",
+    "type": "switchNode",
+    "name": "switch service-instance-id",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.service-information.service-instance-id`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 697.0312728881836,
+    "y": 67.99399757385254,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "85a4ddfa.563bf"
+      ]
+    ]
+  },
+  {
+    "id": "85a4ddfa.563bf",
+    "type": "other",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 913.4598617553711,
+    "y": 68.99399757385254,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "e5b10c87.6dcab"
+      ]
+    ]
+  },
+  {
+    "id": "e5b10c87.6dcab",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"service-information.service-instance-id is a required input\" />\n",
+    "comments": "",
+    "x": 1071.8883895874023,
+    "y": 67.99399757385254,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "2f04939.a9b436c",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1047.253620147705,
+    "y": 191.9940309524536,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "99cb6d0f.faec9"
+      ]
+    ]
+  },
+  {
+    "id": "99cb6d0f.faec9",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1142.4890975952148,
+    "y": 255.4991979598999,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "12b9b32c.a4b30d",
+        "46ff1495.b090cc"
+      ]
+    ]
+  },
+  {
+    "id": "12b9b32c.a4b30d",
+    "type": "outcome",
+    "name": "CreateSOTNAttachmentInstance",
+    "xml": "<outcome value='CreateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1397.8223190307617,
+    "y": 138.49896335601807,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "a1752dfc.73195"
+      ]
+    ]
+  },
+  {
+    "id": "46ff1495.b090cc",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1330.8223152160645,
+    "y": 284.1656885147095,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "67468b53.41b5e4"
+      ]
+    ]
+  },
+  {
+    "id": "67468b53.41b5e4",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"sdnc-request-header.request-action is invalid\" />\n",
+    "comments": "",
+    "x": 1529.3781509399414,
+    "y": 283.61034536361694,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "a1752dfc.73195",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1653.6977615356445,
+    "y": 136.88288116455078,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "db455346.fe8d9"
+      ]
+    ]
+  },
+  {
+    "id": "db455346.fe8d9",
+    "type": "for",
+    "name": "for loop i - Sotn input param",
+    "xml": "<for index=\"i\" start=\"0\" end=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.param_length`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1735.3287467956543,
+    "y": 197.18352508544922,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "250dfbd6.f87e24"
+      ]
+    ]
+  },
+  {
+    "id": "250dfbd6.f87e24",
+    "type": "block",
+    "name": "block",
+    "xml": "<block>\n",
+    "atomic": "false",
+    "comments": "",
+    "outputs": 1,
+    "x": 1929.4120750427246,
+    "y": 161.93047618865967,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "6411a252.efa3dc",
+        "bd70a50a.f57aa8",
+        "bce7ba47.627aa8"
+      ]
+    ]
+  },
+  {
+    "id": "6411a252.efa3dc",
+    "type": "set",
+    "name": "clear tmp-data",
+    "xml": "<set>\n<parameter name='tmp.name' value='' />\n<parameter name='tmp.value' value='' />\n",
+    "comments": "",
+    "x": 2121.412136077881,
+    "y": 116.16857433319092,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "bd70a50a.f57aa8",
+    "type": "set",
+    "name": "set tmp-data",
+    "xml": "<set>\n<parameter name='tmp.name' value=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.param[$i].name`\"/>\n<parameter name='tmp.value' value=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.param[$i].value`\"/>\n",
+    "comments": "",
+    "x": 2110.4121322631836,
+    "y": 193.16857862472534,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "bce7ba47.627aa8",
+    "type": "switchNode",
+    "name": "switch name",
+    "xml": "<switch test=\"`$tmp.name`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2110.4122161865234,
+    "y": 275.16857862472534,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "9a3c6ac9.101328",
+        "b44b4e5e.93a68",
+        "c46018d4.cde2f8",
+        "bf279f01.56146",
+        "2718b920.5086d6",
+        "9dec1793.d77e58",
+        "6b903ba1.e89184",
+        "9610c6b4.d4b598"
+      ]
+    ]
+  },
+  {
+    "id": "9a3c6ac9.101328",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2312.4763164520264,
+    "y": 618.9942054748535,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "75de126c.4ad7cc"
+      ]
+    ]
+  },
+  {
+    "id": "75de126c.4ad7cc",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'network-topology-operation-input.network-request-input.network-input-parameters.param[' + $i + ']' + '.name is a required input'`\" />\n",
+    "comments": "",
+    "x": 2487.476665496826,
+    "y": 614.9942588806152,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "21ee0580.01132a",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$sotn-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1088.6980628967285,
+    "y": 851.994065284729,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "72eb1342.c73a6c",
+        "77510c5b.922da4"
+      ]
+    ]
+  },
+  {
+    "id": "b44b4e5e.93a68",
+    "type": "other",
+    "name": "sotnVpnName",
+    "xml": "<outcome value='sotnVpnName'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2327.4757356643677,
+    "y": 144.19395065307617,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "b99955f0.4e5fc8",
+    "type": "switchNode",
+    "name": "switch value",
+    "xml": "<switch test=\"`$tmp.value`\">\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 2558.3922157287598,
+    "y": 333.20887565612793,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "79ab6adb.1f2014"
+      ]
+    ]
+  },
+  {
+    "id": "79ab6adb.1f2014",
+    "type": "outcome",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2742.3921394348145,
+    "y": 329.208890914917,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "cf098d97.55fb"
+      ]
+    ]
+  },
+  {
+    "id": "cf098d97.55fb",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"`'$tmp.name +' is a required input'`\" />\n",
+    "comments": "",
+    "x": 2750.821060180664,
+    "y": 403.2088851928711,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "c46018d4.cde2f8",
+    "type": "other",
+    "name": "clientSignal",
+    "xml": "<outcome value='clientSignal'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2333.475742340088,
+    "y": 213.19396114349365,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "bf279f01.56146",
+    "type": "other",
+    "name": "access-provider-id",
+    "xml": "<outcome value='access-provider-id'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2335.3646812438965,
+    "y": 289.1939239501953,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "2718b920.5086d6",
+    "type": "other",
+    "name": "access-client-id",
+    "xml": "<outcome value='access-client-id'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2332.3646812438965,
+    "y": 361.19392371177673,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "9dec1793.d77e58",
+    "type": "other",
+    "name": "access-topology-id",
+    "xml": "<outcome value='access-topology-id'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2336.3646812438965,
+    "y": 423.1939239501953,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+
+      ]
+    ]
+  },
+  {
+    "id": "6b903ba1.e89184",
+    "type": "other",
+    "name": "access-node-id",
+    "xml": "<outcome value='access-node-id'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2338.3648529052734,
+    "y": 488.19395637512207,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "9610c6b4.d4b598",
+    "type": "other",
+    "name": "cVLAN",
+    "xml": "<outcome value='cVLAN'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 2316.3651542663574,
+    "y": 552.7496566772461,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "b99955f0.4e5fc8"
+      ]
+    ]
+  },
+  {
+    "id": "92374a0f.2f7d98",
+    "type": "outcome",
+    "name": "activate",
+    "xml": "<outcome value='activate'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 883.5312347412109,
+    "y": 364.53126430511475,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "40ca4bfa.dde754"
+      ]
+    ]
+  },
+  {
+    "id": "40ca4bfa.dde754",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1064.3369064331055,
+    "y": 365.24098110198975,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "38d46ef5.2515a2"
+      ]
+    ]
+  },
+  {
+    "id": "38d46ef5.2515a2",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1137.5723876953125,
+    "y": 445.74612522125244,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "bc03657f.d968f8",
+        "c7a46845.a20028"
+      ]
+    ]
+  },
+  {
+    "id": "bc03657f.d968f8",
+    "type": "outcome",
+    "name": "ActivateSOTNAttachmentInstance",
+    "xml": "<outcome value='ActivateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1393.9055290222168,
+    "y": 375.7458610534668,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "a0b8065a.68d4e8"
+      ]
+    ]
+  },
+  {
+    "id": "c7a46845.a20028",
+    "type": "outcome",
+    "name": "other",
+    "xml": "<outcome value='other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1310.905445098877,
+    "y": 484.41266107559204,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "62ba5aa1.e5bf54"
+      ]
+    ]
+  },
+  {
+    "id": "62ba5aa1.e5bf54",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"sdnc-request-header.request-action is invalid\" />\n",
+    "comments": "",
+    "x": 1509.461280822754,
+    "y": 483.8573179244995,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "eb87ceea.db236",
+    "type": "outcome",
+    "name": "deactivate",
+    "xml": "<outcome value='deactivate'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 881.5311889648438,
+    "y": 584.53125,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "10580d5c.7277e3"
+      ]
+    ]
+  },
+  {
+    "id": "10580d5c.7277e3",
+    "type": "block",
+    "name": "block : atomic",
+    "xml": "<block atomic=\"true\">",
+    "atomic": "true",
+    "outputs": 1,
+    "x": 1063.674015045166,
+    "y": 585.1977005004883,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "97009550.34e988"
+      ]
+    ]
+  },
+  {
+    "id": "a7478b0d.ac1368",
+    "type": "other",
+    "name": "DeactivateSOTNAttachmentInstance",
+    "xml": "<outcome value='DeactivateSOTNAttachmentInstance'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1377.3884048461914,
+    "y": 599.197681427002,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "a0b8065a.68d4e8"
+      ]
+    ]
+  },
+  {
+    "id": "f5f85a41.420a68",
+    "type": "other",
+    "name": "Other",
+    "xml": "<outcome value='Other'>",
+    "comments": "",
+    "outputs": 1,
+    "x": 1310.388656616211,
+    "y": 688.1978254318237,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "e751aaad.be4338"
+      ]
+    ]
+  },
+  {
+    "id": "e751aaad.be4338",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"request-information.request-action is required to be DeleteNetworkInstance for svc-action=delete\" />\n",
+    "comments": "",
+    "x": 1497.388656616211,
+    "y": 689.1978254318237,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  },
+  {
+    "id": "97009550.34e988",
+    "type": "switchNode",
+    "name": "switch request-action",
+    "xml": "<switch test='`$sotn-topology-operation-input.request-information.request-action`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 1085.7692680358887,
+    "y": 664.3508110046387,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "a7478b0d.ac1368",
+        "f5f85a41.420a68"
+      ]
+    ]
+  },
+  {
+    "id": "e66639cf.56aa48",
+    "type": "switchNode",
+    "name": "switch parent-service-instance-id",
+    "xml": "<switch test='`$connection-attachment-topology-operation-input.service-information.parent-service-instance-id`'>\n",
+    "comments": "",
+    "outputs": 1,
+    "x": 713.0103988647461,
+    "y": 114.01042175292969,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "2f054da9.55b662"
+      ]
+    ]
+  },
+  {
+    "id": "2f054da9.55b662",
+    "type": "other",
+    "name": "NULL",
+    "xml": "<outcome value=''>",
+    "comments": "",
+    "outputs": 1,
+    "x": 919.43896484375,
+    "y": 118.01041412353516,
+    "z": "548da231.570f2c",
+    "wires": [
+      [
+        "271d7aba.ca1876"
+      ]
+    ]
+  },
+  {
+    "id": "271d7aba.ca1876",
+    "type": "returnFailure",
+    "name": "return failure",
+    "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=\"service-information.parent-service-instance-id is a required input\" />\n",
+    "comments": "",
+    "x": 1077.8674926757812,
+    "y": 117.01041412353516,
+    "z": "548da231.570f2c",
+    "wires": [
+
+    ]
+  }
+]
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_connection-attachment-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_connection-attachment-topology-operation.xml
new file mode 100644 (file)
index 0000000..c5d1377
--- /dev/null
@@ -0,0 +1,82 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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
+   <method rpc='connection-attachment-topology-operation' mode='sync'>\r
+      <block atomic="true">\r
+         <call module='GENERIC-RESOURCE-API' rpc='validate-connection-attachment-input' mode='sync' ></call>\r
+         <switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\r
+            <outcome value='create'>\r
+               <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                  <outcome value='CreateSOTNAttachmentInstance'>\r
+                     <call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-create' mode='sync' ></call>\r
+                  </outcome>\r
+                  <outcome value='other'>\r
+                     <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`" />\r
+                     </return>\r
+                  </outcome>\r
+               </switch>\r
+            </outcome>\r
+            <outcome value='activate'>\r
+               <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                  <outcome value='ActivateSOTNAttachmentInstance'>\r
+                     <call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-activate' mode='sync' ></call>\r
+                  </outcome>\r
+                  <outcome value='other'>\r
+                     <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`" />\r
+                     </return>\r
+                  </outcome>\r
+               </switch>\r
+            </outcome>\r
+            <outcome value='delete'>\r
+               <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                  <outcome value='DeactivateSOTNAttachmentInstance'>\r
+                     <call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-deactivate' mode='sync' ></call>\r
+                  </outcome>\r
+                  <outcome value='other'>\r
+                     <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`" />\r
+                     </return>\r
+                  </outcome>\r
+               </switch>\r
+            </outcome>\r
+            <outcome value='deactivate'>\r
+               <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                  <outcome value='DeleteSOTNAttachmentInstance'>\r
+                     <call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-delete' mode='sync' ></call>\r
+                  </outcome>\r
+                  <outcome value='other'>\r
+                     <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Provided request-action=' + $connection-attachment-topology-operation-input.request-information.request-action + ' is not supported.'`" />\r
+                     </return>\r
+                  </outcome>\r
+               </switch>\r
+            </outcome>\r
+            <outcome value='Other'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="sdnc-request-header.svc-action is invalid" />\r
+               </return>\r
+            </outcome>\r
+         </switch>\r
+         <set>\r
+            <parameter name="ack-final" value="Y"/>\r
+         </set>\r
+         <return status='success'>\r
+            <parameter name="ack-final-indicator" value="Y" />\r
+            <parameter name="error-code" value="200" />\r
+            <parameter name="error-message" value="`$error-message`" />\r
+         </return>\r
+      </block>\r
+   </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-activate.xml
new file mode 100644 (file)
index 0000000..a8935d8
--- /dev/null
@@ -0,0 +1,521 @@
+<service-logic\r
+       xmlns='http://www.onap.org/sdnc/svclogic'\r
+       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
+       <method rpc='sotn-attachment-topology-operation-activate' mode='sync'>\r
+               <block atomic="true">\r
+                       <set>\r
+                               <parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\r
+                               <parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\r
+                       </set>\r
+                       <set>\r
+                               <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\r
+ + $tmp.ar.allotted-resource-id\r
+ + '/allotted-resource-data/connection-attachment-topology/'` " />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\r
+                               <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\r
+                               <parameter name='contextPrefix' value='prop' />\r
+                       </execute>\r
+                       <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+                               <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/>\r
+                               <parameter name="outputPath" value="tmp.ar-url"/>\r
+                               <parameter name="target" value="{allotted-resource-id}"/>\r
+                               <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>\r
+                       </execute>\r
+                       <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id/' pfx='mdsal-ar' >\r
+                               <outcome value='success'>\r
+                                       <block atomic="true">\r
+                                               <switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\r
+                                                       <outcome value='1'>\r
+                                                               <block atomic='true'>\r
+                                                                       <set>\r
+                                                                               <parameter name='connection-attachment-ar.' value='$mdsal-ar.connection-attachment-allotted-resource[0].' />\r
+                                                                       </set>\r
+                                                                       <switch test='`$connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\r
+                                                                               <outcome value='Created'>\r
+                                                                                       <block></block>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='Other'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message"\r
+                                                                                                       value="`'Existing connection-attachment-allotted-resource with order status of ' + $connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                       </switch>\r
+                                                                       <set>\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-ar.allotted-resource-status.rpc-action`' />\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\r
+                                                                       </set>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="404" />\r
+                                                                       <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <block atomic="true">\r
+                                               <return status='failure'>\r
+                                                       <parameter name='ack-final' value='Y'/>\r
+                                                       <parameter name="error-code" value="404" />\r
+                                                       <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                               </return>\r
+                                       </block>\r
+                               </outcome>\r
+                       </get-resource>\r
+                       <block atomic="true">\r
+                               <call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' ></call>\r
+                       </block>\r
+                       <set>\r
+                               <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />\r
+                       </set>\r
+                       <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\r
+                               <outcome value='success'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="404" />\r
+                                               <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </get-resource>\r
+                       <set>\r
+                               <parameter name='tmp.found-in-ar' value='false' />\r
+                               <parameter name='tmp.found-in-network' value='false' />\r
+                               <parameter name='tmp.ep-available' value='false' />\r
+                       </set>\r
+                       <switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\r
+                               <outcome value='2'>\r
+                                       <block atomic="true">\r
+                                               <for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\r
+                                                       <switch test="`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">\r
+                                                               <outcome value='true'>\r
+                                                                       <block></block>\r
+                                                               </outcome>\r
+                                                               <outcome value='false'>\r
+                                                                       <block atomic="true">\r
+                                                                               <set>\r
+                                                                                       <parameter name='tmp.pidx' value='`$pidx`' />\r
+                                                                                       <parameter name='tmp.provided-ar.' value='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$pidx].`' />\r
+                                                                                       <parameter name='tmp.found-in-ar' value='true' />\r
+                                                                                       <parameter name='tmp.ep-available' value='true' />\r
+                                                                               </set>\r
+                                                                               <break></break>\r
+                                                                       </block>\r
+                                                               </outcome>\r
+                                                       </switch>\r
+                                               </for>\r
+                                               <switch test='`$tmp.found-in-ar`'>\r
+                                                       <outcome value='true'>\r
+                                                               <block atomic="true">\r
+                                                                       <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.provided-ar.allotted-resource-id/' pfx='mdsal-other-ar' >\r
+                                                                               <outcome value='success'>\r
+                                                                                       <block></block>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='Other'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="404" />\r
+                                                                                               <parameter name="error-message" value="Error: SOTN provided attachment resource not found" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                       </get-resource>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='1'>\r
+                                       <block atomic="true">\r
+                                               <switch test='`$mdsal-psd.networks.network_length`'>\r
+                                                       <outcome value='1'>\r
+                                                               <block atomic="true">\r
+                                                                       <set>\r
+                                                                               <parameter name='tmp.network.' value='`$mdsal-psd.networks.network[0].`' />\r
+                                                                       </set>\r
+                                                                       <for index='nidx' start='0' end='`$tmp.network.network-data.network-request-input.network-input-parameters.param_length`' >\r
+                                                                               <block>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$nidx].name == 'access-node-id'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='tmp.found-in-network' value='true' />\r
+                                                                                                               <parameter name='tmp.ep-available' value='true' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'name'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.etht-svc-name' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                               <parameter name='prop.global.sotn.bandwidth-profile-name' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'description'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.etht-svc-descr' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'tenantId'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.tenantId' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'vpnType'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.vpnType' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'CIR'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.sotn.cir' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'EIR'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.eir' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'color-aware'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.colorAware' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].name == 'coupling-flag'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='prop.global.sotn.couplingFlag' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <return status='success'>\r
+                                                                                               <parameter name="ack-final-indicator" value="Y" />\r
+                                                                                               <parameter name="error-code" value="200" />\r
+                                                                                               <parameter name="error-message" value="`$error-message`" />\r
+                                                                                       </return>\r
+                                                                               </block>\r
+                                                                       </for>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="404" />\r
+                                                                       <parameter name="error-message" value="Error: Incorrect state found more then 1 network" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="404" />\r
+                                               <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </switch>\r
+                       <switch test='`$tmp.ep-available`'>\r
+                               <outcome value='false'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='true'>\r
+                                       <block atomic="true">\r
+                                               <switch test='`$tmp.found-in-ar`'>\r
+                                                       <outcome value='true'>\r
+                                                               <block atomic="true">\r
+                                                                       <set>\r
+                                                                               <parameter name='tmp.ep.parameters' value='`$mdsal-other-ar.allotted-resource-data.connection-attachment-topology.connection-attachment-parameters`' />\r
+                                                                       </set>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                                       <outcome value='false'>\r
+                                                               <block atomic="true">\r
+                                                                       <set>\r
+                                                                               <parameter name='tmp.ep.parameters' value='`$tmp.network.network-data.network-request-input.network-input-parameters`' />\r
+                                                                       </set>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                               <for index='idx' start='0' end='`$tmp.ep.parameters.param_length`' >\r
+                                                       <block>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'access-node-id'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.access-node-id' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'access-ltp-id'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'clientSignal'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.clientSignal' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'cVLAN'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.cVLAN' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'access-provider-id'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.access-provider-id' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'access-client-id'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.access-client-id' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <switch test="`$tmp.ep.parameters.param[$idx].name == 'access-topology-id'`">\r
+                                                                       <outcome value='true'>\r
+                                                                               <set>\r
+                                                                                       <parameter name='prop.remote.connection-attachment.access-topology-id' value='`$tmp.ep.parameters.param[$idx].value`' />\r
+                                                                               </set>\r
+                                                                       </outcome>\r
+                                                               </switch>\r
+                                                               <return status='success'>\r
+                                                                       <parameter name="ack-final-indicator" value="Y" />\r
+                                                                       <parameter name="error-code" value="200" />\r
+                                                                       <parameter name="error-message" value="`$error-message`" />\r
+                                                               </return>\r
+                                                       </block>\r
+                                               </for>\r
+                                               <block atomic="true">\r
+                                                       <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                                                               <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.oof-getpath.templatefile`" />\r
+                                                               <parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url'`" />\r
+                                                               <parameter name="restapiUser" value="`$prop.oof.user`" />\r
+                                                               <parameter name="restapiPassword" value="`$prop.oof.password`" />\r
+                                                               <parameter name="format" value="json"/>\r
+                                                               <parameter name="httpMethod" value="post"/>\r
+                                                               <parameter name="responsePrefix" value="oof"/>\r
+                                                               <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>\r
+                                                               <parameter name="trustStorePassword" value="adminadmin"/>\r
+                                                               <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>\r
+                                                               <parameter name="keyStorePassword" value="adminadmin"/>\r
+                                                               <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />\r
+                                                               <outcome value='failure'>\r
+                                                                       <return status='failure'>\r
+                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                               <parameter name="error-code" value="500" />\r
+                                                                               <parameter name="error-message" value="Error executing Create vpn rest api" />\r
+                                                                       </return>\r
+                                                               </outcome>\r
+                                                               <outcome value='success'>\r
+                                                                       <block atomic="true"></block>\r
+                                                               </outcome>\r
+                                                       </execute>\r
+                                                       <for index='vidx' start='0' end='`$oof.vpns_length`' >\r
+                                                               <block atomic="true">\r
+                                                                       <set>\r
+                                                                               <parameter name='oof.vpn.' value='`$oof.vpns[$vidx].`' />\r
+                                                                       </set>\r
+                                                                       <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                                                                               resource="pnf"\r
+                                                                               key="pnf.pnf-name = $oof.vpn.access-node-id AND\r
+                    depth = '0'"\r
+                                                                               pfx='tmp.aai.pnf' local-only='false' >\r
+                                                                               <outcome value='success'>\r
+                                                                                       <set>\r
+                                                                                               <parameter name='tmp.thirdparty-sdnc-id' value="`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`" />\r
+                                                                                       </set>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='not-found'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='Other'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                       </get-resource>\r
+                                                                       <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                                                                               resource="esr-thirdparty-sdnc"\r
+                                                                               key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND\r
+                    depth = '1'"\r
+                                                                               pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\r
+                                                                               <outcome value='success'>\r
+                                                                                       <set>\r
+                                                                                               <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />\r
+                                                                                               <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />\r
+                                                                                               <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />\r
+                                                                                       </set>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='not-found'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='Other'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                       </get-resource>\r
+                                                                       <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                                                                               <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />\r
+                                                                               <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + 'restconf/data/ietf-eth-tran-service:etht-svc'`" />\r
+                                                                               <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />\r
+                                                                               <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />\r
+                                                                               <parameter name="format" value="json"/>\r
+                                                                               <parameter name="httpMethod" value="patch"/>\r
+                                                                               <parameter name="responsePrefix" value="vpn-result"/>\r
+                                                                               <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>\r
+                                                                               <parameter name="trustStorePassword" value="adminadmin"/>\r
+                                                                               <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>\r
+                                                                               <parameter name="keyStorePassword" value="adminadmin"/>\r
+                                                                               <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />\r
+                                                                               <outcome value='failure'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message" value="Error executing Create vpn rest api" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='success'>\r
+                                                                                       <block atomic="true"></block>\r
+                                                                               </outcome>\r
+                                                                       </execute>\r
+                                                               </block>\r
+                                                       </for>\r
+                                               </block>\r
+                                       </block>\r
+                               </outcome>\r
+                       </switch>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.action' value="`$connection-attachment-topology-operation-input.request-information.request-action` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value="connection-attachment-topology-operation" />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value="`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$connection-attachment-topology-operation-input.request-information.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$connection-attachment-topology-operation-input.sdnc-request-header.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$connection-attachment-topology-operation-input.service-information.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.` " />\r
+                       </set>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` " />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\r
+                               <parameter name="outputPath" value="tmp.current-time" />\r
+                       </execute>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                               <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`" />\r
+                               <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\r
+                               <parameter name='restapiUser' value='`$prop.controller.user`' />\r
+                               <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\r
+                               <parameter name='format' value='json' />\r
+                               <parameter name='httpMethod' value='PUT' />\r
+                               <parameter name="responsePrefix" value="mdsal-ar" />\r
+                               <outcome value='success'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='failure'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                                       </return>\r
+                               </outcome>\r
+                               <outcome value='not-found'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </execute>\r
+                       <set>\r
+                               <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\r
+                               <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/>\r
+                               <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'\r
+ + $connection-attachment-topology-operation-input.service-information.service-instance-id\r
+ + '/service-data/service-topology/'`"/>\r
+                       </set>\r
+                       <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                               resource="allotted-resource"\r
+                               key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\r
+                       service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\r
+                       service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\r
+                       allotted-resource.id = $tmp.ar.allotted-resource-id"\r
+                               pfx='pfx' local-only='false' force='false'>\r
+                               <parameter name="description" value="`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`" />\r
+                               <parameter name="selflink" value="`$tmp.ar.self-link`" />\r
+                               <parameter name="model-invariant-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`" />\r
+                               <parameter name="model-version-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`" />\r
+                               <parameter name="operational-status" value="Active" />\r
+                               <outcome value='failure'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="AAI failed" />\r
+                                       </return>\r
+                               </outcome>\r
+                               <outcome value='not-found'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="AAI failed" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </update>\r
+                       <return status='success'>\r
+                               <parameter name="ack-final-indicator" value="Y" />\r
+                               <parameter name="error-code" value="200" />\r
+                               <parameter name="error-message" value="`$error-message`" />\r
+                       </return>\r
+               </block>\r
+       </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.xml
new file mode 100644 (file)
index 0000000..50ab249
--- /dev/null
@@ -0,0 +1,250 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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
+   <method rpc='sotn-attachment-topology-operation-create' mode='sync'>\r
+      <block atomic="true">\r
+         <switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\r
+            <outcome value=''>\r
+               <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\r
+                  <parameter name="ctx-destination" value="tmp.ar.allotted-resource-id"/>\r
+                  <outcome value='failure'>\r
+                     <return status='failure'>\r
+                        <parameter name='error-code' value='' />\r
+                        <parameter name='error-message' value="An error occured while generation allotted resource ID" />\r
+                     </return>\r
+                  </outcome>\r
+               </execute>\r
+            </outcome>\r
+            <outcome value='Other'>\r
+               <set>\r
+                  <parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\r
+               </set>\r
+            </outcome>\r
+         </switch>\r
+         <switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\r
+            <outcome value=''>\r
+               <set>\r
+                  <parameter name='tmp.ar.allotted-resource-type' value="SOTNAttachmentInstance" />\r
+               </set>\r
+            </outcome>\r
+            <outcome value='Other'>\r
+               <set>\r
+                  <parameter name='tmp.ar.allotted-resource-type' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\r
+               </set>\r
+            </outcome>\r
+         </switch>\r
+         <set>\r
+            <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\r
+ + $tmp.ar.allotted-resource-id\r
+ + '/allotted-resource-data/connection-attachment-topology/'` " />\r
+         </set>\r
+         <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\r
+            <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\r
+            <parameter name='contextPrefix' value='prop' />\r
+         </execute>\r
+         <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+            <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/>\r
+            <parameter name="outputPath" value="tmp.ar-url"/>\r
+            <parameter name="target" value="{allotted-resource-id}"/>\r
+            <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>\r
+         </execute>\r
+         <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.ar.allotted-resource-id/' pfx='mdsal-ar' >\r
+            <outcome value='success'>\r
+               <block atomic="true">\r
+                  <switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\r
+                     <outcome value='1'>\r
+                        <return status='failure'>\r
+                           <parameter name='ack-final' value='Y'/>\r
+                           <parameter name="error-code" value="500" />\r
+                           <parameter name="error-message" value="Error: Existing connection attachment allotted resource" />\r
+                        </return>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+         </get-resource>\r
+         <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\r
+            <outcome value=''>\r
+               <set>\r
+                  <parameter name='tmp.cidx' value="`0`" />\r
+                  <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value="1" />\r
+               </set>\r
+            </outcome>\r
+            <outcome value='Other'>\r
+               <block atomic="true">\r
+                  <set>\r
+                     <parameter name='tmp.found-cidx' value="`false`" />\r
+                  </set>\r
+                  <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\r
+                     <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">\r
+                        <outcome value='true'>\r
+                           <return status='failure'>\r
+                              <parameter name='ack-final' value='Y'/>\r
+                              <parameter name="error-code" value="500" />\r
+                              <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource as cosumed allotted resource already exists." />\r
+                           </return>\r
+                        </outcome>\r
+                     </switch>\r
+                  </for>\r
+                  <switch test='`$tmp.found-cidx`'>\r
+                     <outcome value='false'>\r
+                        <block atomic="true">\r
+                           <set>\r
+                              <parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\r
+                           </set>\r
+                        </block>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+         </switch>\r
+         <set>\r
+            <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />\r
+            <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value="`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` " />\r
+            <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value="`$tmp.ar.self-link` " />\r
+            <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\r
+         </set>\r
+         <set>\r
+            <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />\r
+         </set>\r
+         <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+            <parameter name="source" value="`$prop.restapi.parent-provided-resource`"/>\r
+            <parameter name="outputPath" value="tmp.parent-ar-url"/>\r
+            <parameter name="target" value="{service-instance-id}"/>\r
+            <parameter name="replacement" value="`$tmp.ar.parent-service-instance-id`"/>\r
+         </execute>\r
+         <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+            <parameter name="source" value="`$tmp.parent-ar-url`"/>\r
+            <parameter name="outputPath" value="tmp.parent-ar-url"/>\r
+            <parameter name="target" value="{allotted-resource-id}"/>\r
+            <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>\r
+         </execute>\r
+         <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+            <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />\r
+            <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\r
+            <parameter name='restapiUser' value='`$prop.controller.user`' />\r
+            <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\r
+            <parameter name='format' value='json' />\r
+            <parameter name='httpMethod' value='PUT' />\r
+            <parameter name="responsePrefix" value="parent" />\r
+            <outcome value='success'>\r
+               <block></block>\r
+            </outcome>\r
+            <outcome value='failure'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+               </return>\r
+            </outcome>\r
+            <outcome value='not-found'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+               </return>\r
+            </outcome>\r
+         </execute>\r
+         <set>\r
+            <parameter name='connection-attachment-ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-status.action' value="`$connection-attachment-topology-operation-input.request-information.request-action` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value="connection-attachment-topology-operation" />\r
+            <parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value="`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$connection-attachment-topology-operation-input.request-information.` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$connection-attachment-topology-operation-input.sdnc-request-header.` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$connection-attachment-topology-operation-input.service-information.` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.` " />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.' value="`$connection-attachment-topology-operation-input.connection-attachment-request-input.` " />\r
+         </set>\r
+         <set>\r
+            <parameter name='connection-attachment-ar-identifiers.consuming-service-instance-id' value="`$connection-attachment-topology-operation-input.service-information.service-instance-id` " />\r
+            <parameter name='connection-attachment-ar-identifiers.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />\r
+            <parameter name='connection-attachment-ar-identifiers.allotted-resource-type' value="`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` " />\r
+            <parameter name='connection-attachment-ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />\r
+         </set>\r
+         <set>\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.'\r
+                value="`$connection-attachment-ar-identifiers.`" />\r
+         </set>\r
+         <set>\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` " />\r
+         </set>\r
+         <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\r
+            <parameter name="outputPath" value="tmp.current-time" />\r
+         </execute>\r
+         <set>\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\r
+            <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\r
+         </set>\r
+         <call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' ></call>\r
+         <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+            <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`" />\r
+            <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\r
+            <parameter name='restapiUser' value='`$prop.controller.user`' />\r
+            <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\r
+            <parameter name='format' value='json' />\r
+            <parameter name='httpMethod' value='PUT' />\r
+            <parameter name="responsePrefix" value="mdsal-ar" />\r
+            <outcome value='success'>\r
+               <block></block>\r
+            </outcome>\r
+            <outcome value='failure'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+               </return>\r
+            </outcome>\r
+            <outcome value='not-found'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+               </return>\r
+            </outcome>\r
+         </execute>\r
+         <set>\r
+            <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\r
+            <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/>\r
+            <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'\r
+ + $connection-attachment-topology-operation-input.service-information.service-instance-id\r
+ + '/service-data/service-topology/'`"/>\r
+         </set>\r
+         <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+             resource="allotted-resource"\r
+             key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\r
+                       service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\r
+                       service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\r
+                       allotted-resource.id = $tmp.ar.allotted-resource-id"\r
+             pfx='pfx' local-only='false' force='false'>\r
+            <parameter name="description" value="`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`" />\r
+            <parameter name="selflink" value="`$tmp.ar.self-link`" />\r
+            <parameter name="model-invariant-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`" />\r
+            <parameter name="model-version-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`" />\r
+            <parameter name="operational-status" value="Created" />\r
+            <outcome value='failure'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="AAI failed" />\r
+               </return>\r
+            </outcome>\r
+            <outcome value='not-found'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="AAI failed" />\r
+               </return>\r
+            </outcome>\r
+         </update>\r
+         <return status='success'>\r
+            <parameter name="ack-final-indicator" value="Y" />\r
+            <parameter name="error-code" value="200" />\r
+            <parameter name="error-message" value="`$error-message`" />\r
+         </return>\r
+      </block>\r
+   </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-deactivate.xml
new file mode 100644 (file)
index 0000000..5df1085
--- /dev/null
@@ -0,0 +1,338 @@
+<service-logic\r
+       xmlns='http://www.onap.org/sdnc/svclogic'\r
+       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
+       <method rpc='sotn-attachment-topology-operation-deactivate' mode='sync'>\r
+               <block atomic="true">\r
+                       <set>\r
+                               <parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\r
+                               <parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\r
+                       </set>\r
+                       <set>\r
+                               <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\r
+ + $tmp.ar.allotted-resource-id\r
+ + '/allotted-resource-data/connection-attachment-topology/'` " />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\r
+                               <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\r
+                               <parameter name='contextPrefix' value='prop' />\r
+                       </execute>\r
+                       <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+                               <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/>\r
+                               <parameter name="outputPath" value="tmp.ar-url"/>\r
+                               <parameter name="target" value="{allotted-resource-id}"/>\r
+                               <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>\r
+                       </execute>\r
+                       <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id/' pfx='mdsal-ar' >\r
+                               <outcome value='success'>\r
+                                       <block atomic="true">\r
+                                               <switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\r
+                                                       <outcome value='1'>\r
+                                                               <block atomic='true'>\r
+                                                                       <set>\r
+                                                                               <parameter name='connection-attachment-ar.' value='$mdsal-ar.connection-attachment-allotted-resource[0].' />\r
+                                                                       </set>\r
+                                                                       <switch test='`$connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\r
+                                                                               <outcome value='Active'>\r
+                                                                                       <block></block>\r
+                                                                               </outcome>\r
+                                                                               <outcome value='Other'>\r
+                                                                                       <return status='failure'>\r
+                                                                                               <parameter name='ack-final' value='Y'/>\r
+                                                                                               <parameter name="error-code" value="500" />\r
+                                                                                               <parameter name="error-message"\r
+                                                                                                       value="`'Existing connection-attachment-allotted-resource with order status of ' + $connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />\r
+                                                                                       </return>\r
+                                                                               </outcome>\r
+                                                                       </switch>\r
+                                                                       <set>\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-ar.allotted-resource-status.rpc-action`' />\r
+                                                                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\r
+                                                                       </set>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="404" />\r
+                                                                       <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <block atomic="true">\r
+                                               <return status='failure'>\r
+                                                       <parameter name='ack-final' value='Y'/>\r
+                                                       <parameter name="error-code" value="404" />\r
+                                                       <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                               </return>\r
+                                       </block>\r
+                               </outcome>\r
+                       </get-resource>\r
+                       <block atomic="true">\r
+                               <call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' ></call>\r
+                       </block>\r
+                       <set>\r
+                               <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />\r
+                       </set>\r
+                       <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\r
+                               <outcome value='success'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="404" />\r
+                                               <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </get-resource>\r
+                       <set>\r
+                               <parameter name='tmp.found-in-ar' value='false' />\r
+                               <parameter name='tmp.found-in-network' value='false' />\r
+                               <parameter name='tmp.ep-available' value='false' />\r
+                       </set>\r
+                       <switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\r
+                               <outcome value='2'>\r
+                                       <block atomic="true">\r
+                                               <for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\r
+                                                       <switch test="`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">\r
+                                                               <outcome value='true'>\r
+                                                                       <block></block>\r
+                                                               </outcome>\r
+                                                               <outcome value='false'>\r
+                                                                       <block atomic="true">\r
+                                                                               <set>\r
+                                                                                       <parameter name='tmp.pidx' value='`$pidx`' />\r
+                                                                                       <parameter name='tmp.provided-ar.' value='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$pidx].`' />\r
+                                                                                       <parameter name='tmp.found-in-ar' value='true' />\r
+                                                                                       <parameter name='tmp.ep-available' value='true' />\r
+                                                                               </set>\r
+                                                                               <break></break>\r
+                                                                       </block>\r
+                                                               </outcome>\r
+                                                       </switch>\r
+                                               </for>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='1'>\r
+                                       <block atomic="true">\r
+                                               <switch test='`$mdsal-psd.networks.network_length`'>\r
+                                                       <outcome value='1'>\r
+                                                               <block atomic="true">\r
+                                                                       <set>\r
+                                                                               <parameter name='tmp.network.' value='`$mdsal-psd.networks.network[0].`' />\r
+                                                                       </set>\r
+                                                                       <for index='nidx' start='0' end='`$tmp.network.network-data.network-request-input.network-input-parameters.param_length`' >\r
+                                                                               <block>\r
+                                                                                       <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$nidx].name == 'access-node-id'`">\r
+                                                                                               <outcome value='true'>\r
+                                                                                                       <set>\r
+                                                                                                               <parameter name='tmp.found-in-network' value='true' />\r
+                                                                                                               <parameter name='tmp.ep-available' value='true' />\r
+                                                                                                       </set>\r
+                                                                                               </outcome>\r
+                                                                                       </switch>\r
+                                                                                       <return status='success'>\r
+                                                                                               <parameter name="ack-final-indicator" value="Y" />\r
+                                                                                               <parameter name="error-code" value="200" />\r
+                                                                                               <parameter name="error-message" value="`$error-message`" />\r
+                                                                                       </return>\r
+                                                                               </block>\r
+                                                                       </for>\r
+                                                               </block>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="404" />\r
+                                                                       <parameter name="error-message" value="Error: Incorrect state found more then 1 network" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </switch>\r
+                                       </block>\r
+                               </outcome>\r
+                               <outcome value='Other'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="404" />\r
+                                               <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </switch>\r
+                       <switch test='`$tmp.ep-available`'>\r
+                               <outcome value='false'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='true'>\r
+                                       <block atomic="true">\r
+                                               <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                                                       resource="pnf"\r
+                                                       key="pnf.pnf-name = $prop.connection-attachement.access-node-id AND\r
+                    depth = '0'"\r
+                                                       pfx='tmp.aai.pnf' local-only='false' >\r
+                                                       <outcome value='success'>\r
+                                                               <set>\r
+                                                                       <parameter name='tmp.thirdparty-sdnc-id' value="`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`" />\r
+                                                               </set>\r
+                                                       </outcome>\r
+                                                       <outcome value='not-found'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="500" />\r
+                                                                       <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="500" />\r
+                                                                       <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </get-resource>\r
+                                               <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                                                       resource="esr-thirdparty-sdnc"\r
+                                                       key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND\r
+                    depth = '1'"\r
+                                                       pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\r
+                                                       <outcome value='success'>\r
+                                                               <set>\r
+                                                                       <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />\r
+                                                                       <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />\r
+                                                                       <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />\r
+                                                               </set>\r
+                                                       </outcome>\r
+                                                       <outcome value='not-found'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="500" />\r
+                                                                       <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                                       <outcome value='Other'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="500" />\r
+                                                                       <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                               </get-resource>\r
+                                               <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                                                       <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + 'restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances=' + $prop.connection-attachment.sotnVpnName`" />\r
+                                                       <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />\r
+                                                       <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />\r
+                                                       <parameter name="format" value="json"/>\r
+                                                       <parameter name="httpMethod" value="delete"/>\r
+                                                       <parameter name="responsePrefix" value="vpn-result"/>\r
+                                                       <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>\r
+                                                       <parameter name="trustStorePassword" value="adminadmin"/>\r
+                                                       <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>\r
+                                                       <parameter name="keyStorePassword" value="adminadmin"/>\r
+                                                       <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />\r
+                                                       <outcome value='failure'>\r
+                                                               <return status='failure'>\r
+                                                                       <parameter name='ack-final' value='Y'/>\r
+                                                                       <parameter name="error-code" value="500" />\r
+                                                                       <parameter name="error-message" value="Error executing Create vpn rest api" />\r
+                                                               </return>\r
+                                                       </outcome>\r
+                                                       <outcome value='success'>\r
+                                                               <block atomic="true"></block>\r
+                                                       </outcome>\r
+                                               </execute>\r
+                                       </block>\r
+                               </outcome>\r
+                       </switch>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.action' value="`$connection-attachment-topology-operation-input.request-information.request-action` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value="connection-attachment-topology-operation" />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value="`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$connection-attachment-topology-operation-input.request-information.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$connection-attachment-topology-operation-input.sdnc-request-header.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$connection-attachment-topology-operation-input.service-information.` " />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.` " />\r
+                       </set>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` " />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\r
+                               <parameter name="outputPath" value="tmp.current-time" />\r
+                       </execute>\r
+                       <set>\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\r
+                               <parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\r
+                       </set>\r
+                       <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                               <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`" />\r
+                               <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\r
+                               <parameter name='restapiUser' value='`$prop.controller.user`' />\r
+                               <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\r
+                               <parameter name='format' value='json' />\r
+                               <parameter name='httpMethod' value='PUT' />\r
+                               <parameter name="responsePrefix" value="mdsal-ar" />\r
+                               <outcome value='success'>\r
+                                       <block></block>\r
+                               </outcome>\r
+                               <outcome value='failure'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                                       </return>\r
+                               </outcome>\r
+                               <outcome value='not-found'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </execute>\r
+                       <set>\r
+                               <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\r
+                               <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/>\r
+                               <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'\r
+ + $connection-attachment-topology-operation-input.service-information.service-instance-id\r
+ + '/service-data/service-topology/'`"/>\r
+                       </set>\r
+                       <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+                               resource="allotted-resource"\r
+                               key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\r
+                       service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\r
+                       service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\r
+                       allotted-resource.id = $tmp.ar.allotted-resource-id"\r
+                               pfx='pfx' local-only='false' force='false'>\r
+                               <parameter name="description" value="`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`" />\r
+                               <parameter name="selflink" value="`$tmp.ar.self-link`" />\r
+                               <parameter name="model-invariant-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`" />\r
+                               <parameter name="model-version-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`" />\r
+                               <parameter name="operational-status" value="PendingDelete" />\r
+                               <outcome value='failure'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="AAI failed" />\r
+                                       </return>\r
+                               </outcome>\r
+                               <outcome value='not-found'>\r
+                                       <return status='failure'>\r
+                                               <parameter name='ack-final' value='Y'/>\r
+                                               <parameter name="error-code" value="500" />\r
+                                               <parameter name="error-message" value="AAI failed" />\r
+                                       </return>\r
+                               </outcome>\r
+                       </update>\r
+                       <return status='success'>\r
+                               <parameter name="ack-final-indicator" value="Y" />\r
+                               <parameter name="error-code" value="200" />\r
+                               <parameter name="error-message" value="`$error-message`" />\r
+                       </return>\r
+               </block>\r
+       </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml
new file mode 100644 (file)
index 0000000..1dd02a9
--- /dev/null
@@ -0,0 +1,175 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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
+    <method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\r
+        <block atomic="true">\r
+            <set>\r
+                <parameter name='tmp.ar.allotted-resource-id' value='`connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\r
+                <parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\r
+            </set>\r
+            <set>\r
+                <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\r
+ + $tmp.ar.allotted-resource-id\r
+ + '/allotted-resource-data/connection-attachment-topology/'` " />\r
+            </set>\r
+            <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\r
+                <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\r
+                <parameter name='contextPrefix' value='prop' />\r
+            </execute>\r
+            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\r
+                <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/>\r
+                <parameter name="outputPath" value="tmp.ar-url"/>\r
+                <parameter name="target" value="{allotted-resource-id}"/>\r
+                <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>\r
+            </execute>\r
+            <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r
+                <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\r
+                <parameter name='restapiUser' value='`$prop.controller.user`' />\r
+                <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\r
+                <parameter name='format' value='json' />\r
+                <parameter name='httpMethod' value='Delete' />\r
+                <parameter name="responsePrefix" value="mdsal-ar" />\r
+                <outcome value='success'>\r
+                    <block></block>\r
+                </outcome>\r
+                <outcome value='failure'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='not-found'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />\r
+                    </return>\r
+                </outcome>\r
+            </execute>\r
+            <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <block atomic="true">\r
+                        <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\r
+                            <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">\r
+                                <outcome value='true'>\r
+                                    <block atomic="true">\r
+                                        <set>\r
+                                            <parameter name='tmp.cidx' value='`$cidx`' />\r
+                                        </set>\r
+                                        <break></break>\r
+                                    </block>\r
+                                </outcome>\r
+                            </switch>\r
+                        </for>\r
+                        <switch test="`$tmp.cidx`">\r
+                            <outcome value=''>\r
+                                <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="resource to be deleted is not available in mdsal" />\r
+                                </return>\r
+                            </outcome>\r
+                        </switch>\r
+                    </block>\r
+                </outcome>\r
+            </switch>\r
+            <set>\r
+                <parameter name="service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx]." value="" />\r
+                <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`' />\r
+            </set>\r
+            <set>\r
+                <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />\r
+            </set>\r
+            <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\r
+                <outcome value='success'>\r
+                    <block></block>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="404" />\r
+                        <parameter name="error-message" value="Error: SOTN resource not found" />\r
+                    </return>\r
+                </outcome>\r
+            </get-resource>\r
+            <switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <block atomic="true">\r
+                        <for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\r
+                            <switch test="`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">\r
+                                <outcome value='true'>\r
+                                    <block atomic="true">\r
+                                        <set>\r
+                                            <parameter name='tmp.pidx' value='`$pidx`' />\r
+                                        </set>\r
+                                        <break></break>\r
+                                    </block>\r
+                                </outcome>\r
+                            </switch>\r
+                        </for>\r
+                        <switch test="`$tmp.pidx`">\r
+                            <outcome value=''>\r
+                                <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="resource to be deleted is not available in mdsal" />\r
+                                </return>\r
+                            </outcome>\r
+                        </switch>\r
+                    </block>\r
+                </outcome>\r
+            </switch>\r
+            <set>\r
+                <parameter name="service-data.provided-allotted-resources.consumed-allotted-resource[$pidx]." value="" />\r
+                <parameter name='service-data.provided-allotted-resources.consumed-allotted-resource_length' value='`$service-data.provided-allotted-resources.consumed-allotted-resource_length - 1`' />\r
+            </set>\r
+            <set>\r
+                <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\r
+                <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/>\r
+                <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'\r
+ + $connection-attachment-topology-operation-input.service-information.service-instance-id\r
+ + '/service-data/service-topology/'`"/>\r
+            </set>\r
+            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='allotted-resource'\r
+                key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\r
+                       service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\r
+                       service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\r
+                       allotted-resource.id = $tmp.ar.allotted-resource-id">\r
+                <outcome value='failure'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="AAI failed" />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='not-found'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="AAI failed" />\r
+                    </return>\r
+                </outcome>\r
+            </delete>\r
+            <return status='success'>\r
+                <parameter name="ack-final-indicator" value="Y" />\r
+                <parameter name="error-code" value="200" />\r
+                <parameter name="error-message" value="`$error-message`" />\r
+            </return>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-get-saved-ar-param.xml
new file mode 100644 (file)
index 0000000..0aa82b7
--- /dev/null
@@ -0,0 +1,73 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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
+   <method rpc='sotn-get-saved-ar-param' mode='sync'>\r
+      <block atomic="true">\r
+         <for index='idx' start='0' end='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param_length`' >\r
+            <block>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'sotnVpnName'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.sotnVpnName' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-provider-id'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.access-provider-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-client-id'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.access-client-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-topology-id'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.access-topology-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-node-id'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.access-node-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'access-ltp-id'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.access-ltp-id' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'clientSignal'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.clientSignal' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <switch test="`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].name == 'cVLAN'`">\r
+                  <outcome value='true'>\r
+                     <set>\r
+                        <parameter name='prop.connection-attachment.cVLAN' value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$idx].value`' />\r
+                     </set>\r
+                  </outcome>\r
+               </switch>\r
+               <return status='success'>\r
+                  <parameter name="ack-final-indicator" value="Y" />\r
+                  <parameter name="error-code" value="200" />\r
+                  <parameter name="error-message" value="`$error-message`" />\r
+               </return>\r
+            </block>\r
+         </for>\r
+      </block>\r
+   </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-connection-attachment-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-connection-attachment-input.xml
new file mode 100644 (file)
index 0000000..98762e9
--- /dev/null
@@ -0,0 +1,236 @@
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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
+   <method rpc='validate-connection-attachment-input' mode='sync'>\r
+      <block atomic="true">\r
+         <switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\r
+            <outcome value=''>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />\r
+               </return>\r
+            </outcome>\r
+         </switch>\r
+         <switch test='`$connection-attachment-topology-operation-input.service-information.service-instance-id`'>\r
+            <outcome value=''>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="service-information.service-instance-id is a required input" />\r
+               </return>\r
+            </outcome>\r
+         </switch>\r
+         <switch test='`$connection-attachment-topology-operation-input.service-information.parent-service-instance-id`'>\r
+            <outcome value=''>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="service-information.parent-service-instance-id is a required input" />\r
+               </return>\r
+            </outcome>\r
+         </switch>\r
+         <switch test='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`'>\r
+            <outcome value='create'>\r
+               <block atomic="true">\r
+                  <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                     <outcome value='CreateSOTNAttachmentInstance'>\r
+                        <block atomic="true">\r
+                           <for index="i" start="0" end="`$connection-attachment-topology-operation-input.connection-attachment-request-input.param_length`">\r
+                              <block>\r
+                                 <set>\r
+                                    <parameter name='tmp.name' value='' />\r
+                                    <parameter name='tmp.value' value='' />\r
+                                 </set>\r
+                                 <set>\r
+                                    <parameter name='tmp.name' value="`$connection-attachment-topology-operation-input.connection-attachment-request-input.param[$i].name`"/>\r
+                                    <parameter name='tmp.value' value="`$connection-attachment-topology-operation-input.connection-attachment-request-input.param[$i].value`"/>\r
+                                 </set>\r
+                                 <switch test="`$tmp.name`">\r
+                                    <outcome value='sotnVpnName'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value='clientSignal'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value='access-provider-id'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value='access-client-id'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value='access-topology-id'></outcome>\r
+                                    <outcome value='access-node-id'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value='cVLAN'>\r
+                                       <switch test="`$tmp.value`">\r
+                                          <outcome value=''>\r
+                                             <return status='failure'>\r
+                                                <parameter name='ack-final' value='Y'/>\r
+                                                <parameter name="error-code" value="500" />\r
+                                                <parameter name="error-message" value="`'$tmp.name +' is a required input'`" />\r
+                                             </return>\r
+                                          </outcome>\r
+                                       </switch>\r
+                                    </outcome>\r
+                                    <outcome value=''>\r
+                                       <return status='failure'>\r
+                                          <parameter name='ack-final' value='Y'/>\r
+                                          <parameter name="error-code" value="500" />\r
+                                          <parameter name="error-message" value="`'network-topology-operation-input.network-request-input.network-input-parameters.param[' + $i + ']' + '.name is a required input'`" />\r
+                                       </return>\r
+                                    </outcome>\r
+                                 </switch>\r
+                              </block>\r
+                           </for>\r
+                        </block>\r
+                     </outcome>\r
+                     <outcome value='other'>\r
+                        <return status='failure'>\r
+                           <parameter name='ack-final' value='Y'/>\r
+                           <parameter name="error-code" value="500" />\r
+                           <parameter name="error-message" value="sdnc-request-header.request-action is invalid" />\r
+                        </return>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+            <outcome value='activate'>\r
+               <block atomic="true">\r
+                  <switch test='`$connection-attachment-topology-operation-input.request-information.request-action`'>\r
+                     <outcome value='ActivateSOTNAttachmentInstance'>\r
+                        <block atomic="true">\r
+                           <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\r
+                              <parameter name="connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id" value="$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id"/>\r
+                           </execute>\r
+                           <switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\r
+                              <outcome value=''>\r
+                                 <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />\r
+                                 </return>\r
+                              </outcome>\r
+                           </switch>\r
+                        </block>\r
+                     </outcome>\r
+                     <outcome value='other'>\r
+                        <return status='failure'>\r
+                           <parameter name='ack-final' value='Y'/>\r
+                           <parameter name="error-code" value="500" />\r
+                           <parameter name="error-message" value="sdnc-request-header.request-action is invalid" />\r
+                        </return>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+            <outcome value='deactivate'>\r
+               <block atomic="true">\r
+                  <switch test='`$sotn-topology-operation-input.request-information.request-action`'>\r
+                     <outcome value='DeactivateSOTNAttachmentInstance'>\r
+                        <block atomic="true">\r
+                           <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\r
+                              <parameter name="connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id" value="$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id"/>\r
+                           </execute>\r
+                           <switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\r
+                              <outcome value=''>\r
+                                 <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />\r
+                                 </return>\r
+                              </outcome>\r
+                           </switch>\r
+                        </block>\r
+                     </outcome>\r
+                     <outcome value='Other'>\r
+                        <return status='failure'>\r
+                           <parameter name='ack-final' value='Y'/>\r
+                           <parameter name="error-code" value="500" />\r
+                           <parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=delete" />\r
+                        </return>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+            <outcome value='delete'>\r
+               <block atomic="true">\r
+                  <switch test='`$sotn-topology-operation-input.request-information.request-action`'>\r
+                     <outcome value='DeleteSOTNAttachmentInstance'>\r
+                        <block atomic="true">\r
+                           <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\r
+                              <parameter name="connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id" value="$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id"/>\r
+                           </execute>\r
+                           <switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\r
+                              <outcome value=''>\r
+                                 <return status='failure'>\r
+                                    <parameter name='ack-final' value='Y'/>\r
+                                    <parameter name="error-code" value="500" />\r
+                                    <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />\r
+                                 </return>\r
+                              </outcome>\r
+                           </switch>\r
+                        </block>\r
+                     </outcome>\r
+                     <outcome value='Other'>\r
+                        <return status='failure'>\r
+                           <parameter name='ack-final' value='Y'/>\r
+                           <parameter name="error-code" value="500" />\r
+                           <parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=delete" />\r
+                        </return>\r
+                     </outcome>\r
+                  </switch>\r
+               </block>\r
+            </outcome>\r
+            <outcome value='Other'>\r
+               <return status='failure'>\r
+                  <parameter name='ack-final' value='Y'/>\r
+                  <parameter name="error-code" value="500" />\r
+                  <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />\r
+               </return>\r
+            </outcome>\r
+         </switch>\r
+      </block>\r
+   </method>\r
+</service-logic>
\ No newline at end of file
diff --git a/platform-logic/restapi-templates/src/main/json/oof-getpath.json b/platform-logic/restapi-templates/src/main/json/oof-getpath.json
new file mode 100644 (file)
index 0000000..f407f64
--- /dev/null
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - CCSDK
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+{
+    "srcPort": {
+        "src-access-topology-id": ${prop.connection-attachment.access-topology-id},
+        "src-access-client-id": ${prop.connection-attachment.access-client-id},
+        "src-access-provider-id": ${prop.connection-attachment.access-provider-id},
+        "src-access-node-id": ${prop.connection-attachment.access-node-id},
+        "src-access-ltp-id": ${prop.connection-attachment.access-ltp-id}
+    },
+    "dstPort": {
+        "dst-access-topology-id": ${prop.remote.connection-attachment.access-topology-id},
+        "dst-access-client-id": ${prop.remote.connection-attachment.access-client-id},
+        "dst-access-provider-id": ${prop.remote.connection-attachment.access-provider-id},
+        "dst-access-node-id": ${prop.remote.connection-attachment.access-node-id},
+        "dst-access-ltp-id": ${prop.remote.connection-attachment.access-ltp-id}
+    }
+}
diff --git a/platform-logic/restapi-templates/src/main/json/sotn-attachment-allotted-resource.json b/platform-logic/restapi-templates/src/main/json/sotn-attachment-allotted-resource.json
new file mode 100644 (file)
index 0000000..59ff8a4
--- /dev/null
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - CCSDK
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+{
+    "connection-attachment-allotted-resource": [{
+        "allotted-resource-id": ${connection-attachment-ar.allotted-resource-id},
+        "allotted-resource-data": {
+            "connection-attachment-topology": {
+                "allotted-resource-identifiers": {
+                    "consuming-service-instance-id": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.consuming-service-instance-id},
+                    "allotted-resource-name": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.allotted-resource-name},
+                    "allotted-resource-id": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.allotted-resource-id},
+                    "parent-service-instance-id": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.parent-service-instance-id},
+                    "allotted-resource-type": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.allotted-resource-type}
+                },
+                "onap-model-information": {
+                    "model-invariant-uuid": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.model-invariant-uuid},
+                    "model-customization-uuid": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.model-customization-uuid},
+                    "model-uuid": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.model-uuid},
+                    "model-version": ${connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.model-version}
+                },
+                "connection-attachment-parameters": {
+                    "param": [
+                        {
+                            "name": "sotnVpnName",
+                            "value": ${prop.connection-attachment.sotnVpnName}
+                        },
+                        {
+                            "name": "access-provider-id",
+                            "value": ${prop.connection-attachment.access-provider-id}
+                        },
+                        {
+                            "name": "access-client-id",
+                            "value": ${prop.connection-attachment.access-client-id}
+                        },
+                        {
+                            "name": "access-topology-id",
+                            "value": ${prop.connection-attachment.access-topology-id}
+                        },
+                        {
+                            "name": "access-node-id",
+                            "value": ${prop.connection-attachment.access-node-id}
+                        },
+                        {
+                            "name": "access-ltp-id",
+                            "value": ${prop.connection-attachment.access-ltp-id}
+                        },
+                        {
+                            "name": "clientSignal",
+                            "value": ${prop.connection-attachment.clientSignal}
+                        },
+                        {
+                            "name": "cVLAN",
+                            "value": ${prop.connection-attachment.cVLAN}
+                        }
+                    ]
+                }
+            },
+            "allotted-resource-operation-information": {
+                "allotted-resource-information": {
+                    "allotted-resource-id": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-id},
+                    "allotted-resource-type": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-type},
+                    "parent-service-instance-id": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.parent-service-instance-id},
+                    "onap-model-information": {
+                        "model-invariant-uuid": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-invariant-uuid},
+                        "model-customization-uuid": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-customization-uuid},
+                        "model-uuid": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-uuid},
+                        "model-version": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-version}
+                    }
+                },
+                "sdnc-request-header": {
+                    "svc-request-id": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id},
+                    "svc-action": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-action}
+                },
+                "request-information": {
+                    "request-id": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-id},
+                    "source": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.source},
+                    "order-version": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-version},
+                    "order-number": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-number},
+                    "notification-url": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.notification-url},
+                    "request-action": ${connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action}
+                },
+                "connection-attachment-request-input": {
+                    "param": [
+                        {
+                            "name": "sotnVpnName",
+                            "value": ${prop.connection-attachment.sotnVpnName}
+                        },
+                        {
+                            "name": "access-provider-id",
+                            "value": ${prop.connection-attachment.access-provider-id}
+                        },
+                        {
+                            "name": "access-client-id",
+                            "value": ${prop.connection-attachment.access-client-id}
+                        },
+                        {
+                            "name": "access-topology-id",
+                            "value": ${prop.connection-attachment.access-topology-id}
+                        },
+                        {
+                            "name": "access-node-id",
+                            "value": ${prop.connection-attachment.access-node-id}
+                        },
+                        {
+                            "name": "access-ltp-id",
+                            "value": ${prop.connection-attachment.access-ltp-id}
+                        },
+                        {
+                            "name": "clientSignal",
+                            "value": ${prop.connection-attachment.clientSignal}
+                        },
+                        {
+                            "name": "cVLAN",
+                            "value": ${prop.connection-attachment.cVLAN}
+                        }
+                    ]
+                },
+                "allotted-resource-oper-status": {
+                    "last-action": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action},
+                    "modify-timestamp": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.modify-timestamp},
+                    "last-order-status": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-order-status},
+                    "create-timestamp": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp},
+                    "order-status": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status},
+                    "last-rpc-action": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action},
+                    "last-svc-request-id": ${connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id}
+                }
+            },
+            "allotted-resource-status" : {
+                "action": ${connection-attachment-ar.allotted-resource-status.action},
+                "rpc-name": ${connection-attachment-ar.allotted-resource-status.rpc-name},
+                "rpc-action": ${connection-attachment-ar.allotted-resource-status.rpc-action}
+            }
+        }
+    }]
+}
diff --git a/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json b/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json
new file mode 100644 (file)
index 0000000..b5a371a
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - CCSDK
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+{
+    "ietf-eth-tran-service:etht-svc": {
+        "globals": {
+            "etht-svc-bandwidth-profiles": [
+                {
+                    "bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name},
+                    "bandwidth-profile-type": "mef-10-bwp",
+                    "CIR": ${prop.global.sotn.cir},
+                    "EIR": ${prop.global.sotn.eir},
+                    "color-aware": ${prop.global.sotn.colorAware},
+                    "coupling-flag": ${prop.global.sotn.couplingFlag}
+                }
+            ]
+        },
+        "etht-svc-instances": [
+            {
+                "etht-svc-name": ${prop.global.sotn.etht-svc-name},
+                "access-provider-id": ${oof.vpn.access-provider-id},
+                "access-client-id": ${oof.vpn.access-client-id},
+                "access-topology-id": ${oof.vpn.access-topology-id},
+                "etht-svc-type": "p2p-svc",
+                "admin-status": "tunnel-state-up",
+                "etht-svc-access-ports": [
+                    {
+                        "access-port-id": 0,
+                        "access-node-id": ${oof.vpn.access-node-id},
+                        "access-ltp-id": ${oof.vpn.src-access-ltp-id},
+                        "service-classification-type": "vlan-classification",
+                        "outer-tag": {
+                            "tag-type": "classify-c-vlan",
+                            "vlan-value": ${prop.connection-attachment.cVLAN}
+                        },
+                        "ingress-egress-bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name}
+                    },
+                    {
+                        "access-port-id": 1,
+                        "access-node-id": ${oof.vpn.access-node-id},
+                        "access-ltp-id": ${oof.vpn.dst-access-ltp-id},
+                        "service-classification-type": "vlan-classification",
+                        "outer-tag": {
+                            "tag-type": "classify-c-vlan",
+                            "vlan-value": ${prop.connection-attachment.cVLAN}
+                        },
+                        "ingress-egress-bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name}
+                    }
+                ]
+            }
+        ]
+    }
+}
\ No newline at end of file