aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/generic-resource-api/src/main')
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-device-param.json551
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.json678
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.json652
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.json627
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.json555
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json372
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-device-param.xml87
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.xml160
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.xml162
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.xml141
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.xml103
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml24
12 files changed, 4050 insertions, 62 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-device-param.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-device-param.json
new file mode 100644
index 00000000..9d0c3722
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-device-param.json
@@ -0,0 +1,551 @@
+[
+ {
+ "id": "e671d21c.c380e",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 277.03125,
+ "y": 215.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "f0968433.54c598"
+ ]
+ ]
+ },
+ {
+ "id": "f0968433.54c598",
+ "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": 489.03125381469727,
+ "y": 287.0312671661377,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "7b5a64d7.27af4c"
+ ]
+ ]
+ },
+ {
+ "id": "7b5a64d7.27af4c",
+ "type": "method",
+ "name": "sdwan-get-device-param",
+ "xml": "<method rpc='sdwan-get-device-param' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 477.0313720703125,
+ "y": 375.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "9e54cfd4.f7511"
+ ]
+ ]
+ },
+ {
+ "id": "9e54cfd4.f7511",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 484.03126525878906,
+ "y": 461.0313081741333,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "ea233a0.a925fc8"
+ ]
+ ]
+ },
+ {
+ "id": "ea233a0.a925fc8",
+ "type": "for",
+ "name": "for each sdwan-get-request-input-param",
+ "xml": "<for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 520.6980285644531,
+ "y": 543.697904586792,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "12792477.556d8c"
+ ]
+ ]
+ },
+ {
+ "id": "12792477.556d8c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 794.5315780639648,
+ "y": 458.0313220024109,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "767840a2.12ebe",
+ "4f1ecfa3.e420a",
+ "677e6bce.a725e4",
+ "c52d2d4b.f41f6",
+ "670874dc.6417bc",
+ "4166beff.b664d",
+ "a2380a78.a15bf8",
+ "af7f20a9.e338",
+ "3250af42.4d49",
+ "2508e2f5.08983e",
+ "a475c38.ffd7a4"
+ ]
+ ]
+ },
+ {
+ "id": "767840a2.12ebe",
+ "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": 1002.0321960449219,
+ "y": 750.0318946838379,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "677e6bce.a725e4",
+ "type": "switchNode",
+ "name": "switch name",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1030.0312843322754,
+ "y": 303.03130531311035,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "61f5048e.ac410c"
+ ]
+ ]
+ },
+ {
+ "id": "61f5048e.ac410c",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1172.0312843322754,
+ "y": 304.03130531311035,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "e11fc0f2.f0b7"
+ ]
+ ]
+ },
+ {
+ "id": "e11fc0f2.f0b7",
+ "type": "set",
+ "name": "set name",
+ "xml": "<set>\n<parameter name='prop.device.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1306.0312843322754,
+ "y": 304.631311416626,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "4f1ecfa3.e420a",
+ "type": "switchNode",
+ "name": "switch esn",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'esn'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1022.8710298538208,
+ "y": 340.0312442779541,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "d4274273.0421a"
+ ]
+ ]
+ },
+ {
+ "id": "d4274273.0421a",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1166.8710298538208,
+ "y": 340.0312442779541,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "ecaa4a78.97cd58"
+ ]
+ ]
+ },
+ {
+ "id": "ecaa4a78.97cd58",
+ "type": "set",
+ "name": "set esn",
+ "xml": "<set>\n<parameter name='prop.device.esn' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1287.2044038772583,
+ "y": 339.4924259185791,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "c52d2d4b.f41f6",
+ "type": "switchNode",
+ "name": "switch type",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1010.9264497756958,
+ "y": 414.99419593811035,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "66c8ac7e.f99d04"
+ ]
+ ]
+ },
+ {
+ "id": "670874dc.6417bc",
+ "type": "switchNode",
+ "name": "switch systemIp",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'systemIp'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1010.9265079498291,
+ "y": 506.99421310424805,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "ce9aa789.cf24d8"
+ ]
+ ]
+ },
+ {
+ "id": "66c8ac7e.f99d04",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1156.9264497756958,
+ "y": 414.99419593811035,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "fb4cb630.0c2d68"
+ ]
+ ]
+ },
+ {
+ "id": "fb4cb630.0c2d68",
+ "type": "set",
+ "name": "set type",
+ "xml": "<set>\n<parameter name='prop.device.deviceModel' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1287.9264497756958,
+ "y": 414.594202041626,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "ce9aa789.cf24d8",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1156.926507949829,
+ "y": 503.99421310424805,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "e5052022.3061f"
+ ]
+ ]
+ },
+ {
+ "id": "e5052022.3061f",
+ "type": "set",
+ "name": "set systemIp",
+ "xml": "<set>\n<parameter name='prop.device.systemIP' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1299.926507949829,
+ "y": 502.5942192077637,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "a7ed8e98.b2bb8",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1166.926507949829,
+ "y": 539.994213104248,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "a40c04f3.889538"
+ ]
+ ]
+ },
+ {
+ "id": "4166beff.b664d",
+ "type": "switchNode",
+ "name": "switch description",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1012.9265079498291,
+ "y": 542.994213104248,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "a7ed8e98.b2bb8"
+ ]
+ ]
+ },
+ {
+ "id": "a40c04f3.889538",
+ "type": "set",
+ "name": "set description",
+ "xml": "<set>\n<parameter name='prop.device.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1309.926507949829,
+ "y": 538.5942192077637,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "a2380a78.a15bf8",
+ "type": "switchNode",
+ "name": "switch vendor",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'vendor'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1000.2597932815552,
+ "y": 589.9942474365234,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "6443e0a9.71388"
+ ]
+ ]
+ },
+ {
+ "id": "6443e0a9.71388",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1168.2597513198853,
+ "y": 586.9941883087158,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "a3c7adc8.39913"
+ ]
+ ]
+ },
+ {
+ "id": "a3c7adc8.39913",
+ "type": "set",
+ "name": "set vendor",
+ "xml": "<set>\n<parameter name='prop.device.vendor' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1311.2597513198853,
+ "y": 585.5941944122314,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "af7f20a9.e338",
+ "type": "switchNode",
+ "name": "switch class",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'class'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1024.03125,
+ "y": 377.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "9089a4f7.9d1f38"
+ ]
+ ]
+ },
+ {
+ "id": "9089a4f7.9d1f38",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1168.03125,
+ "y": 377.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "5a35e54e.7450dc"
+ ]
+ ]
+ },
+ {
+ "id": "5a35e54e.7450dc",
+ "type": "set",
+ "name": "set class",
+ "xml": "<set>\n<parameter name='prop.device.class' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1288.3646240234375,
+ "y": 376.492431640625,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "3250af42.4d49",
+ "type": "switchNode",
+ "name": "switch version",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'version'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1022.03125,
+ "y": 461.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "9b60c77d.bb4828"
+ ]
+ ]
+ },
+ {
+ "id": "9b60c77d.bb4828",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1168.03125,
+ "y": 458.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "2e69598b.782ac6"
+ ]
+ ]
+ },
+ {
+ "id": "2e69598b.782ac6",
+ "type": "set",
+ "name": "set version",
+ "xml": "<set>\n<parameter name='prop.device.version' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1311.03125,
+ "y": 456.6312561035156,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "2508e2f5.08983e",
+ "type": "switchNode",
+ "name": "switch deviceId",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'deviceId'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1014.0313186645508,
+ "y": 637.0312986373901,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "fa6b8cf5.4b327"
+ ]
+ ]
+ },
+ {
+ "id": "fa6b8cf5.4b327",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1170.031406402588,
+ "y": 633.031343460083,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "8e7714d.acaece8"
+ ]
+ ]
+ },
+ {
+ "id": "8e7714d.acaece8",
+ "type": "set",
+ "name": "set deviceId",
+ "xml": "<set>\n<parameter name='prop.device.deviceId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1308.3651542663574,
+ "y": 621.4924793243408,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ },
+ {
+ "id": "a475c38.ffd7a4",
+ "type": "switchNode",
+ "name": "switch sdncCreate",
+ "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'sdncCreate'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1003.03125,
+ "y": 683.03125,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "a771c2de.63a74"
+ ]
+ ]
+ },
+ {
+ "id": "a771c2de.63a74",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1159.031337738037,
+ "y": 679.0312948226929,
+ "z": "1814fac9.dedad5",
+ "wires": [
+ [
+ "665de992.e62df8"
+ ]
+ ]
+ },
+ {
+ "id": "665de992.e62df8",
+ "type": "set",
+ "name": "set sdncCreate",
+ "xml": "<set>\n<parameter name='prop.device.sdncCreate' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1297.3650856018066,
+ "y": 667.4924306869507,
+ "z": "1814fac9.dedad5",
+ "wires": []
+ }
+] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.json
new file mode 100644
index 00000000..84599e1f
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.json
@@ -0,0 +1,678 @@
+[
+ {
+ "id": "c57da515.f74988",
+ "type": "comment",
+ "name": "sdwan-vnf-topology-operation-device-activate",
+ "info": "",
+ "comments": "",
+ "x": 571.344856262207,
+ "y": 61,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "e16a751b.7b48a8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "1.2.1-SNAPSHOT",
+ "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='1.2.1-SNAPSHOT'>",
+ "outputs": 1,
+ "x": 251.2857666015625,
+ "y": 132.0002670288086,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "e3b9d3fc.f582d"
+ ]
+ ]
+ },
+ {
+ "id": "22a66427.5103ec",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 172.00006103515625,
+ "y": 69.76215744018555,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "e16a751b.7b48a8"
+ ]
+ ]
+ },
+ {
+ "id": "5e9c748a.d0c93c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 246.66673278808594,
+ "y": 411.42884254455566,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "164a289d.b889e7",
+ "c60faf33.f797b",
+ "138d258a.ddadba",
+ "2a9fc936.08f4c6",
+ "b4b11b51.f47008",
+ "88ab4e5f.36358",
+ "15d0a117.420b6f",
+ "34088ab3.22cba6",
+ "96fd10aa.3117f",
+ "3c7b9f2b.d2464",
+ "4d7e6631.03a558",
+ "58df9113.78ab9",
+ "971b776.085e288",
+ "64ab23e7.432f0c"
+ ]
+ ]
+ },
+ {
+ "id": "c60faf33.f797b",
+ "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": 646.3334732055664,
+ "y": 1056.0956745147705,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "164a289d.b889e7",
+ "type": "set",
+ "name": "set vnf-level-oper-status to Active",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
+ "comments": "",
+ "x": 727.813533782959,
+ "y": 863.4328231811523,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "b4b11b51.f47008",
+ "type": "set",
+ "name": "copy input data to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />\n",
+ "comments": "",
+ "x": 705.6667251586914,
+ "y": 919.4289989471436,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "49141d65.bdcea4",
+ "type": "comment",
+ "name": "make sure this VNF doesn't exist already",
+ "info": "",
+ "comments": "",
+ "x": 1443.8572311401367,
+ "y": 634.9527101516724,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "3c7b9f2b.d2464",
+ "type": "save",
+ "name": "save deviceInstance configuration in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id' >\n<parameter name='id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='device-id' value='$deviceResp[0].id' />\n<parameter name='operational-status' value='Active' />",
+ "comments": "",
+ "outputs": 1,
+ "x": 730.0002212524414,
+ "y": 969.3179988861084,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e3b9d3fc.f582d",
+ "type": "method",
+ "name": "method sdwan-vnf-topology-operation-device-activate",
+ "xml": "<method rpc='sdwan-vnf-topology-operation-device-activate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 263.00006103515625,
+ "y": 226.3484992980957,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "5e9c748a.d0c93c"
+ ]
+ ]
+ },
+ {
+ "id": "138d258a.ddadba",
+ "type": "set",
+ "name": "set vnfId and vnf-object-path",
+ "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` \" />",
+ "comments": "",
+ "x": 709.0001754760742,
+ "y": 812.348635673523,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "64ab23e7.432f0c",
+ "type": "execute",
+ "name": "execute RestApiCallNode Create Devcie Instance",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-device.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v3/devices'`\" />\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=\"put\"/>\n<parameter name=\"responsePrefix\" value=\"deviceResp\"/>\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`\" />\n\n\n<!--execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-wan-port.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`\" />\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=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"wanPortResp\"/>\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": 784.4446868896484,
+ "y": 639.1265163421631,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "fe651cbe.71dae",
+ "4a034411.478adc"
+ ]
+ ]
+ },
+ {
+ "id": "971b776.085e288",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get token",
+ "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\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 738.4446105957031,
+ "y": 509.1263904571533,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "f5a9152f.d977a8",
+ "12711b8c.b16b14"
+ ]
+ ]
+ },
+ {
+ "id": "f5a9152f.d977a8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 970.4446105957031,
+ "y": 489.1263904571533,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "3cccbb3c.73ecb4"
+ ]
+ ]
+ },
+ {
+ "id": "12711b8c.b16b14",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 962.6946105957031,
+ "y": 530.7692737579346,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "3e406e18.5253e2"
+ ]
+ ]
+ },
+ {
+ "id": "3cccbb3c.73ecb4",
+ "type": "set",
+ "name": "set token-id",
+ "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
+ "comments": "",
+ "x": 1107.4446105957031,
+ "y": 489.1263904571533,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "3e406e18.5253e2",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1088.7781066894531,
+ "y": 531.0153064727783,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "647f2905.b3b168",
+ "type": "comment",
+ "name": "Do Nothing",
+ "info": "",
+ "comments": "",
+ "x": 1350.333652496338,
+ "y": 331.9041233062744,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "a8bad102.6b5e9",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1211.1111526489258,
+ "y": 609.0153045654297,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e9b5eb58.3f04d8",
+ "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 Activate Device rest api\" />\n",
+ "comments": "",
+ "x": 1212.5557327270508,
+ "y": 659.570837020874,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "4a034411.478adc",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1059.555576324463,
+ "y": 662.5707912445068,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "e9b5eb58.3f04d8"
+ ]
+ ]
+ },
+ {
+ "id": "fe651cbe.71dae",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1059.0000915527344,
+ "y": 606.2375030517578,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "a8bad102.6b5e9"
+ ]
+ ]
+ },
+ {
+ "id": "88ab4e5f.36358",
+ "type": "set",
+ "name": "set deviceId to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value=\"deviceId\" />\n<!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$deviceResp[0].id`' /-->\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n",
+ "comments": "",
+ "x": 715.0003280639648,
+ "y": 764.3488826751709,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "7e5552be.6be08c",
+ "type": "comment",
+ "name": "URL needs to confirm.",
+ "info": "",
+ "comments": "",
+ "x": 763.0001525878906,
+ "y": 581.3486194610596,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "62f12a96.37bf64",
+ "type": "comment",
+ "name": "AAI resource need to update",
+ "info": "",
+ "comments": "",
+ "x": 1041.0001754760742,
+ "y": 923.348635673523,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "58df9113.78ab9",
+ "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 = SDWAN-Controller AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 733.0002746582031,
+ "y": 413.34861183166504,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "a6d8f866.73e908",
+ "7fc0e78d.a01498",
+ "1501ba2b.428996"
+ ]
+ ]
+ },
+ {
+ "id": "a6d8f866.73e908",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 974.0003318786621,
+ "y": 338.3485860824585,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "133ac586.e3a64a"
+ ]
+ ]
+ },
+ {
+ "id": "133ac586.e3a64a",
+ "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": 1223.5003852844238,
+ "y": 294.348575592041,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "7fc0e78d.a01498",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 965.4911689758301,
+ "y": 386.92263412475586,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "6099fe20.b764e"
+ ]
+ ]
+ },
+ {
+ "id": "6099fe20.b764e",
+ "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": 1139.0625801086426,
+ "y": 375.20837020874023,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "1501ba2b.428996",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 957.8241767883301,
+ "y": 428.2559471130371,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "49a6b499.06dbac"
+ ]
+ ]
+ },
+ {
+ "id": "49a6b499.06dbac",
+ "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": 1145.5967330932617,
+ "y": 423.69513988494873,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "b2aff25d.5a4e",
+ "type": "comment",
+ "name": "review and test req",
+ "info": "",
+ "comments": "",
+ "x": 741.0002212524414,
+ "y": 729.3487091064453,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "61725e4c.10868",
+ "type": "comment",
+ "name": "tmp.thirdparty-sdnc-id to be hardcoded here?",
+ "info": "",
+ "comments": "",
+ "x": 731.0042877197266,
+ "y": 369.3525629043579,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "4d7e6631.03a558",
+ "type": "save",
+ "name": "save service relationship in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $vnf-topology-operation-input.vnf-information.vnf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 704.0003967285156,
+ "y": 1016.0955476760864,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2a9fc936.08f4c6",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Provided alloted resource length\"/>\n<parameter name=\"field3\" value=\"'parameters length'\"/>\n<parameter name=\"field4\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`'/>\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 678.0000762939453,
+ "y": 291.0151786804199,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "15d0a117.420b6f",
+ "type": "for",
+ "name": "for vidx..service-data.vnfs.vnf_length[]",
+ "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 766.031364440918,
+ "y": 177.0312786102295,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "1b896cda.b979e3"
+ ]
+ ]
+ },
+ {
+ "id": "1b896cda.b979e3",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1014.3809585571289,
+ "y": 177.57134628295898,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "a706d238.291a"
+ ]
+ ]
+ },
+ {
+ "id": "a706d238.291a",
+ "type": "switchNode",
+ "name": "switch vnfid found",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1168.4605560302734,
+ "y": 177.28142833709717,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "5082e995.a70f58"
+ ]
+ ]
+ },
+ {
+ "id": "ea1b1425.d6abb8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1462.0580673217773,
+ "y": 178.5817413330078,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "65194b17.7753d4",
+ "65c6f7a.c67d608",
+ "47f60422.f643ac"
+ ]
+ ]
+ },
+ {
+ "id": "5082e995.a70f58",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1323.4125480651855,
+ "y": 178.1741075515747,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "ea1b1425.d6abb8"
+ ]
+ ]
+ },
+ {
+ "id": "65c6f7a.c67d608",
+ "type": "set",
+ "name": "set vnf-request-input.",
+ "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
+ "comments": "",
+ "x": 1703.3909225463867,
+ "y": 134.58180141448975,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "65194b17.7753d4",
+ "type": "set",
+ "name": "set tmp.vidx and ctx.vnf-data",
+ "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
+ "comments": "",
+ "x": 1730.9446334838867,
+ "y": 87.92416572570801,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "47f60422.f643ac",
+ "type": "call",
+ "name": "call sdwan-get-device-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1708.0313720703125,
+ "y": 197.03127193450928,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "34088ab3.22cba6",
+ "type": "switchNode",
+ "name": "switch tmp.vidx ",
+ "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 697.03125,
+ "y": 238.03125,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "f352fc21.fd854"
+ ]
+ ]
+ },
+ {
+ "id": "f352fc21.fd854",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 844.4598922729492,
+ "y": 237.60266017913818,
+ "z": "48050f50.e2132",
+ "wires": [
+ [
+ "d74e2e0c.835e1"
+ ]
+ ]
+ },
+ {
+ "id": "d74e2e0c.835e1",
+ "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 993.8886184692383,
+ "y": 238.74557781219482,
+ "z": "48050f50.e2132",
+ "wires": []
+ },
+ {
+ "id": "96fd10aa.3117f",
+ "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": 692.03125,
+ "y": 334.03125,
+ "z": "48050f50.e2132",
+ "wires": [
+ []
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.json
new file mode 100644
index 00000000..034f2d5d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.json
@@ -0,0 +1,652 @@
+[
+ {
+ "id": "5e3d5340.60ff6c",
+ "type": "comment",
+ "name": "sdwan-vnf-topology-operation-device-activate",
+ "info": "",
+ "comments": "",
+ "x": 508.3447952270508,
+ "y": 51,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "98a7b4d5.abb6c8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "1.2.1-SNAPSHOT",
+ "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='1.2.1-SNAPSHOT'>",
+ "outputs": 1,
+ "x": 188.28570556640625,
+ "y": 122.0002670288086,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "6e6cf252.6d76ac"
+ ]
+ ]
+ },
+ {
+ "id": "b122f38a.d6d66",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 109,
+ "y": 59.76215744018555,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "98a7b4d5.abb6c8"
+ ]
+ ]
+ },
+ {
+ "id": "acf9046.9fdadf8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 189.66666412353516,
+ "y": 383.4288272857666,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "fadd626.2db7aa",
+ "3d1725f.b682bda",
+ "973ba2fa.09281",
+ "a8ec1f34.2d716",
+ "1a8342ca.6c718d",
+ "2f458da.dde6872",
+ "5b27914d.aaeea",
+ "14b0db80.805625",
+ "60a129a0.bbdd58",
+ "b0ca4039.10bf1",
+ "48942c51.646f94",
+ "f06f6e0f.f753c"
+ ]
+ ]
+ },
+ {
+ "id": "3d1725f.b682bda",
+ "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": 570.3336067199707,
+ "y": 1005.0958871841431,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "fadd626.2db7aa",
+ "type": "set",
+ "name": "set vnf-level-oper-status to Created",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
+ "comments": "",
+ "x": 659.8136177062988,
+ "y": 737.4329919815063,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "a8ec1f34.2d716",
+ "type": "set",
+ "name": "copy input data to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />",
+ "comments": "",
+ "x": 637.6668090820312,
+ "y": 793.4291677474976,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "3cb5e097.323b3",
+ "type": "save",
+ "name": "save deviceInstance configuration in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $prop.vnf-id' >\n<parameter name='id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.name`' />\n<parameter name='name' value=\"true\" />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` \" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1116.0007019042969,
+ "y": 810.3184747695923,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6e6cf252.6d76ac",
+ "type": "method",
+ "name": "method sdwan-vnf-topology-operation-device-create",
+ "xml": "<method rpc='sdwan-vnf-topology-operation-device-create' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 200,
+ "y": 216.3484992980957,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "acf9046.9fdadf8"
+ ]
+ ]
+ },
+ {
+ "id": "973ba2fa.09281",
+ "type": "set",
+ "name": "set vnfId and vnf-object-path",
+ "xml": "<set>\n<parameter name='vnfId' value='`$prop.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` \" />",
+ "comments": "",
+ "x": 641.0002593994141,
+ "y": 686.348804473877,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "1a8342ca.6c718d",
+ "type": "set",
+ "name": "set deviceId to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n",
+ "comments": "",
+ "x": 647.0004119873047,
+ "y": 638.3490514755249,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "11b9f4bc.54a6db",
+ "type": "comment",
+ "name": "AAI resource need to update",
+ "info": "",
+ "comments": "",
+ "x": 962.0003051757812,
+ "y": 764.3489141464233,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "57ec6080.aef67",
+ "type": "execute",
+ "name": "execute generate-vnf-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-id\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1146.0006866455078,
+ "y": 151.3486099243164,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f5373c70.1c094",
+ "type": "save",
+ "name": "save service relationship in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $prop.vnf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-id`\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 628.000560760498,
+ "y": 960.0957889556885,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2f458da.dde6872",
+ "type": "switchNode",
+ "name": "switch vnf-id",
+ "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 610.0001068115234,
+ "y": 255.0000286102295,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "96bd2791.9be248",
+ "67087b1d.5c3fb4"
+ ]
+ ]
+ },
+ {
+ "id": "96bd2791.9be248",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 751.0001106262207,
+ "y": 230.00002002716064,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "17f3f6fd.04e999"
+ ]
+ ]
+ },
+ {
+ "id": "17f3f6fd.04e999",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 899.0002136230469,
+ "y": 166.0000123977661,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "57ec6080.aef67",
+ "3fbf12e1.7d984e",
+ "1f9131ce.7814de"
+ ]
+ ]
+ },
+ {
+ "id": "67087b1d.5c3fb4",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 747.5312881469727,
+ "y": 290.03125762939453,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "36044171.bb341e"
+ ]
+ ]
+ },
+ {
+ "id": "71433e4d.c21fc",
+ "type": "set",
+ "name": "set prop.vnf-id",
+ "xml": "<set>\n<parameter name='prop.vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n",
+ "comments": "",
+ "x": 1062.531982421875,
+ "y": 359.03163146972656,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "36044171.bb341e",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 898.5317077636719,
+ "y": 322.03137969970703,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "71433e4d.c21fc",
+ "1f9131ce.7814de",
+ "ded55567.2a8678"
+ ]
+ ]
+ },
+ {
+ "id": "5b27914d.aaeea",
+ "type": "set",
+ "name": "set prop.sdncCreate=false",
+ "xml": "<set>\n<parameter name='prop.sdncCreate' value='false' />\n",
+ "comments": "",
+ "x": 684.5313568115234,
+ "y": 146.03125190734863,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "14b0db80.805625",
+ "type": "switchNode",
+ "name": "switch prop.sdncCreate",
+ "xml": "<switch test='`$prop.sdncCreate`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 607.0316925048828,
+ "y": 840.0316715240479,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "f49b5933.b5d218",
+ "b6ead02e.a5302"
+ ]
+ ]
+ },
+ {
+ "id": "f49b5933.b5d218",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 853.0314636230469,
+ "y": 810.5314083099365,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "3cb5e097.323b3"
+ ]
+ ]
+ },
+ {
+ "id": "b6ead02e.a5302",
+ "type": "outcomeTrue",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 854.5314483642578,
+ "y": 865.5314226150513,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "689dbbbf.19b784"
+ ]
+ ]
+ },
+ {
+ "id": "3fbf12e1.7d984e",
+ "type": "set",
+ "name": "set prop.updateAAIsdncCreate",
+ "xml": "<set>\n<parameter name='prop.sdncCreate' value='true' />\n",
+ "comments": "",
+ "x": 1163.5317764282227,
+ "y": 111.03133583068848,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "60a129a0.bbdd58",
+ "type": "for",
+ "name": "for loop idx - VNF input parameters",
+ "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 672.5314331054688,
+ "y": 440.031286239624,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "ea444b8d.2a7e58"
+ ]
+ ]
+ },
+ {
+ "id": "ea444b8d.2a7e58",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 887.3097763061523,
+ "y": 437.58687019348145,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "5cf3f0ff.4ce19",
+ "c56fa091.a24ed"
+ ]
+ ]
+ },
+ {
+ "id": "c56fa091.a24ed",
+ "type": "set",
+ "name": "set parameterName",
+ "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n",
+ "comments": "",
+ "x": 1053.0104064941406,
+ "y": 452.3351249694824,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "5cf3f0ff.4ce19",
+ "type": "execute",
+ "name": "execute split parameterName",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1083.5659790039062,
+ "y": 415.3350086212158,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b0ca4039.10bf1",
+ "type": "set",
+ "name": "set vnf-request-input.",
+ "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
+ "comments": "",
+ "x": 634.5310516357422,
+ "y": 514.3560009002686,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "48942c51.646f94",
+ "type": "call",
+ "name": "call sdwan-get-device-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 659.5314331054688,
+ "y": 546.3561611175537,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "76da7c24.a3ef74",
+ "type": "comment",
+ "name": "if SO provide vnf-id use that else create new",
+ "info": "",
+ "comments": "",
+ "x": 701.5312805175781,
+ "y": 200.0312614440918,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "1f9131ce.7814de",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1107.0317840576172,
+ "y": 248.0313549041748,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "3b0d82e1.8f158e",
+ "2e1a03e.c5a90fc"
+ ]
+ ]
+ },
+ {
+ "id": "3b0d82e1.8f158e",
+ "type": "switchNode",
+ "name": "switch service-data.vnfs.vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1351.0316734313965,
+ "y": 205.0313482284546,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "975a1f09.2f8c8",
+ "a0a50419.1fe858"
+ ]
+ ]
+ },
+ {
+ "id": "975a1f09.2f8c8",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1564.7460556030273,
+ "y": 188.1741189956665,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "3e9891d0.1834fe"
+ ]
+ ]
+ },
+ {
+ "id": "3e9891d0.1834fe",
+ "type": "set",
+ "name": "set vnf-index=0",
+ "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
+ "comments": "",
+ "x": 1713.0317039489746,
+ "y": 185.17417335510254,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "a0a50419.1fe858",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1568.1745529174805,
+ "y": 233.45991039276123,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "bfe1f8cb.5f4108"
+ ]
+ ]
+ },
+ {
+ "id": "bfe1f8cb.5f4108",
+ "type": "set",
+ "name": "set vnf-index = vnf_length",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
+ "comments": "",
+ "x": 1752.0322952270508,
+ "y": 233.74567890167236,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "2e1a03e.c5a90fc",
+ "type": "set",
+ "name": "set new vnf_length",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
+ "comments": "",
+ "x": 1303.0317344665527,
+ "y": 240.031343460083,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "689dbbbf.19b784",
+ "type": "save",
+ "name": "update deviceInstance configuration in AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $prop.vnf-id' >\n<parameter name='id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.name`' />\n<parameter name='name' value=\"true\" />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` \" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1108.0312805175781,
+ "y": 868.0312757492065,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ded55567.2a8678",
+ "type": "for",
+ "name": "for each existing VNF",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1114.0313186645508,
+ "y": 320.03128814697266,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "5b9cdd8f.43fa54"
+ ]
+ ]
+ },
+ {
+ "id": "e638f4a.543e508",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1650.6031284332275,
+ "y": 368.17424297332764,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "584781cc.b608c"
+ ]
+ ]
+ },
+ {
+ "id": "584781cc.b608c",
+ "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=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n",
+ "comments": "",
+ "x": 1789.1744861602783,
+ "y": 368.17420387268066,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "e89efb32.eef4a8",
+ "type": "comment",
+ "name": "make sure this vnf-id doesn't exist already",
+ "info": "",
+ "comments": "",
+ "x": 1744.459602355957,
+ "y": 497.1741261482239,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ },
+ {
+ "id": "5b9cdd8f.43fa54",
+ "type": "switchNode",
+ "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
+ "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1453.0313262939453,
+ "y": 321.0312910079956,
+ "z": "68e83c1d.51ded4",
+ "wires": [
+ [
+ "e638f4a.543e508"
+ ]
+ ]
+ },
+ {
+ "id": "f06f6e0f.f753c",
+ "type": "set",
+ "name": "set deviceId to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value=\"sdncCreate\" />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$prop.sdncCreate`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n",
+ "comments": "",
+ "x": 621.0313682556152,
+ "y": 901.0312786102295,
+ "z": "68e83c1d.51ded4",
+ "wires": []
+ }
+] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.json
new file mode 100644
index 00000000..b6fa82f1
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.json
@@ -0,0 +1,627 @@
+[
+ {
+ "id": "9c3e9355.a9b98",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 211,
+ "y": 76,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "ce33d12b.fedca"
+ ]
+ ]
+ },
+ {
+ "id": "ce33d12b.fedca",
+ "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": 286.28570556640625,
+ "y": 116.23811149597168,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "5efe4e61.39e9f"
+ ]
+ ]
+ },
+ {
+ "id": "5efe4e61.39e9f",
+ "type": "method",
+ "name": "method sdwan-vnf-topology-operation-device-deactivate",
+ "xml": "<method rpc='sdwan-vnf-topology-operation-device-deactivate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 279.42862701416016,
+ "y": 155.9999942779541,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "dd73ee5c.ac516"
+ ]
+ ]
+ },
+ {
+ "id": "dd73ee5c.ac516",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 304.1667289733887,
+ "y": 346.69354248046875,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "e4601a05.8a4688",
+ "9a1b232.90c38e",
+ "73fbd09e.9edc3",
+ "3e61d24c.5cc44e",
+ "1587e9e4.574f16",
+ "3781959e.04703a",
+ "2a98908a.1304b",
+ "7025602.36919a",
+ "f4083614.bed898",
+ "f8b84934.c5f1e8",
+ "e2ef718b.f3132",
+ "274a3fd3.76447",
+ "5ee6b514.0ecf0c"
+ ]
+ ]
+ },
+ {
+ "id": "e4601a05.8a4688",
+ "type": "set",
+ "name": "set vnf in service-data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />",
+ "comments": "",
+ "x": 560.0000762939453,
+ "y": 769.0002317428589,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "9a1b232.90c38e",
+ "type": "set",
+ "name": "set vnfId and vnf-object-path",
+ "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` \" />",
+ "comments": "",
+ "x": 581.5556182861328,
+ "y": 811.2224426269531,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "1587e9e4.574f16",
+ "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": 540.3334503173828,
+ "y": 973.7777910232544,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "73fbd09e.9edc3",
+ "type": "update",
+ "name": "update SDWAN DeviceInstance status to AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id' >\n<parameter name='id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='operational-status' value='PendingDelete' />",
+ "comments": "",
+ "outputs": 1,
+ "x": 630.6630401611328,
+ "y": 914.1478223800659,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3e61d24c.5cc44e",
+ "type": "set",
+ "name": "set vnf-level-oper-status to PendingDelete",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
+ "comments": "",
+ "x": 620.0001068115234,
+ "y": 868.0001993179321,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "e2ef718b.f3132",
+ "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 = SDWAN-Controller AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 586.5555725097656,
+ "y": 395.99996280670166,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "5f923fb2.e6dac",
+ "d9f1fd79.ec60b",
+ "917e23b.f000ae"
+ ]
+ ]
+ },
+ {
+ "id": "5f923fb2.e6dac",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 813.5555801391602,
+ "y": 323.99996185302734,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "fec9d567.919a68"
+ ]
+ ]
+ },
+ {
+ "id": "fec9d567.919a68",
+ "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": 1012.0556945800781,
+ "y": 314.999960899353,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "d9f1fd79.ec60b",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 816.0465087890625,
+ "y": 356.573974609375,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "8773c32.44abd4"
+ ]
+ ]
+ },
+ {
+ "id": "8773c32.44abd4",
+ "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": 992.617977142334,
+ "y": 353.85972690582275,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "917e23b.f000ae",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 808.3795166015625,
+ "y": 397.90728759765625,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "639cc54c.25461c"
+ ]
+ ]
+ },
+ {
+ "id": "639cc54c.25461c",
+ "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": 996.1520729064941,
+ "y": 393.34648036956787,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "274a3fd3.76447",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get token",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-device.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\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 609.4442253112793,
+ "y": 462.1111717224121,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "8dc1f56a.c9edd8",
+ "2d6a0c7e.fec4b4"
+ ]
+ ]
+ },
+ {
+ "id": "8dc1f56a.c9edd8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 844.4442253112793,
+ "y": 440.1111717224121,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "cafcbbb3.279d28"
+ ]
+ ]
+ },
+ {
+ "id": "2d6a0c7e.fec4b4",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 836.6942253112793,
+ "y": 493.75405502319336,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "2bb735a3.ef2caa"
+ ]
+ ]
+ },
+ {
+ "id": "cafcbbb3.279d28",
+ "type": "set",
+ "name": "set token-id",
+ "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
+ "comments": "",
+ "x": 998.4442253112793,
+ "y": 441.1111717224121,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "11e446ee.b59549",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 945.5554428100586,
+ "y": 677.1112051010132,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "edc154b6.909958"
+ ]
+ ]
+ },
+ {
+ "id": "edc154b6.909958",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1116.6664581298828,
+ "y": 675.8890256881714,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2bb735a3.ef2caa",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 984.5552673339844,
+ "y": 490.00000381469727,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d5f90150.5efad",
+ "type": "comment",
+ "name": "Do Nothing",
+ "info": "",
+ "comments": "",
+ "x": 1120.1108411153155,
+ "y": 488.88887956407336,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "9375b3d1.4ccfc",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 942.1109962463379,
+ "y": 730.4444913864136,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "4a4ccb7.2656134"
+ ]
+ ]
+ },
+ {
+ "id": "4a4ccb7.2656134",
+ "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": 1087.110996246338,
+ "y": 733.4444913864136,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "4f2b12fc.8ccc3c",
+ "type": "comment",
+ "name": "deviceId need to provide here?",
+ "info": "",
+ "comments": "",
+ "x": 581.3333320617676,
+ "y": 528,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "f5a0eb00.de7588",
+ "type": "comment",
+ "name": "tmp.thirdparty-sdnc-id to be hardcoded here?",
+ "info": "",
+ "comments": "",
+ "x": 635.333366394043,
+ "y": 315.0000591278076,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "a4f6705d.1d73",
+ "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": 875.3332824707031,
+ "y": 1718.3333358764648,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "3781959e.04703a",
+ "type": "for",
+ "name": "for vidx..service-data.vnfs.vnf_length[]",
+ "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 619.03125,
+ "y": 244.03125,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "a8d53377.9812d"
+ ]
+ ]
+ },
+ {
+ "id": "a8d53377.9812d",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 867.3808441162109,
+ "y": 244.5713176727295,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "80a46b1e.d041d8"
+ ]
+ ]
+ },
+ {
+ "id": "80a46b1e.d041d8",
+ "type": "switchNode",
+ "name": "switch vnfid found",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1021.4604415893555,
+ "y": 244.28139972686768,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "42dc4574.ff70ac"
+ ]
+ ]
+ },
+ {
+ "id": "89ce8e98.fff87",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1315.0579528808594,
+ "y": 245.58171272277832,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "68c86c18.1fc774",
+ "3e5b1306.9b698c",
+ "50ffba36.d6fac4"
+ ]
+ ]
+ },
+ {
+ "id": "42dc4574.ff70ac",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1176.4124336242676,
+ "y": 245.17407894134521,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "89ce8e98.fff87"
+ ]
+ ]
+ },
+ {
+ "id": "3e5b1306.9b698c",
+ "type": "set",
+ "name": "set vnf-request-input.",
+ "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
+ "comments": "",
+ "x": 1556.3908081054688,
+ "y": 201.58177280426025,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "68c86c18.1fc774",
+ "type": "set",
+ "name": "set tmp.vidx and ctx.vnf-data",
+ "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
+ "comments": "",
+ "x": 1583.9445190429688,
+ "y": 154.92413711547852,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "50ffba36.d6fac4",
+ "type": "call",
+ "name": "call sdwan-get-device-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1561.0312576293945,
+ "y": 264.0312433242798,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2a98908a.1304b",
+ "type": "switchNode",
+ "name": "switch tmp.vidx ",
+ "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 536.03125,
+ "y": 286.03125,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "ebb7bd09.45a41"
+ ]
+ ]
+ },
+ {
+ "id": "ebb7bd09.45a41",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 683.4598922729492,
+ "y": 285.6026601791382,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "94eadd89.567a"
+ ]
+ ]
+ },
+ {
+ "id": "94eadd89.567a",
+ "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 832.8886184692383,
+ "y": 286.7455778121948,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "5ee6b514.0ecf0c",
+ "type": "execute",
+ "name": "execute RestApiCallNode delete Devcie Instance",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-device-del.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v3/devices'`\" />\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=\"deviceResp\"/>\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": 652.0313262939453,
+ "y": 700.0313568115234,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ [
+ "11e446ee.b59549",
+ "9375b3d1.4ccfc"
+ ]
+ ]
+ },
+ {
+ "id": "7025602.36919a",
+ "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": 560.03125,
+ "y": 350.03125,
+ "z": "73283ddb.ad1024",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f4083614.bed898",
+ "type": "set",
+ "name": "set device Id length and deviceId",
+ "xml": "<set>\n<parameter name='prop.devices[0]' value='`$prop.device.deviceId`' />\n\n\n",
+ "comments": "",
+ "x": 602.0312652587891,
+ "y": 645.0312666893005,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ },
+ {
+ "id": "f8b84934.c5f1e8",
+ "type": "set",
+ "name": "set device Id length and deviceId",
+ "xml": "<set>\n<parameter name='prop.devices_length' value='1' />\n\n\n",
+ "comments": "",
+ "x": 596.03125,
+ "y": 595.03125,
+ "z": "73283ddb.ad1024",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.json
new file mode 100644
index 00000000..72538cfc
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.json
@@ -0,0 +1,555 @@
+[
+ {
+ "id": "7735fc30.841634",
+ "type": "switchNode",
+ "name": "switch service-data.vnfs.vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 757.03125,
+ "y": 380.03125,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "8fd37aa5.017ed8",
+ "9c974a8d.2ebbc8"
+ ]
+ ]
+ },
+ {
+ "id": "44891278.d01ccc",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 218.9365463256836,
+ "y": 144.77007961273193,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "cf34b9f3.a217e8"
+ ]
+ ]
+ },
+ {
+ "id": "cf34b9f3.a217e8",
+ "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": 294.22225189208984,
+ "y": 185.0081911087036,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "f275038d.034f"
+ ]
+ ]
+ },
+ {
+ "id": "9fb20f9.a2934f",
+ "type": "comment",
+ "name": "wan port-vnf-topology-operation-delete",
+ "info": "",
+ "comments": "",
+ "x": 668.2814636230469,
+ "y": 218.35647869110107,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "47c2021d.e2c7fc",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 295.60321044921875,
+ "y": 446.4367513656616,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "e3e2bc88.e9b0d",
+ "6dbec876.fc0328",
+ "750850d5.2167c",
+ "3731bfbc.74cda",
+ "25ec4ecb.412e22",
+ "7735fc30.841634",
+ "e6700fc6.f20b6",
+ "6f81e67.c77e818",
+ "3b4d6073.21879"
+ ]
+ ]
+ },
+ {
+ "id": "8fd37aa5.017ed8",
+ "type": "other",
+ "name": "outcome Null",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1021.7535629272461,
+ "y": 362.5868721008301,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "847c658a.4062c8"
+ ]
+ ]
+ },
+ {
+ "id": "847c658a.4062c8",
+ "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 1202.753433227539,
+ "y": 357.5867500305176,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "9c974a8d.2ebbc8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1007.2535629272461,
+ "y": 414.58683490753174,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "a54560d4.0ba6d"
+ ]
+ ]
+ },
+ {
+ "id": "a54560d4.0ba6d",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1179.2532691955566,
+ "y": 414.5868330001831,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "77ddf34.4623e0c",
+ "6b40a8cd.dcd938",
+ "7e832033.e29c9"
+ ]
+ ]
+ },
+ {
+ "id": "6b40a8cd.dcd938",
+ "type": "switchNode",
+ "name": "switch tmp.vidx ",
+ "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1354.2534408569336,
+ "y": 433.58675479888916,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "5d6c7481.ef0eac"
+ ]
+ ]
+ },
+ {
+ "id": "25ec4ecb.412e22",
+ "type": "switchNode",
+ "name": "switch vnf-level-oper-status",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 727.4202499389648,
+ "y": 454.4757137298584,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "6e834974.d9b6b8",
+ "8930f777.246948"
+ ]
+ ]
+ },
+ {
+ "id": "6e834974.d9b6b8",
+ "type": "outcome",
+ "name": "outcome PendingDelete",
+ "xml": "<outcome value='PendingDelete'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1018.2535171508789,
+ "y": 458.58683681488037,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "9d8ec192.cf786"
+ ]
+ ]
+ },
+ {
+ "id": "8930f777.246948",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 964.2535781860352,
+ "y": 505.58684062957764,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "8989bed6.5ee81"
+ ]
+ ]
+ },
+ {
+ "id": "8989bed6.5ee81",
+ "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=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
+ "comments": "",
+ "x": 1123.753345489502,
+ "y": 508.5868396759033,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "e6700fc6.f20b6",
+ "type": "switchNode",
+ "name": "switch vnf-id",
+ "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 693.2535667419434,
+ "y": 335.5868434906006,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "73ae75a9.e85c8c"
+ ]
+ ]
+ },
+ {
+ "id": "73ae75a9.e85c8c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 891.2536315917969,
+ "y": 325.5868558883667,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "dd6eb157.d89e"
+ ]
+ ]
+ },
+ {
+ "id": "dd6eb157.d89e",
+ "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=\"vnf-request-input.vnf-input-parameters.name is a required input\" />\n",
+ "comments": "",
+ "x": 1057.753517150879,
+ "y": 322.5868501663208,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "77ddf34.4623e0c",
+ "type": "for",
+ "name": "for vidx..service-data.vnfs.vnf[]",
+ "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1414.7534446716309,
+ "y": 369.5867509841919,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "cd627687.735828"
+ ]
+ ]
+ },
+ {
+ "id": "cd627687.735828",
+ "type": "switchNode",
+ "name": "switch vnf-id found",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1670.7534637451172,
+ "y": 369.5867509841919,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "4efba8ed.463c18"
+ ]
+ ]
+ },
+ {
+ "id": "4efba8ed.463c18",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1847.253517150879,
+ "y": 372.5867509841919,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "ae933ccf.17812"
+ ]
+ ]
+ },
+ {
+ "id": "1bcea5bb.85368a",
+ "type": "set",
+ "name": "set tmp.vidx and ctx.vnf-data",
+ "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
+ "comments": "",
+ "x": 2264.253730773926,
+ "y": 451.58680295944214,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "3be2d098.9a5d7",
+ "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 1659.7534561157227,
+ "y": 433.58675479888916,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "5d6c7481.ef0eac",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1522.2534561157227,
+ "y": 433.58675479888916,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "3be2d098.9a5d7"
+ ]
+ ]
+ },
+ {
+ "id": "750850d5.2167c",
+ "type": "set",
+ "name": "set vnfId and vnf-object-path",
+ "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='vnf-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />",
+ "comments": "",
+ "x": 705.2699813842773,
+ "y": 630.1034965515137,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "3731bfbc.74cda",
+ "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.3811416625977,
+ "y": 755.6589269638062,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "e3e2bc88.e9b0d",
+ "type": "set",
+ "name": "set new vnf length",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
+ "comments": "",
+ "x": 685.9025650024414,
+ "y": 527.5743541717529,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "6dbec876.fc0328",
+ "type": "set",
+ "name": "Remove vnf from ServiceData",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.vidx].\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 721.5267562866211,
+ "y": 571.5423212051392,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "9d8ec192.cf786",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1215.5599174499512,
+ "y": 468.91199111938477,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f275038d.034f",
+ "type": "method",
+ "name": "method sdwan-vnf-topology-operation-device-delete",
+ "xml": "<method rpc='sdwan-vnf-topology-operation-device-delete' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 299.4677963256836,
+ "y": 301.03125,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "47c2021d.e2c7fc"
+ ]
+ ]
+ },
+ {
+ "id": "6f81e67.c77e818",
+ "type": "execute",
+ "name": "execute requiredParameters",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 750.7536239624023,
+ "y": 275.58684253692627,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9d539b15.274ee8",
+ "type": "delete",
+ "name": "delete wan port instance configuration in AAI",
+ "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='device' \n key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1058.4678955078125,
+ "y": 693.0313606262207,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7e832033.e29c9",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.vidx1234555\"/>\n<parameter name=\"field3\" value='`$tmp.vidx`'/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1403.4679336547852,
+ "y": 488.0312623977661,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "baf87e05.49718",
+ "type": "call",
+ "name": "call sdwan-get-device-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2256.0313110351562,
+ "y": 396.0312566757202,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "657365d9.06388c",
+ "type": "set",
+ "name": "set vnf-request-input.",
+ "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
+ "comments": "",
+ "x": 2251.3908615112305,
+ "y": 333.5817861557007,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "2c001ef8.5cd552",
+ "type": "set",
+ "name": "set tmp.vidx and ctx.vnf-data",
+ "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
+ "comments": "",
+ "x": 2278.9445724487305,
+ "y": 286.92415046691895,
+ "z": "f20d2d3a.d3597",
+ "wires": []
+ },
+ {
+ "id": "ae933ccf.17812",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 2017.0311279296875,
+ "y": 374.03125,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "1bcea5bb.85368a",
+ "baf87e05.49718",
+ "657365d9.06388c",
+ "2c001ef8.5cd552"
+ ]
+ ]
+ },
+ {
+ "id": "3b4d6073.21879",
+ "type": "switchNode",
+ "name": "switch prop.device.sdncCreate",
+ "xml": "<switch test=\"`$prop.device.sdncCreate`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 649.0314254760742,
+ "y": 691.0313444137573,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "749e7d0b.8542b4"
+ ]
+ ]
+ },
+ {
+ "id": "749e7d0b.8542b4",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 803.0312919616699,
+ "y": 692.031268119812,
+ "z": "f20d2d3a.d3597",
+ "wires": [
+ [
+ "9d539b15.274ee8"
+ ]
+ ]
+ }
+] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json
index 55e912d2..d0ccec91 100644
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json
@@ -132,8 +132,8 @@
"xml": "<outcome value='unassign'>\n",
"comments": "",
"outputs": 1,
- "x": 939.4286308288574,
- "y": 580.1282825469971,
+ "x": 940.4287643432617,
+ "y": 711.1283483505249,
"z": "4375a986.58da58",
"wires": [
[
@@ -148,8 +148,8 @@
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 928.1428680419922,
- "y": 960.3183660507202,
+ "x": 929.1430358886719,
+ "y": 1303.3186073303223,
"z": "4375a986.58da58",
"wires": [
[
@@ -163,8 +163,8 @@
"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=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
"comments": "",
- "x": 1161.3332977294922,
- "y": 960.3184270858765,
+ "x": 1162.3334655761719,
+ "y": 1303.3186683654785,
"z": "4375a986.58da58",
"wires": []
},
@@ -203,8 +203,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1746.8571319580078,
- "y": 492.84235858917236,
+ "x": 1740.8572721481323,
+ "y": 655.8424282073975,
"z": "4375a986.58da58",
"wires": [
[]
@@ -217,8 +217,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1284.5237274169922,
- "y": 579.8424139022827,
+ "x": 1304.5238952636719,
+ "y": 715.8424291610718,
"z": "4375a986.58da58",
"wires": [
[]
@@ -231,8 +231,8 @@
"xml": "<outcome value='deactivate'>\n",
"comments": "",
"outputs": 1,
- "x": 946.5237579345703,
- "y": 435.5090456008911,
+ "x": 930.5238723754883,
+ "y": 519.5090370178223,
"z": "4375a986.58da58",
"wires": [
[
@@ -247,8 +247,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1728.666763305664,
- "y": 313.4136724472046,
+ "x": 1754.666904449463,
+ "y": 375.41370582580566,
"z": "4375a986.58da58",
"wires": [
[]
@@ -277,8 +277,8 @@
"xml": "<outcome value='create'>\n",
"comments": "",
"outputs": 1,
- "x": 941.0001182556152,
- "y": 680.5000038146973,
+ "x": 942.0001945495605,
+ "y": 843.5000152587891,
"z": "4375a986.58da58",
"wires": [
[
@@ -293,8 +293,8 @@
"xml": "<outcome value='delete'>\n",
"comments": "",
"outputs": 1,
- "x": 939.0001068115234,
- "y": 823.5000066757202,
+ "x": 940.0002288818359,
+ "y": 1058.5000567436218,
"z": "4375a986.58da58",
"wires": [
[
@@ -315,7 +315,9 @@
"wires": [
[
"c9e81f54.ac68b",
- "d05da9c5.f500d8"
+ "d05da9c5.f500d8",
+ "798897d0.7131b8",
+ "ca8cee25.05298"
]
]
},
@@ -326,8 +328,8 @@
"xml": "<outcome value='ActivateSiteInstance'>",
"comments": "",
"outputs": 1,
- "x": 1381.4762725830078,
- "y": 222.979229927063,
+ "x": 1417.476333618164,
+ "y": 240.97925567626953,
"z": "4375a986.58da58",
"wires": [
[
@@ -342,8 +344,8 @@
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1350.381004333496,
- "y": 314.3572244644165,
+ "x": 1376.381145477295,
+ "y": 376.3572578430176,
"z": "4375a986.58da58",
"wires": [
[
@@ -374,8 +376,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-activate' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1755.0000762939453,
- "y": 221.5000123977661,
+ "x": 1791.0001373291016,
+ "y": 239.50003814697266,
"z": "4375a986.58da58",
"wires": [
[]
@@ -388,13 +390,15 @@
"xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
"comments": "",
"outputs": 1,
- "x": 1209.0000762939453,
- "y": 468.5000123977661,
+ "x": 1193.0001907348633,
+ "y": 552.5000038146973,
"z": "4375a986.58da58",
"wires": [
[
"f6ce8f15.087c8",
- "6a7a4689.125ee8"
+ "6a7a4689.125ee8",
+ "6e2dfa7d.37fff4",
+ "391009ec.e35256"
]
]
},
@@ -405,8 +409,8 @@
"xml": "<outcome value='DeactivateSiteInstance'>",
"comments": "",
"outputs": 1,
- "x": 1422.4762725830078,
- "y": 399.979229927063,
+ "x": 1436.4763870239258,
+ "y": 503.9792523384094,
"z": "4375a986.58da58",
"wires": [
[
@@ -421,8 +425,8 @@
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1391.381004333496,
- "y": 491.3572244644165,
+ "x": 1385.3811445236206,
+ "y": 654.3572940826416,
"z": "4375a986.58da58",
"wires": [
[
@@ -437,8 +441,8 @@
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1148.0000762939453,
- "y": 413.5000123977661,
+ "x": 1132.0001907348633,
+ "y": 497.50000381469727,
"z": "4375a986.58da58",
"wires": [
[
@@ -453,8 +457,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-deactivate' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1792.0000762939453,
- "y": 397.5000123977661,
+ "x": 1806.0001907348633,
+ "y": 501.50003480911255,
"z": "4375a986.58da58",
"wires": [
[]
@@ -467,13 +471,15 @@
"xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
"comments": "",
"outputs": 1,
- "x": 1184.3336029052734,
- "y": 733.086371421814,
+ "x": 1185.3336791992188,
+ "y": 896.0863828659058,
"z": "4375a986.58da58",
"wires": [
[
"92af337f.f9091",
- "2260291f.e97ce6"
+ "2260291f.e97ce6",
+ "7dd9dcbc.7f2444",
+ "4129d032.78404"
]
]
},
@@ -484,8 +490,8 @@
"xml": "<outcome value='CreateSiteInstance'>",
"comments": "",
"outputs": 1,
- "x": 1397.809799194336,
- "y": 664.5655889511108,
+ "x": 1395.8100814819336,
+ "y": 782.5656590461731,
"z": "4375a986.58da58",
"wires": [
[
@@ -500,8 +506,8 @@
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1366.7145309448242,
- "y": 755.9435834884644,
+ "x": 1367.7146072387695,
+ "y": 918.9435949325562,
"z": "4375a986.58da58",
"wires": [
[
@@ -516,8 +522,8 @@
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1123.3336029052734,
- "y": 678.086371421814,
+ "x": 1124.3336791992188,
+ "y": 841.0863828659058,
"z": "4375a986.58da58",
"wires": [
[
@@ -532,8 +538,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-create' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1771.3336029052734,
- "y": 663.086371421814,
+ "x": 1772.3337860107422,
+ "y": 781.0864176750183,
"z": "4375a986.58da58",
"wires": [
[]
@@ -547,8 +553,8 @@
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1507.0001068115234,
- "y": 757.0000066757202,
+ "x": 1508.0001831054688,
+ "y": 920.000018119812,
"z": "4375a986.58da58",
"wires": [
[]
@@ -561,13 +567,15 @@
"xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
"comments": "",
"outputs": 1,
- "x": 1185.0001068115234,
- "y": 876.0000066757202,
+ "x": 1186.000228881836,
+ "y": 1111.0000567436218,
"z": "4375a986.58da58",
"wires": [
[
"91de147a.222508",
- "74446a5b.f474e4"
+ "74446a5b.f474e4",
+ "99ea96e4.0df2a8",
+ "1a0e74cb.e3576b"
]
]
},
@@ -578,8 +586,8 @@
"xml": "<outcome value='DeleteSiteInstance'>",
"comments": "",
"outputs": 1,
- "x": 1398.476303100586,
- "y": 807.4792242050171,
+ "x": 1399.4764251708984,
+ "y": 1042.4792742729187,
"z": "4375a986.58da58",
"wires": [
[
@@ -594,8 +602,8 @@
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1367.3810348510742,
- "y": 898.8572187423706,
+ "x": 1394.3811988830566,
+ "y": 1230.857343196869,
"z": "4375a986.58da58",
"wires": [
[
@@ -610,8 +618,8 @@
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1124.0001068115234,
- "y": 821.0000066757202,
+ "x": 1125.000228881836,
+ "y": 1056.0000567436218,
"z": "4375a986.58da58",
"wires": [
[
@@ -626,8 +634,8 @@
"xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-delete' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1772.0001068115234,
- "y": 806.0000066757202,
+ "x": 1773.000228881836,
+ "y": 1041.0000567436218,
"z": "4375a986.58da58",
"wires": [
[]
@@ -641,8 +649,248 @@
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1507.6666107177734,
- "y": 899.9136419296265,
+ "x": 1534.6667747497559,
+ "y": 1231.9137663841248,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "798897d0.7131b8",
+ "type": "outcome",
+ "name": "ActivateSDWANDeviceInstance",
+ "xml": "<outcome value='ActivateSDWANDeviceInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1445.6667938232422,
+ "y": 290.0000777244568,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "a45f59ac.5e3398"
+ ]
+ ]
+ },
+ {
+ "id": "a45f59ac.5e3398",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-device-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1881.1904907226562,
+ "y": 289.5208501815796,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6e2dfa7d.37fff4",
+ "type": "outcome",
+ "name": "DeactivateSDWANDeviceInstance",
+ "xml": "<outcome value='DeactivateSDWANDeviceInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1477.6666259765625,
+ "y": 552.0000309944153,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "c84c03f8.9cd4"
+ ]
+ ]
+ },
+ {
+ "id": "c84c03f8.9cd4",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-device-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1934.1903228759766,
+ "y": 551.520866394043,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "57576319.5a9afc",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-wanport-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1885.6666259765625,
+ "y": 335,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ca8cee25.05298",
+ "type": "outcome",
+ "name": "ActivateSDWANPortInstance",
+ "xml": "<outcome value='ActivateSDWANPortInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1450.1429290771484,
+ "y": 335.4792275428772,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "57576319.5a9afc"
+ ]
+ ]
+ },
+ {
+ "id": "391009ec.e35256",
+ "type": "outcome",
+ "name": "DeactivateSDWANPortInstance",
+ "xml": "<outcome value='DeactivateSDWANPortInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1487.6666259765625,
+ "y": 607.3333129882812,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "f3661d98.5a432"
+ ]
+ ]
+ },
+ {
+ "id": "f3661d98.5a432",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-wanport-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1944.1903228759766,
+ "y": 606.8541483879089,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7dd9dcbc.7f2444",
+ "type": "outcome",
+ "name": "CreateSDWANPortInstance",
+ "xml": "<outcome value='CreateSDWANPortInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1445.666976928711,
+ "y": 871.3334934711456,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "68414049.ea046"
+ ]
+ ]
+ },
+ {
+ "id": "68414049.ea046",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-wanport-create",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-create' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1902.1905975341797,
+ "y": 875.8542728424072,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "99ea96e4.0df2a8",
+ "type": "outcome",
+ "name": "DeleteSDWANPortInstance",
+ "xml": "<outcome value='DeleteSDWANPortInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1462.3334655761719,
+ "y": 1167.333445072174,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "a5fe3bb.97135c8"
+ ]
+ ]
+ },
+ {
+ "id": "a5fe3bb.97135c8",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-wanport-delete",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-delete' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1918.857162475586,
+ "y": 1166.8542804718018,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1a0e74cb.e3576b",
+ "type": "outcome",
+ "name": "DeleteSDWANDeviceInstance",
+ "xml": "<outcome value='DeleteSDWANDeviceInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1471.0316162109375,
+ "y": 1107.5313515663147,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "b4d0ce64.19ec1"
+ ]
+ ]
+ },
+ {
+ "id": "b4d0ce64.19ec1",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-device-delete",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-delete' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1903.5552215576172,
+ "y": 1107.0520648956299,
+ "z": "4375a986.58da58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4129d032.78404",
+ "type": "outcome",
+ "name": "CreateSDWANDeviceInstance",
+ "xml": "<outcome value='CreateSDWANDeviceInstance'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1461.0313262939453,
+ "y": 827.5314569473267,
+ "z": "4375a986.58da58",
+ "wires": [
+ [
+ "9003a9fa.c60f08"
+ ]
+ ]
+ },
+ {
+ "id": "9003a9fa.c60f08",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sdwan-vnf-topology-operation-device-create",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-create' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1917.5549926757812,
+ "y": 826.0522708892822,
"z": "4375a986.58da58",
"wires": [
[]
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-device-param.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-device-param.xml
new file mode 100644
index 00000000..c4bbca19
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-device-param.xml
@@ -0,0 +1,87 @@
+<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}'>
+ <method rpc='sdwan-get-device-param' mode='sync'>
+ <block atomic="true">
+ <for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >
+ <block>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'esn'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.esn' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'class'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.class' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.deviceModel' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'version'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.version' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'systemIp'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.systemIP' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'vendor'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.vendor' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'deviceId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.deviceId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'sdncCreate'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.sdncCreate' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </for>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.xml
new file mode 100644
index 00000000..5c4d4785
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-activate.xml
@@ -0,0 +1,160 @@
+<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='1.2.1-SNAPSHOT'>
+ <method rpc='sdwan-vnf-topology-operation-device-activate' mode='sync'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ <set>
+ <parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Provided alloted resource length"/>
+ <parameter name="field3" value="'parameters length'"/>
+ <parameter name="field4" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`'/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-device.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v3/devices'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="put"/>
+ <parameter name="responsePrefix" value="deviceResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <!--execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' ><parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-wan-port.json'`" /><parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`" /><parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /><parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /><parameter name="format" value="json"/><parameter name="httpMethod" value="post"/><parameter name="responsePrefix" value="wanPortResp"/><parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/><parameter name="trustStorePassword" value="adminadmin"/><parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/><parameter name="keyStorePassword" value="adminadmin"/><parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /-->
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Activate Device rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value="deviceId" />
+ <!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$deviceResp[0].id`' /-->
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id' >
+ <parameter name='id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='device-id' value='$deviceResp[0].id' />
+ <parameter name='operational-status' value='Active' />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='service-instance.service-instance-id = $service-data.service-information.service-instance-id
+ AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id
+ AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="device" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/devices/device/' + $vnf-topology-operation-input.vnf-information.vnf-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="device.id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vnf-topology-operation-input.vnf-information.vnf-id`" />
+ </save>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.xml
new file mode 100644
index 00000000..821fc1f6
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-create.xml
@@ -0,0 +1,162 @@
+<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='1.2.1-SNAPSHOT'>
+ <method rpc='sdwan-vnf-topology-operation-device-create' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.sdncCreate' value='false' />
+ </set>
+ <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.sdncCreate' value='true' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.vnf-id"/>
+ </execute>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+ </set>
+ </block>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+ </set>
+ </block>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
+ + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ <set>
+ <parameter name='prop.vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name="`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
+ </set>
+ </block>
+ </for>
+ <set>
+ <parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' ></call>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$prop.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />
+ </set>
+ <switch test='`$prop.sdncCreate`'>
+ <outcome value='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.id = $prop.vnf-id' >
+ <parameter name='id' value='`$prop.vnf-id`' />
+ <parameter name='esn' value='`$prop.device.name`' />
+ <parameter name='name' value="true" />
+ <parameter name='description' value='`$prop.device.description`' />
+ <parameter name='vendor' value='`$prop.device.vendor`' />
+ <parameter name='class' value='`$prop.device.class`' />
+ <parameter name='type' value='`$prop.device.deviceModel`' />
+ <parameter name='version' value='`$prop.device.version`' />
+ <parameter name='system-ip' value='`$prop.device.systemIp`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
+ <parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />
+ <parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />
+ <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` " />
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.id = $prop.vnf-id' >
+ <parameter name='id' value='`$prop.vnf-id`' />
+ <parameter name='esn' value='`$prop.device.name`' />
+ <parameter name='name' value="true" />
+ <parameter name='description' value='`$prop.device.description`' />
+ <parameter name='vendor' value='`$prop.device.vendor`' />
+ <parameter name='class' value='`$prop.device.class`' />
+ <parameter name='type' value='`$prop.device.deviceModel`' />
+ <parameter name='version' value='`$prop.device.version`' />
+ <parameter name='system-ip' value='`$prop.device.systemIp`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
+ <parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />
+ <parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />
+ <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` " />
+ </update>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value="sdncCreate" />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$prop.sdncCreate`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />
+ </set>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.xml
new file mode 100644
index 00000000..d9cea851
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-deactivate.xml
@@ -0,0 +1,141 @@
+<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}'>
+ <method rpc='sdwan-vnf-topology-operation-device-deactivate' mode='sync'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ <set>
+ <parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-device.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='prop.devices_length' value='1' />
+ </set>
+ <set>
+ <parameter name='prop.devices[0]' value='`$prop.device.deviceId`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-device-del.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v3/devices'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="delete"/>
+ <parameter name="responsePrefix" value="deviceResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id' >
+ <parameter name='id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='operational-status' value='PendingDelete' />
+ </update>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.xml
new file mode 100644
index 00000000..0190be0b
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.xml
@@ -0,0 +1,103 @@
+<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}'>
+ <method rpc='sdwan-vnf-topology-operation-device-delete' mode='sync'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >
+ <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/>
+ </execute>
+ <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-request-input.vnf-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ <set>
+ <parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' ></call>
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="tmp.vidx1234555"/>
+ <parameter name="field3" value='`$tmp.vidx`'/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='PendingDelete'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmp.vidx]." value=""/>
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='vnf-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vnf-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'` " />
+ </set>
+ <switch test="`$prop.device.sdncCreate`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='device'
+ key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id'></delete>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
index e0332cc6..6dbe24bf 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
@@ -14,6 +14,12 @@
<outcome value='ActivateSiteInstance'>
<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-activate' mode='sync' ></call>
</outcome>
+ <outcome value='ActivateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='ActivateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-activate' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' ></call>
</outcome>
@@ -26,6 +32,12 @@
<outcome value='DeactivateSiteInstance'>
<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-deactivate' mode='sync' ></call>
</outcome>
+ <outcome value='DeactivateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeactivateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-deactivate' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' ></call>
</outcome>
@@ -41,6 +53,12 @@
<outcome value='CreateSiteInstance'>
<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-create' mode='sync' ></call>
</outcome>
+ <outcome value='CreateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='CreateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-create' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<block></block>
</outcome>
@@ -53,6 +71,12 @@
<outcome value='DeleteSiteInstance'>
<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-delete' mode='sync' ></call>
</outcome>
+ <outcome value='DeleteSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeleteSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-delete' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<block></block>
</outcome>