diff options
author | shashikanth.vh <shashikanth.vh@huawei.com> | 2018-08-14 21:30:26 +0530 |
---|---|---|
committer | shashikanth.vh <shashikanth.vh@huawei.com> | 2018-08-14 21:30:42 +0530 |
commit | 352fe4eda18c7bb084510dbae906d24d41ced8a8 (patch) | |
tree | eb1759d24041575d29c673e0e09b058661220a88 /platform-logic | |
parent | 5c164baf5662bc8ce115746004762096b0ae28d7 (diff) |
SDWAN WAN port DG addition
Updates include:
- Addition of sdwan port resource DG
- Templates
Change-Id: Id3913755e2724c26663269fb9c8235fc2ca7fb91
Issue-ID: SDNC-357
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
Former-commit-id: 93bb206a1e4d8ce64a5f43d2733995a0a1b4fe92
Diffstat (limited to 'platform-logic')
14 files changed, 4994 insertions, 19 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-wan-param.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-wan-param.json new file mode 100644 index 00000000..dbd911b5 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-wan-param.json @@ -0,0 +1,727 @@ +[ + { + "id": "439a8dde.a54294", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 95, + "y": 67, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "885d7f3c.d7635" + ] + ] + }, + { + "id": "885d7f3c.d7635", + "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": 307.00000381469727, + "y": 139.0000171661377, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "715e2390.5052fc" + ] + ] + }, + { + "id": "715e2390.5052fc", + "type": "method", + "name": "sdwan-get-wan-param", + "xml": "<method rpc='sdwan-get-wan-param' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 295.0001220703125, + "y": 227, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "9d4aea5e.ef6f48" + ] + ] + }, + { + "id": "9d4aea5e.ef6f48", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 302.00001525878906, + "y": 313.0000581741333, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "6b944277.796b7c" + ] + ] + }, + { + "id": "6b944277.796b7c", + "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": 338.6667785644531, + "y": 395.666654586792, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "37470750.b03bb8" + ] + ] + }, + { + "id": "37470750.b03bb8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 603.5002822875977, + "y": 305.00004625320435, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "7ac07f9d.deb5a", + "f51dc11b.c63d", + "390047c.48de9b8", + "19863ae8.c2ed05", + "a84af135.691bc", + "40a2ce76.5acb8", + "743ccae1.1d4ed4", + "da2a6768.0f1b08", + "937e7e7c.abe2b", + "d7a63229.55ffb", + "52f8113f.08404", + "dd33b364.8ca5b", + "edbcab35.7a44e8", + "d34e678f.eeed98", + "54c67966.b6a9c8" + ] + ] + }, + { + "id": "7ac07f9d.deb5a", + "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": 837.0006408691406, + "y": 671.0003890991211, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "a84af135.691bc", + "type": "switchNode", + "name": "switch deviceName", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'deviceName'`\">\n", + "comments": "", + "outputs": 1, + "x": 836.0000877380371, + "y": 220.00005626678467, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "e491e463.e045e8" + ] + ] + }, + { + "id": "e491e463.e045e8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1038.000494003296, + "y": 221.00012683868408, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "946002ca.03b1f" + ] + ] + }, + { + "id": "946002ca.03b1f", + "type": "set", + "name": "set deviceName", + "xml": "<set>\n<parameter name='prop.wan.deviceName' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1190.0005569458008, + "y": 218.60021209716797, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "d7a63229.55ffb", + "type": "switchNode", + "name": "switch vlanId", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'vlanId'`\">\n", + "comments": "", + "outputs": 1, + "x": 828.8402290344238, + "y": 406.00011920928955, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "d3962f14.7c3b3" + ] + ] + }, + { + "id": "d3962f14.7c3b3", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1013.8403167724609, + "y": 404.0001497268677, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "1b718234.ee52ce" + ] + ] + }, + { + "id": "1b718234.ee52ce", + "type": "set", + "name": "set vlanId", + "xml": "<set>\n<parameter name='prop.wan.vlanId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1161.1742248535156, + "y": 401.4614086151123, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "390047c.48de9b8", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 833.8951606750488, + "y": 149.97332763671875, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "eba68f46.eff61" + ] + ] + }, + { + "id": "eba68f46.eff61", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1021.8952484130859, + "y": 150.97335720062256, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "7dfe338e.aacb9c" + ] + ] + }, + { + "id": "7dfe338e.aacb9c", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.wan.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1171.8954982757568, + "y": 145.57343292236328, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "da2a6768.0f1b08", + "type": "switchNode", + "name": "switch ipAddress", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'ipAddress'`\">\n", + "comments": "", + "outputs": 1, + "x": 832.8954048156738, + "y": 332.37682247161865, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "d6f71f04.c7866" + ] + ] + }, + { + "id": "d6f71f04.c7866", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1026.895652770996, + "y": 333.37677097320557, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "65be0cd2.03f094" + ] + ] + }, + { + "id": "65be0cd2.03f094", + "type": "set", + "name": "set ipAddress", + "xml": "<set>\n<parameter name='prop.wan.ipAddress' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1179.2295608520508, + "y": 331.8380317687988, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "937e7e7c.abe2b", + "type": "switchNode", + "name": "switch providerIpAddress", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'providerIpAddress'`\">\n", + "comments": "", + "outputs": 1, + "x": 864.895565032959, + "y": 367.3767442703247, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "d6c02774.fd7328" + ] + ] + }, + { + "id": "d6c02774.fd7328", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1040.8958168029785, + "y": 367.3766899108887, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "86d16286.a90f7" + ] + ] + }, + { + "id": "86d16286.a90f7", + "type": "set", + "name": "set providerIpAddress", + "xml": "<set>\n<parameter name='prop.wan.providerIpAddress' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1207.2294006347656, + "y": 367.8378715515137, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "dd33b364.8ca5b", + "type": "switchNode", + "name": "switch inputBandwidth", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'inputBandwidth'`\">\n", + "comments": "", + "outputs": 1, + "x": 855.8953742980957, + "y": 479.3765506744385, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "8c8b118b.1a16e" + ] + ] + }, + { + "id": "8c8b118b.1a16e", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1032.8955726623535, + "y": 478.376615524292, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "52559144.3d725" + ] + ] + }, + { + "id": "52559144.3d725", + "type": "set", + "name": "set inputBandwidth", + "xml": "<set>\n<parameter name='prop.wan.inputBandwidth' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1240.2293224334717, + "y": 472.8377799987793, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "edbcab35.7a44e8", + "type": "switchNode", + "name": "switch outputBandwidth", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'outputBandwidth'`\">\n", + "comments": "", + "outputs": 1, + "x": 861.8953742980957, + "y": 518.3765506744385, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "9785a401.84f478" + ] + ] + }, + { + "id": "9785a401.84f478", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1045.8955707550049, + "y": 518.3766593933105, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "29877f00.328f52" + ] + ] + }, + { + "id": "29877f00.328f52", + "type": "set", + "name": "set outputBandwidth", + "xml": "<set>\n<parameter name='prop.wan.outputBandwidth' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1242.2293453216553, + "y": 511.8377628326416, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "19863ae8.c2ed05", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 840.8953132629395, + "y": 183.3767032623291, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "c907441.ebe9bb8" + ] + ] + }, + { + "id": "c907441.ebe9bb8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1032.8955574035645, + "y": 184.3767328262329, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "1126e041.4a24d" + ] + ] + }, + { + "id": "1126e041.4a24d", + "type": "set", + "name": "set description", + "xml": "<set>\n<parameter name='prop.wan.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1183.2295608520508, + "y": 183.8379421234131, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "743ccae1.1d4ed4", + "type": "switchNode", + "name": "switch portNumber", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'portNumber'`\">\n", + "comments": "", + "outputs": 1, + "x": 844.228572845459, + "y": 291.9943332672119, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "ebcd50b1.0b3d6" + ] + ] + }, + { + "id": "ebcd50b1.0b3d6", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1035.228744506836, + "y": 294.9943628311157, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "a1a449ce.d26a18" + ] + ] + }, + { + "id": "a1a449ce.d26a18", + "type": "set", + "name": "set portNumber", + "xml": "<set>\n<parameter name='prop.wan.portNumber' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1189.2290725708008, + "y": 294.5943775177002, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "40a2ce76.5acb8", + "type": "switchNode", + "name": "switch portType", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'portType'`\">\n", + "comments": "", + "outputs": 1, + "x": 834.1236763000488, + "y": 255.96763801574707, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "6ea5c966.7c8868" + ] + ] + }, + { + "id": "6ea5c966.7c8868", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1029.123764038086, + "y": 255.96766757965088, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "f40a6475.4548d8" + ] + ] + }, + { + "id": "f40a6475.4548d8", + "type": "set", + "name": "set portType", + "xml": "<set>\n<parameter name='prop.wan.portType' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1176.1240921020508, + "y": 256.56768226623535, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "90cd2791.ea5778", + "type": "set", + "name": "set transportnetworkName", + "xml": "<set>\n<parameter name='prop.wan.transportNetworkName' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1288.9998302459717, + "y": 437.38701152801514, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "c9247859.1c5528", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1077.6659240722656, + "y": 438.92592906951904, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "90cd2791.ea5778" + ] + ] + }, + { + "id": "52f8113f.08404", + "type": "switchNode", + "name": "switch transportnetworkName", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'transportNetworkName'`\">\n", + "comments": "", + "outputs": 1, + "x": 878.6657485961914, + "y": 442.9256591796875, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "c9247859.1c5528" + ] + ] + }, + { + "id": "f51dc11b.c63d", + "type": "switchNode", + "name": "switch id", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "comments": "", + "outputs": 1, + "x": 825.999340057373, + "y": 117.38670539855957, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "ebf6555a.abbb88" + ] + ] + }, + { + "id": "ebf6555a.abbb88", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1026.9994812011719, + "y": 115.3867359161377, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "1a802dda.2caca2" + ] + ] + }, + { + "id": "1a802dda.2caca2", + "type": "set", + "name": "set id", + "xml": "<set>\n<parameter name='prop.wan.id' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1168.999828338623, + "y": 110.98684310913086, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "d34e678f.eeed98", + "type": "switchNode", + "name": "switch devicePortId", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'devicePortId'`\">\n", + "comments": "", + "outputs": 1, + "x": 847.0000610351562, + "y": 563.0000381469727, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "67b4d68f.872058" + ] + ] + }, + { + "id": "67b4d68f.872058", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1046.0002269744873, + "y": 557.000114440918, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "8e605ff5.22a2d" + ] + ] + }, + { + "id": "8e605ff5.22a2d", + "type": "set", + "name": "set devicePortId", + "xml": "<set>\n<parameter name='prop.wan.devicePortId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1245.3339710235596, + "y": 556.4612121582031, + "z": "1a0d2992.253ae6", + "wires": [] + }, + { + "id": "54c67966.b6a9c8", + "type": "switchNode", + "name": "switch wanPortId", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'wanPortId'`\">\n", + "comments": "", + "outputs": 1, + "x": 837.0000610351562, + "y": 599.0000400543213, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "cda45636.504778" + ] + ] + }, + { + "id": "cda45636.504778", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1048.0002250671387, + "y": 592.0001173019409, + "z": "1a0d2992.253ae6", + "wires": [ + [ + "651ea7f2.7fd2a8" + ] + ] + }, + { + "id": "651ea7f2.7fd2a8", + "type": "set", + "name": "set wanPortId", + "xml": "<set>\n<parameter name='prop.wan.wanPortId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1245.3339710235596, + "y": 596.4612121582031, + "z": "1a0d2992.253ae6", + "wires": [] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.json new file mode 100644 index 00000000..1f6af4fe --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.json @@ -0,0 +1,1709 @@ +[ + { + "id": "fea5a9bd.a03d18", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 86.00390625, + "y": 44.999999046325684, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "e45f8bd6.497e68" + ] + ] + }, + { + "id": "e45f8bd6.497e68", + "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": 234.2895965576172, + "y": 95.23810768127441, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "f0f23207.f8f43" + ] + ] + }, + { + "id": "f0f23207.f8f43", + "type": "method", + "name": "method sdwan-vnf-topology-operation-wanport-activate", + "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-activate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 237.43252563476562, + "y": 180.00003147125244, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "32849d64.f1ae32" + ] + ] + }, + { + "id": "32849d64.f1ae32", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 300.67066192626953, + "y": 785.6669883728027, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "dc92d74f.dca7a8", + "1cf85990.ed3b86", + "b4c4037f.4ac1e", + "f3c230b1.3312b", + "ac816a8a.6fb1f8", + "e9d0f6cd.99c098", + "62f05310.c79d2c", + "ca279788.45f118", + "aece4931.30eed8", + "d9e42142.36e4c", + "eaa46981.c8da08", + "2847803.c88858", + "a3465abe.51b3e8", + "ea6762c6.702c5", + "33c90daa.1c8182", + "81b0e70b.0576d8", + "e220c2f5.e3641", + "cd49784f.a3cd48" + ] + ] + }, + { + "id": "dc92d74f.dca7a8", + "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": 639.3383979797363, + "y": 1527.3344058990479, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "eaa46981.c8da08", + "type": "execute", + "name": "execute RestApiCallNode device port create", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-port.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/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=\"portResp\"/>\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": 715.3380165100098, + "y": 780.8894968032837, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "65c0152d.40a98c", + "6523c3cc.277f2c" + ] + ] + }, + { + "id": "65c0152d.40a98c", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 964.3380756378174, + "y": 794.889702796936, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "9cca9a95.c82758" + ] + ] + }, + { + "id": "6523c3cc.277f2c", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 964.3380756378174, + "y": 756.8895382881165, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "d75e1634.f465a8" + ] + ] + }, + { + "id": "d75e1634.f465a8", + "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 device port rest api\" />\n", + "comments": "", + "x": 1108.3384094238281, + "y": 755.8895378112793, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "9cca9a95.c82758", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1111.3380870819092, + "y": 795.8895416259766, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "a3465abe.51b3e8", + "type": "execute", + "name": "execute RestApiCallNode get transport network info", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-network-orchestration.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/network-orchestration-resources'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"transportNetworksResp\"/>\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": 738.0043678283691, + "y": 960.0006022453308, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "91b71ecc.ea421", + "dad0aff7.4b6c2" + ] + ] + }, + { + "id": "81b0e70b.0576d8", + "type": "execute", + "name": "execute RestApiCallNode wan port create", + "xml": "<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": 711.0044593811035, + "y": 1197.0006504058838, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "b0038d4b.581a3", + "fdc236b1.efb848" + ] + ] + }, + { + "id": "1cf85990.ed3b86", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 697.0248413085938, + "y": 124.02091121673584, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "d1aa4aa.5bcccb8", + "7a701067.ec473", + "6e75ccb1.58cf34" + ] + ] + }, + { + "id": "d1aa4aa.5bcccb8", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 949.0248756408691, + "y": 125.02099227905273, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "4988f92c.8e1ab8" + ] + ] + }, + { + "id": "4988f92c.8e1ab8", + "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": 1110.8026237487793, + "y": 104.90993928909302, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "7a701067.ec473", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 942.0252838134766, + "y": 158.02099609375, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "ba03b0d7.0be36" + ] + ] + }, + { + "id": "ba03b0d7.0be36", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 960.2947769165039, + "y": 320.5755786895752, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "24648014.ff824", + "5aa1ffdc.05015", + "a65a9125.dc54c", + "ae97242b.dc5558", + "acc92682.3c6fd8" + ] + ] + }, + { + "id": "24648014.ff824", + "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": 1245.3109436035156, + "y": 150.44955730438232, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "1aa311e.b073aee" + ] + ] + }, + { + "id": "5aa1ffdc.05015", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1171.612247467041, + "y": 296.4327926635742, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "93a97c9.4fbf08" + ] + ] + }, + { + "id": "93a97c9.4fbf08", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1319.0408897399902, + "y": 296.0042028427124, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "c3cf31a6.b52f" + ] + ] + }, + { + "id": "b192d0.2d48dd3", + "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": 1618.7401733398438, + "y": 149.6997194290161, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "801ede81.82f43" + ] + ] + }, + { + "id": "c3cf31a6.b52f", + "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": 1468.4696159362793, + "y": 297.14712047576904, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "801ede81.82f43", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1773.6921653747559, + "y": 150.59239864349365, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "7772ec9b.efcac4" + ] + ] + }, + { + "id": "db3e11bd.eb0ca", + "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": 2181.224250793457, + "y": 60.34245681762695, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "6e75ccb1.58cf34", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 950.9936256408691, + "y": 88.98967838287354, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "4988f92c.8e1ab8" + ] + ] + }, + { + "id": "cd49784f.a3cd48", + "type": "set", + "name": "set device PortId and wan portId 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='devicePortId' />\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='`$prop.wan.devicePortId`' />\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 + 1].name' value='wanPortId' />\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 + 1].value' value='`$prop.wan.wanPortId`' />\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 + 2`' />\n\n\n\n\n", + "comments": "", + "x": 734.9947814941406, + "y": 1318.9909219741821, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "abae1674.12b3d8", + "type": "comment", + "name": "Get siteId from site resource created for this service", + "info": "", + "comments": "", + "x": 722.9938888549805, + "y": 309.32321548461914, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "1aa311e.b073aee", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1464.6605758666992, + "y": 149.98963737487793, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "b192d0.2d48dd3" + ] + ] + }, + { + "id": "b4c4037f.4ac1e", + "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": 672.5501022338867, + "y": 1406.2128171920776, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "f3c230b1.3312b", + "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": 689.9945640563965, + "y": 1445.990653038025, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "da8588c8.55f098", + "type": "update", + "name": "save SDWAN wan port instance configuration in AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config' \n key='wan-port-config.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name=\"id\" value=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`\" />\n<parameter name='operational-status' value='Active' />\n<parameter name='device-port-id' value='`$prop.wan.devicePortId`' />\n<parameter name='wan-port-id' value='`$prop.wan.wanPortId`' />\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", + "comments": "", + "outputs": 1, + "x": 752.6574897766113, + "y": 1485.1381149291992, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "d902b620.732c58", + "type": "set", + "name": "set prop.wan.transportNetworkId", + "xml": "<set>\n<parameter name='prop.wan.transportNetworkId' value='`$transportNetworksResp[$tidx].id`' />\n", + "comments": "", + "x": 1492.995449066162, + "y": 1036.9906740188599, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "ac816a8a.6fb1f8", + "type": "for", + "name": "for loop sidx - Get siteId from servicedata", + "xml": "<for index=\"sidx\" start=\"0\" end=\"`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 702.9939117431641, + "y": 459.98987197875977, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "f946d98b.8721e8" + ] + ] + }, + { + "id": "6e3361b7.a1918", + "type": "switchNode", + "name": "switch siteId", + "xml": "<switch test=\"`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].name == 'siteId'`\">\n", + "comments": "", + "outputs": 1, + "x": 1133.994239807129, + "y": 460.9900026321411, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "628588c5.8c4528" + ] + ] + }, + { + "id": "628588c5.8c4528", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1271.9946975708008, + "y": 458.98998737335205, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "b0597272.0a65f" + ] + ] + }, + { + "id": "b0597272.0a65f", + "type": "set", + "name": "set prop.wan.siteId", + "xml": "<set>\n<parameter name='prop.wan.siteId' value='`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].value`' />\n\n\n", + "comments": "", + "x": 1435.9947319030762, + "y": 460.58984088897705, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "33c90daa.1c8182", + "type": "execute", + "name": "execute split ip and mask", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.ipAddress`'/>\n<parameter name=\"regex\" value=\"/\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"ipandMask\"/>\n", + "comments": "", + "outputs": 1, + "x": 661.9942359924316, + "y": 1105.323642730713, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "d21f243c.e29608", + "61bef1c0.f032f" + ] + ] + }, + { + "id": "61bef1c0.f032f", + "type": "failure", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 862.994255065918, + "y": 1083.323634147644, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "dba59ea6.fb87c" + ] + ] + }, + { + "id": "d21f243c.e29608", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 862.9942588806152, + "y": 1124.3236379623413, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "5e04d6ae.a87ea8" + ] + ] + }, + { + "id": "dba59ea6.fb87c", + "type": "set", + "name": "set ipAddress prefixLength", + "xml": "<set>\n<parameter name='prop.wan.ip-address' value='`$ipandMask[0]`' />\n<parameter name='prop.wan.prefixLength' value='`$ipandMask[1]`' />", + "comments": "", + "x": 1059.9942741394043, + "y": 1081.323634147644, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "5e04d6ae.a87ea8", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while splitting sna1_route\" />\n", + "comments": "", + "x": 1017.9942665100098, + "y": 1121.323637008667, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "aece4931.30eed8", + "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": 696.4940643310547, + "y": 559.9899234771729, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "acfff48e.adde88", + "cfdab1ae.df7ca", + "3d21e606.ef145a" + ] + ] + }, + { + "id": "acfff48e.adde88", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 909.4941635131836, + "y": 521.989951133728, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "caaa91ba.7a205" + ] + ] + }, + { + "id": "cfdab1ae.df7ca", + "type": "not-found", + "name": "not-found", + "xml": "<outcome value='not-found'>\n", + "comments": "", + "outputs": 1, + "x": 911.9850463867188, + "y": 557.5639877319336, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "43a0c2ab.03d7fc" + ] + ] + }, + { + "id": "3d21e606.ef145a", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 907.3180541992188, + "y": 593.897346496582, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "5c31ca17.841574" + ] + ] + }, + { + "id": "5c31ca17.841574", + "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": 1061.0905456542969, + "y": 591.3364334106445, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "43a0c2ab.03d7fc", + "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": 1057.5564422607422, + "y": 555.8496751785278, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "caaa91ba.7a205", + "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": 1069.9942741394043, + "y": 519.9898910522461, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "e9d0f6cd.99c098", + "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=\"sdwan-wanport-vnf-topology-operation-activate\"/>\n<parameter name=\"field3\" value=\"SDWAN-Activate\"/>\n", + "comments": "", + "outputs": 1, + "x": 615.0040016174316, + "y": 180.00002908706665, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "62f05310.c79d2c", + "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": 651.3061256408691, + "y": 215.0000729560852, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "d9e42142.36e4c", + "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": 699.004207611084, + "y": 649.6669254302979, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "dbf3792f.06d4c8", + "ba692605.0e2fb8" + ] + ] + }, + { + "id": "dbf3792f.06d4c8", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 927.004337310791, + "y": 631.6669187545776, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "2ce328a2.bcfc88" + ] + ] + }, + { + "id": "2ce328a2.bcfc88", + "type": "set", + "name": "set token-id", + "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", + "comments": "", + "x": 1069.0043449401855, + "y": 630.666919708252, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "eb7128c2.0605b8", + "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 get token rest api\" />\n", + "comments": "", + "x": 1075.0043449401855, + "y": 668.059907913208, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "ba692605.0e2fb8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 926.254337310791, + "y": 667.3098258972168, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "eb7128c2.0605b8" + ] + ] + }, + { + "id": "ea6762c6.702c5", + "type": "for", + "name": "for loop tidx - Get transportNetwork ID", + "xml": "<for index=\"tidx\" start=\"0\" end=\"`$transportNetworksResp.transportNetworks_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 695.0043983459473, + "y": 995.3335218429565, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "f45abeac.b55fa" + ] + ] + }, + { + "id": "f45abeac.b55fa", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 911.0047798156738, + "y": 996.3337659835815, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "8c6e090d.8c7a88" + ] + ] + }, + { + "id": "8c6e090d.8c7a88", + "type": "switchNode", + "name": "switch transportNetworkName same", + "xml": "<switch test=\"`$transportNetworksResp.transportNetworks[$tidx].name == $prop.wan.transportNetworkName`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1132.0050621032715, + "y": 994.6670722961426, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "9c44e433.9ec8a8" + ] + ] + }, + { + "id": "9c44e433.9ec8a8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1345.0045127868652, + "y": 994.6669902801514, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "d902b620.732c58" + ] + ] + }, + { + "id": "570db1f7.cbe77", + "type": "switchNode", + "name": "switch ActivateSDWANDeviceInstance", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`\">\n \n \n\n", + "comments": "", + "outputs": 1, + "x": 1559.3375091552734, + "y": 227.00005626678467, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "8b1ff3eb.69d25" + ] + ] + }, + { + "id": "8b1ff3eb.69d25", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1782.3375186920166, + "y": 227.00005626678467, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "48e7d6a0.748938" + ] + ] + }, + { + "id": "c26d092c.4da7c8", + "type": "set", + "name": "set tmp.devicevidx", + "xml": "<set>\n<parameter name='tmp.devicevidx' value='`$vidx`' />\n\n", + "comments": "", + "x": 2747.3368530273438, + "y": 658.0000810623169, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "a65a9125.dc54c", + "type": "switchNode", + "name": "switch tmp.devicevidx", + "xml": "<switch test=\"`$tmp.devicevidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1212.3374366760254, + "y": 385.0001187324524, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "432fe6b0.129348" + ] + ] + }, + { + "id": "432fe6b0.129348", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1396.7660026550293, + "y": 385.57155561447144, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "4e59531.7ac0fac" + ] + ] + }, + { + "id": "4e59531.7ac0fac", + "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=\"ActivateSDWANDeviceInstance not found in service-data\" />\n", + "comments": "", + "x": 1537.1947441101074, + "y": 385.7144351005554, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "81f1ba7c.aa1808", + "type": "comment", + "name": "Get deviceId from device resource created for this service", + "info": "", + "comments": "", + "x": 2196.6707916259766, + "y": 324.3333349227905, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "c653d564.103fb8", + "type": "for", + "name": "for loop didx - Get deviceId from servicedata", + "xml": "<for index=\"didx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 2182.671001434326, + "y": 247.99997901916504, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "b9b11207.7934a" + ] + ] + }, + { + "id": "7c90973.05bfa68", + "type": "switchNode", + "name": "switch name (DeviceName)", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$didx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 2200.671600341797, + "y": 386.00022411346436, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "41a73401.a0e75c" + ] + ] + }, + { + "id": "41a73401.a0e75c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 2402.672092437744, + "y": 380.0002841949463, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "edf1bf9c.83bf3" + ] + ] + }, + { + "id": "f946d98b.8721e8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 965.0041046142578, + "y": 460.6666965484619, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "6e3361b7.a1918" + ] + ] + }, + { + "id": "b9b11207.7934a", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1975.003890991211, + "y": 384.6667251586914, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "7c90973.05bfa68" + ] + ] + }, + { + "id": "f5314270.2417a", + "type": "switchNode", + "name": "switch deviceId", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`\">\n", + "comments": "", + "outputs": 1, + "x": 3046.0050506591797, + "y": 598.6670217514038, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "6eb2a758.9628c8" + ] + ] + }, + { + "id": "6eb2a758.9628c8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 3199.0054206848145, + "y": 599.6670989990234, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "2a323a58.ea63c6" + ] + ] + }, + { + "id": "2a323a58.ea63c6", + "type": "set", + "name": "set prop.wan.deviceId", + "xml": "<set>\n<parameter name='prop.wan.deviceId' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />\n", + "comments": "", + "x": 3368.0060272216797, + "y": 598.2671337127686, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "48e7d6a0.748938", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1923.6708374023438, + "y": 249.0000762939453, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "c653d564.103fb8" + ] + ] + }, + { + "id": "edf1bf9c.83bf3", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 2221.0051345825195, + "y": 463.00025367736816, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "8e851a14.33c2e8" + ] + ] + }, + { + "id": "15e6beda.ef5931", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 2610.0058403015137, + "y": 466.0003786087036, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "8b8e8a8.6844f78" + ] + ] + }, + { + "id": "7772ec9b.efcac4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1912.3376846313477, + "y": 151.00003242492676, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "db3e11bd.eb0ca", + "3f24458e.06f9fa", + "a565af06.127cb", + "9a2c7dc6.4b893" + ] + ] + }, + { + "id": "e220c2f5.e3641", + "type": "for", + "name": "for loop wanPortidx - Get wanPortId", + "xml": "<for index=\"wanPortidx\" start=\"0\" end=\"`$wanPortResp_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 693.3374061584473, + "y": 1231.0003681182861, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "50e167ac.c7e768" + ] + ] + }, + { + "id": "50e167ac.c7e768", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 910.3379402160645, + "y": 1232.000452041626, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "97aa93ae.f7018" + ] + ] + }, + { + "id": "97aa93ae.f7018", + "type": "switchNode", + "name": "switch deviceId same", + "xml": "<switch test=\"`$wanPortResp[$wanPortidx].deviceId == $prop.deviceId`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1084.3385925292969, + "y": 1239.3339138031006, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "3a30ba64.e39ed6" + ] + ] + }, + { + "id": "3a30ba64.e39ed6", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1252.3377742767334, + "y": 1228.333701133728, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "3ba0cd34.c2b072" + ] + ] + }, + { + "id": "3ba0cd34.c2b072", + "type": "set", + "name": "set prop.wan.wanPortId", + "xml": "<set>\n<parameter name='prop.wan.wanPortId' value='`$wanPortResp[$wanPortidx].id`' />\n", + "comments": "", + "x": 1334.3284950256348, + "y": 1278.6572723388672, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "2847803.c88858", + "type": "for", + "name": "for loop portidx - Get device portId", + "xml": "<for index=\"portidx\" start=\"0\" end=\"`$portResp_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 686.0040702819824, + "y": 831.333553314209, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "ec540fb0.f5947" + ] + ] + }, + { + "id": "ec540fb0.f5947", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 887.0044059753418, + "y": 832.3337163925171, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "b9169b7.ff5dd68" + ] + ] + }, + { + "id": "b9169b7.ff5dd68", + "type": "switchNode", + "name": "switch deviceId same", + "xml": "<switch test=\"`$portResp[$portidx].deviceId == $prop.deviceId`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1046.0049057006836, + "y": 830.6671323776245, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "165db6.9ea6824a" + ] + ] + }, + { + "id": "165db6.9ea6824a", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1219.0042743682861, + "y": 831.6669683456421, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "a1161094.a324" + ] + ] + }, + { + "id": "a1161094.a324", + "type": "set", + "name": "set prop.wan.devicePortId", + "xml": "<set>\n<parameter name='prop.wan.devicePortId' value='`$portResp[$portidx].id`' />\n", + "comments": "", + "x": 1379.99515914917, + "y": 882.9906177520752, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "69fec1ed.0fee", + "type": "comment", + "name": "Create port", + "info": "", + "comments": "", + "x": 617.0039558410645, + "y": 747.3335208892822, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "595aa329.443d7c", + "type": "comment", + "name": "Get network id", + "info": "", + "comments": "", + "x": 613.0039558410645, + "y": 922.3334903717041, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "a89f747e.6de7f8", + "type": "comment", + "name": "Create wan port", + "info": "", + "comments": "", + "x": 628.0041046142578, + "y": 1069.3336572647095, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "fdc236b1.efb848", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 997.0040283203125, + "y": 1157.000238418579, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "a6e9f6d5.ea4dd8" + ] + ] + }, + { + "id": "b0038d4b.581a3", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 997.0040245056152, + "y": 1197.0004034042358, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "be9a3635.dfb8c8" + ] + ] + }, + { + "id": "be9a3635.dfb8c8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1141.0040397644043, + "y": 1196.0002403259277, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "a6e9f6d5.ea4dd8", + "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 wan port rest api\" />\n", + "comments": "", + "x": 1139.0043601989746, + "y": 1156.000238418579, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "dad0aff7.4b6c2", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1044.0039558410645, + "y": 908.0001773834229, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "63d1b7a0.e4fbc8" + ] + ] + }, + { + "id": "91b71ecc.ea421", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1044.0039520263672, + "y": 948.0003423690796, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "45c0e517.c6f5ac" + ] + ] + }, + { + "id": "45c0e517.c6f5ac", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1188.0039672851562, + "y": 947.0001792907715, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "63d1b7a0.e4fbc8", + "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 Get transport network info rest api\" />\n", + "comments": "", + "x": 1186.0042877197266, + "y": 907.0001773834229, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "a565af06.127cb", + "type": "call", + "name": "call sdwan-get-wan-param", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-wan-param' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 2184.670539855957, + "y": 157.000075340271, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "3f24458e.06f9fa", + "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": 2153.670539855957, + "y": 107.00009250640869, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "7cd20fc3.2681b", + "type": "comment", + "name": "This is also required for template parameters update", + "info": "", + "comments": "", + "x": 2549.0043029785156, + "y": 203.0000352859497, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "400dec0b.3df124", + "type": "switchNode", + "name": "switch ActivateSiteInstance", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSiteInstance'`\">\n \n \n\n", + "comments": "", + "outputs": 1, + "x": 1522.0043487548828, + "y": 192.00004863739014, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "a948b445.19bab8" + ] + ] + }, + { + "id": "a948b445.19bab8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1718.0045318603516, + "y": 193.00004863739014, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "50e42e52.250bb" + ] + ] + }, + { + "id": "50e42e52.250bb", + "type": "set", + "name": "set tmp.siteVidx", + "xml": "<set>\n<parameter name='tmp.siteVidx' value='`$vidx`' />\n<parameter name='ctx.site.' value='`$service-data.vnfs.vnf[$vidx].`' />\n\n", + "comments": "", + "x": 1904.0038299560547, + "y": 190.0000524520874, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "ae97242b.dc5558", + "type": "switchNode", + "name": "switch tmp.siteVidx", + "xml": "<switch test=\"`$tmp.siteVidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1195.6706581115723, + "y": 334.00006914138794, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "31115c1a.df8dd4" + ] + ] + }, + { + "id": "31115c1a.df8dd4", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1370.0993690490723, + "y": 334.5715208053589, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "efdc94d7.becbf8" + ] + ] + }, + { + "id": "efdc94d7.becbf8", + "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=\"ActivateSiteInstance not found in service-data\" />\n", + "comments": "", + "x": 1512.5280876159668, + "y": 333.71438360214233, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "8e851a14.33c2e8", + "type": "switchNode", + "name": "switch deviceName match", + "xml": "<switch test=\"`$prop.wan.deviceName == $service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$didx].value`\">\n\n\n", + "comments": "", + "outputs": 1, + "x": 2426.671859741211, + "y": 464.00031757354736, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "15e6beda.ef5931" + ] + ] + }, + { + "id": "8b8e8a8.6844f78", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 2509.3377990722656, + "y": 538.0001611709595, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "7124d1e8.c1afc", + "c26d092c.4da7c8" + ] + ] + }, + { + "id": "7124d1e8.c1afc", + "type": "for", + "name": "for loop deviceidx - Get deviceId from servicedata", + "xml": "<for index=\"deviceidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">\n \n \n", + "comments": "", + "outputs": 1, + "x": 2789.5349502563477, + "y": 533.0313501358032, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "29242480.1ab1ec" + ] + ] + }, + { + "id": "29242480.1ab1ec", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 2866.5356826782227, + "y": 597.0314493179321, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "f5314270.2417a" + ] + ] + }, + { + "id": "9a2c7dc6.4b893", + "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=\".....\"/>\n<parameter name=\"field3\" value=\"prop.wan.deviceName\"/>\n<parameter name=\"field4\" value='`$prop.wan.deviceName`'/>\n", + "comments": "", + "outputs": 1, + "x": 2112.535285949707, + "y": 205.03126621246338, + "z": "3545e2b7.8c73ce", + "wires": [ + [] + ] + }, + { + "id": "acc92682.3c6fd8", + "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": 1238.003978729248, + "y": 228.00001621246338, + "z": "3545e2b7.8c73ce", + "wires": [ + [ + "570db1f7.cbe77", + "400dec0b.3df124" + ] + ] + }, + { + "id": "ca279788.45f118", + "type": "set", + "name": "copy input data to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].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.' />", + "comments": "", + "x": 685.03515625, + "y": 1360.5311269760132, + "z": "3545e2b7.8c73ce", + "wires": [] + }, + { + "id": "a2ce1e1.66d8de", + "type": "comment", + "name": "TODO: split ip/mask", + "info": "", + "comments": "", + "x": 1059.00390625, + "y": 1043.50390625, + "z": "3545e2b7.8c73ce", + "wires": [] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.json new file mode 100644 index 00000000..68bc52c8 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.json @@ -0,0 +1,443 @@ +[ + { + "id": "f7c47e43.722a8", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 131.00390625, + "y": 50.00390625, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "df50ad92.5b9f3" + ] + ] + }, + { + "id": "df50ad92.5b9f3", + "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": 230.28960418701172, + "y": 124.24201414268464, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "7a9c4555.b9551c" + ] + ] + }, + { + "id": "7a9c4555.b9551c", + "type": "method", + "name": "method sdwan-vnf-topology-operation-wanport-create", + "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-create' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 254.43252563476562, + "y": 213.0039258003235, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "19a1bf06.151541" + ] + ] + }, + { + "id": "19a1bf06.151541", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 362.6706085205078, + "y": 420.67058992385864, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "a1f3b1e9.35545", + "f570a4d2.187c18", + "90591b72.96d098", + "b3840dbc.6104c", + "4c4bb443.a3389c", + "44f64d1d.aa7064", + "5baacb87.e7da64", + "f0cbc16c.cad4b", + "a062fc34.476f9", + "cf3398f4.969708", + "b5b128b4.4b50a8", + "795a527a.112ffc", + "f82a7101.bfc5b" + ] + ] + }, + { + "id": "a1f3b1e9.35545", + "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": 652.3375396728516, + "y": 872.3377075195312, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "f570a4d2.187c18", + "type": "save", + "name": "save sdwan device port configuration in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config' \n key='wan-port-config.id = $prop.vnf-index' >\n<parameter name=\"id\" value=\"`$prop.vnf-index`\" />\n<parameter name=\"name\" value=\"`$prop.wan.name`\" />\n<parameter name=\"device-id\" value=\"`$prop.wan.deviceName`\" />\n<parameter name='vlan-id' value=\"`$prop.wan.vlanId`\" />\n<parameter name=\"ip-address\" value=\"`$prop.wan.ipAdddress`\" />\n<parameter name=\"provider-ip-address\" value=\"`$prop.wan.providerIpAddress`\" />\n<parameter name=\"input-bandwidth\" value=\"`$prop.wan.inputBandwidth`\" />\n<parameter name=\"output-bandwidth\" value=\"`$prop.wan.outputBandwidth`\" />\n<parameter name=\"description\" value=\"`$prop.wan.description`\" />\n<parameter name=\"port-type\" value=\"`$prop.wan.portType`\" />\n<parameter name=\"port-number\" value=\"`$prop.wan.portNumber`\" />\n<parameter name=\"transport-network-name\" value=\"`$prop.wan.transportNetworkName`\" />\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-index + '/vnf-data/'` \" />\n", + "comments": "", + "outputs": 1, + "x": 739.0042953491211, + "y": 779.5599503517151, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "90591b72.96d098", + "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": 717.0043640136719, + "y": 446.67932987213135, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "b4473f3b.51629" + ] + ] + }, + { + "id": "b4473f3b.51629", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 931.7827072143555, + "y": 444.23491382598877, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "3e1cd824.f76ba8", + "706d3a5.3e853c4" + ] + ] + }, + { + "id": "8b4706cb.23dc38", + "type": "comment", + "name": "set input parameters", + "info": "", + "comments": "", + "x": 935.6775550842285, + "y": 572.6009178161621, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "b3840dbc.6104c", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 727.9937286376953, + "y": 143.60080528259277, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "2465f202.f0a9ce", + "506845c6.11b4dc" + ] + ] + }, + { + "id": "2465f202.f0a9ce", + "type": "other", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 964.7079563140869, + "y": 133.7436351776123, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "75a2f10a.06bc7" + ] + ] + }, + { + "id": "506845c6.11b4dc", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 960.1366729736328, + "y": 172.02948570251465, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "4460ebdc.a1f384" + ] + ] + }, + { + "id": "4460ebdc.a1f384", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1092.8508682250977, + "y": 177.02942562103271, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "7e7a019f.eac06", + "6d299d3a.328f54" + ] + ] + }, + { + "id": "75a2f10a.06bc7", + "type": "set", + "name": "set vnf-index=0", + "xml": "<set>\n<parameter name='vnf-index' value='0' />\n", + "comments": "", + "x": 1120.9937705993652, + "y": 132.74371528625488, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "7e7a019f.eac06", + "type": "set", + "name": "set vnf-index = vnf_length", + "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n", + "comments": "", + "x": 1321.993782043457, + "y": 149.31512928009033, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "6d299d3a.328f54", + "type": "for", + "name": "for each existing VNF", + "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", + "comments": "", + "outputs": 1, + "x": 1304.422248840332, + "y": 189.31509113311768, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "984f572c.ac6fc8" + ] + ] + }, + { + "id": "984f572c.ac6fc8", + "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": 1662.7080307006836, + "y": 188.88659477233887, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "51f1d598.2ca1cc" + ] + ] + }, + { + "id": "bbaa30a9.5e134", + "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": 2105.5650024414062, + "y": 189.4580249786377, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "51f1d598.2ca1cc", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1967.9936714172363, + "y": 188.45802116394043, + "z": "61d54760.a4d0c8", + "wires": [ + [ + "bbaa30a9.5e134" + ] + ] + }, + { + "id": "44f64d1d.aa7064", + "type": "execute", + "name": "execute generate-vnf-index", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n", + "comments": "", + "outputs": 1, + "x": 706.9936218261719, + "y": 275.60077476501465, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "4c4bb443.a3389c", + "type": "set", + "name": "set new vnf_length", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n", + "comments": "", + "x": 680.9936065673828, + "y": 240.60078287124634, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "f0cbc16c.cad4b", + "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": 719.9936294555664, + "y": 691.6010417938232, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "5baacb87.e7da64", + "type": "set", + "name": "copy input data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-index`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n", + "comments": "", + "x": 659.8468208312988, + "y": 645.5972957611084, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "a062fc34.476f9", + "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=\"wan-port-config\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/wan-port-configs/wan-port-config/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"wan-port-config.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />", + "comments": "", + "outputs": 1, + "x": 705.9936294555664, + "y": 827.6010503768921, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "cf3398f4.969708", + "type": "set", + "name": "set vnf-index and vnf-object-path", + "xml": "<set>\n<parameter name='vnfId' value='`$prop.vnf-index`' />\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-index + '/vnf-data/'` \" />", + "comments": "", + "x": 712.9936294555664, + "y": 735.601044178009, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "b5b128b4.4b50a8", + "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=\"sdwan-wanport-vnf-topology-operation-create\"/>\n<parameter name=\"field3\" value=\"SDWAN-Config\"/>\n", + "comments": "", + "outputs": 1, + "x": 645.0039329528809, + "y": 328.0039367675781, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "e311900d.ece88", + "type": "comment", + "name": "Take the parameter names by removing prefix", + "info": "", + "comments": "", + "x": 825.0042266845703, + "y": 416.0039920806885, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "3e1cd824.f76ba8", + "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": 1145.038818359375, + "y": 394.9830369949341, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "706d3a5.3e853c4", + "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": 1113.4833221435547, + "y": 463.98312282562256, + "z": "61d54760.a4d0c8", + "wires": [] + }, + { + "id": "795a527a.112ffc", + "type": "call", + "name": "call sdwan-get-wan-param", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-wan-param' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 705.0043487548828, + "y": 576.0042514801025, + "z": "61d54760.a4d0c8", + "wires": [ + [] + ] + }, + { + "id": "f82a7101.bfc5b", + "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": 671.0039367675781, + "y": 544.004054069519, + "z": "61d54760.a4d0c8", + "wires": [] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-deactivate.json new file mode 100644 index 00000000..ca38d84a --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-deactivate.json @@ -0,0 +1,724 @@ +[ + { + "id": "e612d5f5.8b6538", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 105.00390625, + "y": 55.99999871850014, + "z": "f765645f.7b8058", + "wires": [ + [ + "150c6234.3faf1e" + ] + ] + }, + { + "id": "150c6234.3faf1e", + "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": 253.2895965576172, + "y": 106.23810735344887, + "z": "f765645f.7b8058", + "wires": [ + [ + "1b2d2c3d.3c9464" + ] + ] + }, + { + "id": "1b2d2c3d.3c9464", + "type": "method", + "name": "method sdwan-vnf-topology-operation-wanport-deactivate", + "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-deactivate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 287.4325180053711, + "y": 190.00001588463783, + "z": "f765645f.7b8058", + "wires": [ + [ + "bf701672.487a88" + ] + ] + }, + { + "id": "bf701672.487a88", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 262.6706123352051, + "y": 574.6666819155216, + "z": "f765645f.7b8058", + "wires": [ + [ + "b889ffd5.0fa63", + "f33aa2.256e456", + "ca99ad99.37765", + "26cf633a.338b9c", + "554bc62c.9e5bc8", + "ec3af845.5c1818", + "5ba1424c.f63d5c", + "46594e30.35ca2", + "7caacd63.309604", + "6bdcf104.b48b8", + "13a2d05d.7d396" + ] + ] + }, + { + "id": "b889ffd5.0fa63", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 768.0248603820801, + "y": 99.02095222473145, + "z": "f765645f.7b8058", + "wires": [ + [ + "72446922.dfdc88", + "2e454e9c.4de002", + "34a36311.6884ac" + ] + ] + }, + { + "id": "72446922.dfdc88", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1011.024787902832, + "y": 124.02103519439697, + "z": "f765645f.7b8058", + "wires": [ + [ + "2b15f4dc.0543ec" + ] + ] + }, + { + "id": "2b15f4dc.0543ec", + "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": 1159.8022994995117, + "y": 103.9099702835083, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "2e454e9c.4de002", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1012.0251121520996, + "y": 157.02105808258057, + "z": "f765645f.7b8058", + "wires": [ + [ + "767b5296.07b42c" + ] + ] + }, + { + "id": "767b5296.07b42c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1159.2948150634766, + "y": 146.57558059692383, + "z": "f765645f.7b8058", + "wires": [ + [ + "e6f54805.c662c8", + "150dec3f.ac66f4" + ] + ] + }, + { + "id": "e6f54805.c662c8", + "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": 1404.310775756836, + "y": 98.44958019256592, + "z": "f765645f.7b8058", + "wires": [ + [ + "62dbeb25.9e1404" + ] + ] + }, + { + "id": "150dec3f.ac66f4", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1335.6121292114258, + "y": 146.43275928497314, + "z": "f765645f.7b8058", + "wires": [ + [ + "7f71feab.68d97" + ] + ] + }, + { + "id": "7f71feab.68d97", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1489.0407676696777, + "y": 145.00417232513428, + "z": "f765645f.7b8058", + "wires": [ + [ + "7f6f3eb7.5ba2f" + ] + ] + }, + { + "id": "9c6aa9a4.753d88", + "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": 1775.739356994629, + "y": 95.69969272613525, + "z": "f765645f.7b8058", + "wires": [ + [ + "414b7f38.5b52" + ] + ] + }, + { + "id": "7f6f3eb7.5ba2f", + "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": 1625.4691619873047, + "y": 144.14703464508057, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "414b7f38.5b52", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1814.691505432129, + "y": 150.59241199493408, + "z": "f765645f.7b8058", + "wires": [ + [ + "de28481b.2e84a8" + ] + ] + }, + { + "id": "34a36311.6884ac", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 1007.9935340881348, + "y": 91.98973083496094, + "z": "f765645f.7b8058", + "wires": [ + [ + "2b15f4dc.0543ec" + ] + ] + }, + { + "id": "62dbeb25.9e1404", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1623.6604080200195, + "y": 97.9896411895752, + "z": "f765645f.7b8058", + "wires": [ + [ + "9c6aa9a4.753d88" + ] + ] + }, + { + "id": "f33aa2.256e456", + "type": "set", + "name": "set vnf in service-data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].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\n", + "comments": "", + "x": 723.338077545166, + "y": 747.6668863296509, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "ca99ad99.37765", + "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": 735.8937187194824, + "y": 804.889181137085, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "26cf633a.338b9c", + "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": 778.3380928039551, + "y": 839.6670169830322, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "554bc62c.9e5bc8", + "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": 688.6714630126953, + "y": 928.4448499679565, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "46594e30.35ca2", + "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": 748.5042667388916, + "y": 267.00012239813805, + "z": "f765645f.7b8058", + "wires": [ + [ + "d2393044.02c98", + "de34f71f.564f78", + "165c6807.bce198" + ] + ] + }, + { + "id": "d2393044.02c98", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 967.5042362213135, + "y": 226.00011897087097, + "z": "f765645f.7b8058", + "wires": [ + [ + "af0c4e7e.16054" + ] + ] + }, + { + "id": "de34f71f.564f78", + "type": "not-found", + "name": "not-found", + "xml": "<outcome value='not-found'>\n", + "comments": "", + "outputs": 1, + "x": 970.9952030181885, + "y": 273.5741546154022, + "z": "f765645f.7b8058", + "wires": [ + [ + "46779502.824a2c" + ] + ] + }, + { + "id": "165c6807.bce198", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 966.3282108306885, + "y": 314.9074676036835, + "z": "f765645f.7b8058", + "wires": [ + [ + "d9434b38.eb9228" + ] + ] + }, + { + "id": "d9434b38.eb9228", + "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": 1154.1007671356201, + "y": 310.3466603755951, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "46779502.824a2c", + "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": 1147.566614151001, + "y": 261.8598906993866, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "af0c4e7e.16054", + "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": 1148.0043392181396, + "y": 220.00015768408775, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "13a2d05d.7d396", + "type": "execute", + "name": "execute RestApiCallNode device port delete", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-device-port-del.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports/action/batch-delete'`\" />\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=\"portResp\"/>\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": 781.0044193267822, + "y": 642.666867017746, + "z": "f765645f.7b8058", + "wires": [ + [ + "d7fb77a3.a86188", + "e2af2841.d1f638" + ] + ] + }, + { + "id": "d7fb77a3.a86188", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1027.0044040679932, + "y": 680.6669557094574, + "z": "f765645f.7b8058", + "wires": [ + [ + "d422494c.56c648" + ] + ] + }, + { + "id": "e2af2841.d1f638", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1023.0044841766357, + "y": 634.6668708324432, + "z": "f765645f.7b8058", + "wires": [ + [ + "e8bbadbc.9ad4c" + ] + ] + }, + { + "id": "e8bbadbc.9ad4c", + "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": 1164.0045757293701, + "y": 634.6668717861176, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "d422494c.56c648", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1171.0042705535889, + "y": 678.6668746471405, + "z": "f765645f.7b8058", + "wires": [ + [] + ] + }, + { + "id": "6bdcf104.b48b8", + "type": "execute", + "name": "execute RestApiCallNode wan port delete", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-wan-port-del.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports/action/batch-delete'`\" />\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=\"portResp\"/>\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": 772.0045871734619, + "y": 535.666864156723, + "z": "f765645f.7b8058", + "wires": [ + [ + "de6f5d9a.00d19", + "fe1384f0.e198c8" + ] + ] + }, + { + "id": "de6f5d9a.00d19", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 1005.0046825408936, + "y": 568.6668565273285, + "z": "f765645f.7b8058", + "wires": [ + [ + "fd275e00.86cf8" + ] + ] + }, + { + "id": "fe1384f0.e198c8", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1009.0047626495361, + "y": 504.66693472862244, + "z": "f765645f.7b8058", + "wires": [ + [ + "f44e9eb0.30563" + ] + ] + }, + { + "id": "f44e9eb0.30563", + "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": 1154.004934310913, + "y": 506.66693472862244, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "fd275e00.86cf8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1161.0045261383057, + "y": 566.6668565273285, + "z": "f765645f.7b8058", + "wires": [ + [] + ] + }, + { + "id": "ec3af845.5c1818", + "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": 716.0038948059082, + "y": 142.0000295639038, + "z": "f765645f.7b8058", + "wires": [ + [] + ] + }, + { + "id": "7caacd63.309604", + "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": 765.0041751861572, + "y": 405.66669368743896, + "z": "f765645f.7b8058", + "wires": [ + [ + "187682f0.2e0ced", + "97689994.fe4b58" + ] + ] + }, + { + "id": "187682f0.2e0ced", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", + "comments": "", + "outputs": 1, + "x": 999.0042133331299, + "y": 391.6667184829712, + "z": "f765645f.7b8058", + "wires": [ + [ + "dfaa5b94.faad78" + ] + ] + }, + { + "id": "97689994.fe4b58", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 992.2541751861572, + "y": 437.3095769882202, + "z": "f765645f.7b8058", + "wires": [ + [ + "3f21f41a.0451bc" + ] + ] + }, + { + "id": "3f21f41a.0451bc", + "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 get token rest api\" />\n", + "comments": "", + "x": 1145.0041751861572, + "y": 437.05963802337646, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "dfaa5b94.faad78", + "type": "set", + "name": "set token-id", + "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", + "comments": "", + "x": 1153.0042133331299, + "y": 392.6667184829712, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "de28481b.2e84a8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1955.0040168762207, + "y": 151.00004482269287, + "z": "f765645f.7b8058", + "wires": [ + [ + "a23df7c7.a5b718", + "c1a4bc96.3c58", + "c7716aba.aa75c8" + ] + ] + }, + { + "id": "5ba1424c.f63d5c", + "type": "update", + "name": "save SDWAN wan port instance configuration in AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config' \n key='wan-port-config.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name=\"id\" value=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`\" />\n<parameter name='operational-status' value='PendingDelete' />\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", + "comments": "", + "outputs": 1, + "x": 801.0041923522949, + "y": 881.0004291534424, + "z": "f765645f.7b8058", + "wires": [ + [] + ] + }, + { + "id": "a23df7c7.a5b718", + "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": 2205.0352516174316, + "y": 102.03129148483276, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "c1a4bc96.3c58", + "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": 2177.4815406799316, + "y": 148.6889271736145, + "z": "f765645f.7b8058", + "wires": [] + }, + { + "id": "c7716aba.aa75c8", + "type": "call", + "name": "call sdwan-get-wan-param", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-wan-param' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 2201.481491088867, + "y": 198.68891525268555, + "z": "f765645f.7b8058", + "wires": [ + [] + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.json new file mode 100644 index 00000000..a6359acb --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.json @@ -0,0 +1,468 @@ +[ + { + "id": "503a78f7.47ca18", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 657.0634536743164, + "y": 392, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "77aa4ba.68c1bb4", + "4952201a.7d4c8" + ] + ] + }, + { + "id": "1a9196c0.4e6769", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 118.96875, + "y": 156.73882961273193, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "902e1c94.66f24" + ] + ] + }, + { + "id": "902e1c94.66f24", + "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": 194.25445556640625, + "y": 196.9769411087036, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "a3cff3f0.d5beb" + ] + ] + }, + { + "id": "2648545f.a0239c", + "type": "comment", + "name": "wan port-vnf-topology-operation-delete", + "info": "", + "comments": "", + "x": 568.3136672973633, + "y": 230.32522869110107, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "cb66206e.4a85e", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 195.63541412353516, + "y": 458.4055013656616, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "99c3b58a.28fe68", + "41864004.a59f8", + "7d0a1f82.5f016", + "60ff59e4.f2b988", + "335cedb5.736ac2", + "503a78f7.47ca18", + "ee257c77.ce85f", + "b68bb604.af2598", + "55b1fa8a.f95f74" + ] + ] + }, + { + "id": "77aa4ba.68c1bb4", + "type": "other", + "name": "outcome Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 921.7857666015625, + "y": 374.5556221008301, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "5f41004a.301df" + ] + ] + }, + { + "id": "5f41004a.301df", + "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": 1102.7856369018555, + "y": 369.5555000305176, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "4952201a.7d4c8", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 907.2857666015625, + "y": 426.55558490753174, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "dcbc4218.194a6" + ] + ] + }, + { + "id": "dcbc4218.194a6", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1079.285472869873, + "y": 426.5555830001831, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "b8b4f7cf.20f728", + "f6b988cf.3ccc88", + "a936ae5c.480e" + ] + ] + }, + { + "id": "f6b988cf.3ccc88", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1254.28564453125, + "y": 445.55550479888916, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "2be170a7.d1fc4" + ] + ] + }, + { + "id": "335cedb5.736ac2", + "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": 627.4524536132812, + "y": 466.4444637298584, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "2a3d41e1.8aa8ce", + "c521841a.091868" + ] + ] + }, + { + "id": "2a3d41e1.8aa8ce", + "type": "outcome", + "name": "outcome PendingDelete", + "xml": "<outcome value='PendingDelete'>\n", + "comments": "", + "outputs": 1, + "x": 918.2857208251953, + "y": 470.55558681488037, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "edb94879.c47ed8" + ] + ] + }, + { + "id": "c521841a.091868", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 864.2857818603516, + "y": 517.5555906295776, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "8d57a7f4.cb78b8" + ] + ] + }, + { + "id": "8d57a7f4.cb78b8", + "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": 1023.7855491638184, + "y": 520.5555896759033, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "ee257c77.ce85f", + "type": "switchNode", + "name": "switch vnf-id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n", + "comments": "", + "outputs": 1, + "x": 593.2857704162598, + "y": 347.5555934906006, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "d82c9312.151d9" + ] + ] + }, + { + "id": "d82c9312.151d9", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 791.2858352661133, + "y": 337.5556058883667, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "a3bf6d80.2d0f6" + ] + ] + }, + { + "id": "a3bf6d80.2d0f6", + "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": 957.7857208251953, + "y": 334.5556001663208, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "b8b4f7cf.20f728", + "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": 1314.7856483459473, + "y": 381.5555009841919, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "ba14948d.015c78" + ] + ] + }, + { + "id": "ba14948d.015c78", + "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": 1570.7856674194336, + "y": 381.5555009841919, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "b53ab16b.22442" + ] + ] + }, + { + "id": "b53ab16b.22442", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1747.2857208251953, + "y": 384.5555009841919, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "c9311851.f90738" + ] + ] + }, + { + "id": "c9311851.f90738", + "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": 1914.2857360839844, + "y": 445.5555009841919, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "6ec9cdbe.844104", + "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": 1559.785659790039, + "y": 445.55550479888916, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "2be170a7.d1fc4", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1422.285659790039, + "y": 445.55550479888916, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "6ec9cdbe.844104" + ] + ] + }, + { + "id": "7d0a1f82.5f016", + "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": 605.3021850585938, + "y": 642.0722465515137, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "60ff59e4.f2b988", + "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": 554.4133453369141, + "y": 767.6276769638062, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "99c3b58a.28fe68", + "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": 585.9347686767578, + "y": 539.5431041717529, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "41864004.a59f8", + "type": "set", + "name": "Remove vnf from ServiceData", + "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.vidx].\" value=\"\"/>\n\n", + "comments": "", + "x": 621.5589599609375, + "y": 583.5110712051392, + "z": "944c3ee1.29b9e", + "wires": [] + }, + { + "id": "edb94879.c47ed8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1115.5921211242676, + "y": 480.88074111938477, + "z": "944c3ee1.29b9e", + "wires": [ + [] + ] + }, + { + "id": "a3cff3f0.d5beb", + "type": "method", + "name": "method sdwan-vnf-topology-operation-wanport-delete", + "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-delete' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 199.5, + "y": 313, + "z": "944c3ee1.29b9e", + "wires": [ + [ + "cb66206e.4a85e" + ] + ] + }, + { + "id": "b68bb604.af2598", + "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": 650.7858276367188, + "y": 287.55559253692627, + "z": "944c3ee1.29b9e", + "wires": [ + [] + ] + }, + { + "id": "55b1fa8a.f95f74", + "type": "delete", + "name": "delete wan port instance configuration in AAI", + "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='wan-port-config' \n key='wan-port-config.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n", + "comments": "", + "outputs": 1, + "x": 657.5, + "y": 704, + "z": "944c3ee1.29b9e", + "wires": [ + [] + ] + }, + { + "id": "a936ae5c.480e", + "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": 1303.5001373291016, + "y": 500.0000123977661, + "z": "944c3ee1.29b9e", + "wires": [ + [] + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-wan-param.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-wan-param.xml new file mode 100644 index 00000000..68980ec4 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-wan-param.xml @@ -0,0 +1,115 @@ +<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-wan-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 == 'id'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.id' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.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 == 'description'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.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 == 'deviceName'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.deviceName' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'portType'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.portType' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'portNumber'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.portNumber' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'ipAddress'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.ipAddress' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'providerIpAddress'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.providerIpAddress' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'vlanId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.vlanId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'transportNetworkName'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.transportNetworkName' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'inputBandwidth'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.inputBandwidth' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'outputBandwidth'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.outputBandwidth' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'devicePortId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.devicePortId' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'wanPortId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.wanPortId' 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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.xml new file mode 100644 index 00000000..59e03134 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-activate.xml @@ -0,0 +1,346 @@ +<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-wanport-activate' mode='sync'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='0'>
+ <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=''>
+ <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`' >
+ <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-wan-param' mode='sync' ></call>
+ <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="....."/>
+ <parameter name="field3" value="prop.wan.deviceName"/>
+ <parameter name="field4" value='`$prop.wan.deviceName`'/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSiteInstance'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.siteVidx' value='`$vidx`' />
+ <parameter name='ctx.site.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="didx" start="0" end="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$didx].name == 'name'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <switch test="`$prop.wan.deviceName == $service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$didx].value`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="deviceidx" start="0" end="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.deviceId' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <set>
+ <parameter name='tmp.devicevidx' value='`$vidx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </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>
+ <switch test="`$tmp.siteVidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="ActivateSiteInstance not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.devicevidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="ActivateSDWANDeviceInstance not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </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="sdwan-wanport-vnf-topology-operation-activate"/>
+ <parameter name="field3" value="SDWAN-Activate"/>
+ </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>
+ <for index="sidx" start="0" end="`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block atomic="true">
+ <switch test="`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].name == 'siteId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.siteId' value='`$ctx.site.vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get token rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-port.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/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="portResp"/>
+ <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='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create device port rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <for index="portidx" start="0" end="`$portResp_length`">
+ <block>
+ <switch test="`$portResp[$portidx].deviceId == $prop.deviceId`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.devicePortId' value='`$portResp[$portidx].id`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-network-orchestration.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/network-orchestration-resources'`" />
+ <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="get"/>
+ <parameter name="responsePrefix" value="transportNetworksResp"/>
+ <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='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Get transport network info rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <for index="tidx" start="0" end="`$transportNetworksResp.transportNetworks_length`">
+ <block>
+ <switch test="`$transportNetworksResp.transportNetworks[$tidx].name == $prop.wan.transportNetworkName`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.transportNetworkId' value='`$transportNetworksResp[$tidx].id`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.ipAddress`'/>
+ <parameter name="regex" value="/"/>
+ <parameter name="ctx_memory_result_key" value="ipandMask"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.wan.ip-address' value='`$ipandMask[0]`' />
+ <parameter name='prop.wan.prefixLength' value='`$ipandMask[1]`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ <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='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create wan port rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <for index="wanPortidx" start="0" end="`$wanPortResp_length`">
+ <block>
+ <switch test="`$wanPortResp[$wanPortidx].deviceId == $prop.deviceId`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.wan.wanPortId' value='`$wanPortResp[$wanPortidx].id`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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='devicePortId' />
+ <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='`$prop.wan.devicePortId`' />
+ <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 + 1].name' value='wanPortId' />
+ <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 + 1].value' value='`$prop.wan.wanPortId`' />
+ <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 + 2`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].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.' />
+ </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>
+ <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-wanport-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.xml new file mode 100644 index 00000000..cf209c08 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.xml @@ -0,0 +1,114 @@ +<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-wanport-create' mode='sync'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
+ </set>
+ <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>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.vnf-index"/>
+ </execute>
+ <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="sdwan-wanport-vnf-topology-operation-create"/>
+ <parameter name="field3" value="SDWAN-Config"/>
+ </record>
+ <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-wan-param' mode='sync' ></call>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-index`' />
+ <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>
+ <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='vnfId' value='`$prop.vnf-index`' />
+ <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-index + '/vnf-data/'` " />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config'
+ key='wan-port-config.id = $prop.vnf-index' >
+ <parameter name="id" value="`$prop.vnf-index`" />
+ <parameter name="name" value="`$prop.wan.name`" />
+ <parameter name="device-id" value="`$prop.wan.deviceName`" />
+ <parameter name='vlan-id' value="`$prop.wan.vlanId`" />
+ <parameter name="ip-address" value="`$prop.wan.ipAdddress`" />
+ <parameter name="provider-ip-address" value="`$prop.wan.providerIpAddress`" />
+ <parameter name="input-bandwidth" value="`$prop.wan.inputBandwidth`" />
+ <parameter name="output-bandwidth" value="`$prop.wan.outputBandwidth`" />
+ <parameter name="description" value="`$prop.wan.description`" />
+ <parameter name="port-type" value="`$prop.wan.portType`" />
+ <parameter name="port-number" value="`$prop.wan.portNumber`" />
+ <parameter name="transport-network-name" value="`$prop.wan.transportNetworkName`" />
+ <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-index + '/vnf-data/'` " />
+ </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="wan-port-config" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/wan-port-configs/wan-port-config/' + $prop.vnf-index`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="wan-port-config.id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vnf-index`" />
+ </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-wanport-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-deactivate.xml new file mode 100644 index 00000000..f6222749 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-deactivate.xml @@ -0,0 +1,186 @@ +<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-wanport-deactivate' mode='sync'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='0'>
+ <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=''>
+ <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`' >
+ <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-wan-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>
+ </block>
+ </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 + '/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'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get token rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-wan-port-del.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports/action/batch-delete'`" />
+ <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="portResp"/>
+ <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='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>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-device-port-del.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports/action/batch-delete'`" />
+ <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="portResp"/>
+ <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='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>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].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='wan-port-config'
+ key='wan-port-config.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >
+ <parameter name="id" value="`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`" />
+ <parameter name='operational-status' value='PendingDelete' />
+ <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`' />
+ </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-wanport-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.xml new file mode 100644 index 00000000..e0f53a91 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.xml @@ -0,0 +1,89 @@ +<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-wanport-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'>
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />
+ </set>
+ </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>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='wan-port-config'
+ key='wan-port-config.id = $vnf-topology-operation-input.vnf-information.vnf-id'></delete>
+ <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/restapi-templates/src/main/json/sdwan-device-port-del.json b/platform-logic/restapi-templates/src/main/json/sdwan-device-port-del.json new file mode 100644 index 00000000..243af571 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/sdwan-device-port-del.json @@ -0,0 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +{ + "ports": [ + { + "id": ${prop.wan.devicePortId}, + } + ] +} diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-port.json b/platform-logic/restapi-templates/src/main/json/sdwan-port.json index 61debbd8..b60a2715 100644 --- a/platform-logic/restapi-templates/src/main/json/sdwan-port.json +++ b/platform-logic/restapi-templates/src/main/json/sdwan-port.json @@ -21,10 +21,10 @@ { "ports": [ { - "portType": ${prop.portType}, - "portNumber": ${prop.portNumber}, - "deviceId": ${prop.deviceId}, - "portSwitch": ${prop.portSwitch}, + "portType": ${prop.wan.portType}, + "portNumber": ${prop.wan.portNumber}, + "deviceId": ${prop.wan.deviceId}, + "portSwitch": "null", "linkInfo": { "linkType": "Ethernet", "cellular": "null", @@ -35,4 +35,4 @@ } } ] -}
\ No newline at end of file +} diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-del.json b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-del.json new file mode 100644 index 00000000..5459625d --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-del.json @@ -0,0 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +{ + "tnps": [ + { + "id": ${prop.wan.wanPortId}, + } + ] +} diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-wan-port.json b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port.json index 2e437611..6dfb9972 100644 --- a/platform-logic/restapi-templates/src/main/json/sdwan-wan-port.json +++ b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port.json @@ -21,36 +21,36 @@ { "tnps": [ { - "name": ${prop.name}, - "siteId": ${prop.siteId}, - "deviceId": ${prop.deviceId}, - "portId": ${prop.wanId}, + "name": ${prop.wan.name}, + "siteId": ${prop.wan.siteId}, + "deviceId": ${prop.wan.deviceId}, + "portId": ${prop.wan.devicePortId}, "inSubInterfaces": "false", - "vlanId": ${prop.vlanId}, + "vlanId": ${prop.wan.vlanId}, "ipConnection": { "ipv4": { - "publicIP": ${prop.ipAddress}, + "publicIP": ${prop.wan.ip-address}, "accessType": "IPOE", "ipMode": "Static", - "customerAddress": ${prop.ipAddress}, - "prefixLength": ${prop.prefixLength}, - "providerAddress": ${prop.providerAddress}, + "customerAddress": ${prop.wan.ip-address}, + "prefixLength": ${prop.wan.prefixLength}, + "providerAddress": ${prop.wan.providerIpAddress}, "peerIp": "null", "userName": "null", "userKey": "null" } }, "transportNetworkInfo": { - "transportNetworkId": ${prop.transportNetworkId}, + "transportNetworkId": ${prop.wan.transportNetworkId}, "workMode": "active" }, "attributes": { - "inputBandwidth": ${prop.inputBandwidth}, - "outputBandwidth": ${prop.outputBandwidth}, + "inputBandwidth": ${prop.wan.inputBandwidth}, + "outputBandwidth": ${prop.wan.outputBandwidth}, "mtu": 1500, "TCPmss": 1200 }, - "description": ${description} + "description": ${prop.wan.description} } ] -}
\ No newline at end of file +} |