diff options
author | gaurav <gaurav.agrawal@huawei.com> | 2018-07-25 16:14:34 +0530 |
---|---|---|
committer | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2018-07-25 11:42:16 +0000 |
commit | bb17c401f713e29f652ac49ff8633b829604c40b (patch) | |
tree | ebe07e92054df7f1af44abfcad7acc5464259a9a /platform-logic/generic-resource-api/src/main | |
parent | a5304e219bd29c881ab6c50be7a5a6463ef7afa8 (diff) |
Adding site Resource DG
Initial implementation of site resource DG.
Change-Id: I65b6a7e335b4053f3133b731849badec7240ec1b
Issue-ID: SDNC-356
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: f1ad68601c2616b39756cb6f516d6dad5237f0c0
Diffstat (limited to 'platform-logic/generic-resource-api/src/main')
13 files changed, 4757 insertions, 820 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json new file mode 100644 index 00000000..c640ab5b --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json @@ -0,0 +1,816 @@ +[ + { + "id": "8213d9f3.3e3b78", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 134.01040649414062, + "y": 78.01041412353516, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "3fd007b3.454158" + ] + ] + }, + { + "id": "3fd007b3.454158", + "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": 209.29611206054688, + "y": 118.24852561950684, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "f3d8ce84.4fd8" + ] + ] + }, + { + "id": "f3d8ce84.4fd8", + "type": "method", + "name": "method site-vnf-topology-operation-activate", + "xml": "<method rpc='site-vnf-topology-operation-activate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 230.43902587890625, + "y": 208.01041412353516, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "931047c0.e29ba8" + ] + ] + }, + { + "id": "931047c0.e29ba8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 210.67707061767578, + "y": 379.67708587646484, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "87b79277.d3a8", + "443f31de.8f2cf", + "e48e518f.1dc2a", + "4a014615.6e9cf8", + "bf95d9ae.8087f8", + "c850e5af.e42fa8", + "b4c6f1a.73d561", + "d7008318.12e1b", + "3993fb6.79aca04", + "2b37bcac.68f084" + ] + ] + }, + { + "id": "87b79277.d3a8", + "type": "for", + "name": "for loop i - VNF input parameters", + "xml": "<for index='idx' start='0' end='`$ctx.vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", + "comments": "", + "outputs": 1, + "x": 663.1151428222656, + "y": 267.0782470703125, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "73aa520a.b2adbc" + ] + ] + }, + { + "id": "73aa520a.b2adbc", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 909.893337726593, + "y": 267.6338765351102, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "ac680e81.777c9", + "27ece0ee.53311", + "2e9d64a5.63180c", + "ad341ac7.a856e8", + "43160102.ca0c8", + "8a88d2d2.3cbb4" + ] + ] + }, + { + "id": "ac680e81.777c9", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1115.1152267456055, + "y": 222.63385391235352, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "f0bc6f88.f42a7" + ] + ] + }, + { + "id": "f0bc6f88.f42a7", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1302.1152267456055, + "y": 218.63385391235352, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "a80ac0f1.029e7" + ] + ] + }, + { + "id": "a80ac0f1.029e7", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1470.1152267456055, + "y": 219.23386001586914, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "27ece0ee.53311", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 1132.9549446105957, + "y": 265.63384914398193, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "3c96f97e.2329d6" + ] + ] + }, + { + "id": "3c96f97e.2329d6", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1319.9549446105957, + "y": 261.63384914398193, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "38a8969d.eda21a" + ] + ] + }, + { + "id": "38a8969d.eda21a", + "type": "set", + "name": "set description", + "xml": "<set>\n<parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1481.2884254455566, + "y": 261.09500885009766, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "2e9d64a5.63180c", + "type": "switchNode", + "name": "switch location", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`\">\n", + "comments": "", + "outputs": 1, + "x": 1123.04105758667, + "y": 308.0411911010742, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "4384d4ab.76bf6c" + ] + ] + }, + { + "id": "4384d4ab.76bf6c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1310.04105758667, + "y": 304.0411911010742, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "3079a852.4cd8f8" + ] + ] + }, + { + "id": "3079a852.4cd8f8", + "type": "set", + "name": "set location", + "xml": "<set>\n<parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1478.04105758667, + "y": 304.64119720458984, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "ad341ac7.a856e8", + "type": "switchNode", + "name": "switch id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1113.0103759765625, + "y": 176.607177734375, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "653e71ed.565a9" + ] + ] + }, + { + "id": "653e71ed.565a9", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1300.0103759765625, + "y": 172.607177734375, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "2466a0b0.31d85" + ] + ] + }, + { + "id": "2466a0b0.31d85", + "type": "set", + "name": "set id", + "xml": "<set>\n<parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1468.0103759765625, + "y": 173.20718383789062, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "43160102.ca0c8", + "type": "switchNode", + "name": "switch type", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "comments": "", + "outputs": 1, + "x": 1122.0103759765625, + "y": 351.60717010498047, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "5f80b289.c102cc" + ] + ] + }, + { + "id": "5f80b289.c102cc", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1309.0103759765625, + "y": 347.60717010498047, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "123b0821.89fa08" + ] + ] + }, + { + "id": "123b0821.89fa08", + "type": "set", + "name": "set type & sdwan.site", + "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='tmp.sdwan.site' value='true' />", + "comments": "", + "x": 1507.0103759765625, + "y": 347.2071838378906, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "8a88d2d2.3cbb4", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "comments": "", + "outputs": 1, + "x": 1125.0103759765625, + "y": 394.60717010498047, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "dbc514.9b453af" + ] + ] + }, + { + "id": "dbc514.9b453af", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1312.0103759765625, + "y": 390.60717010498047, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "78dc31fa.1149c" + ] + ] + }, + { + "id": "78dc31fa.1149c", + "type": "set", + "name": "set role & sdwan.site", + "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='tmp.sdwan.site' value='true' />\n", + "comments": "", + "x": 1520.0103759765625, + "y": 390.2071838378906, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "443f31de.8f2cf", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 671, + "y": 69, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "d2748c44.5140a", + "132b0e47.fe6172", + "6c7ae40f.24628c" + ] + ] + }, + { + "id": "d2748c44.5140a", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1084, + "y": 62.00006103515625, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "910f30c.abfcad" + ] + ] + }, + { + "id": "910f30c.abfcad", + "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": 1302.7774658203125, + "y": 37.889007568359375, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "132b0e47.fe6172", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 996.0003662109375, + "y": 116.00007629394531, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "2df38444.65759c" + ] + ] + }, + { + "id": "2df38444.65759c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1167.2698974609375, + "y": 99.55461120605469, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "1580b603.a7115a", + "2393097b.207106" + ] + ] + }, + { + "id": "1580b603.a7115a", + "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": 1465.285888671875, + "y": 80.42861938476562, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "d610b844.0652c8" + ] + ] + }, + { + "id": "2393097b.207106", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1386.5872802734375, + "y": 123.41180419921875, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "dd032095.3aded" + ] + ] + }, + { + "id": "dd032095.3aded", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1587.015869140625, + "y": 128.98321533203125, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "40072c93.943294" + ] + ] + }, + { + "id": "d610b844.0652c8", + "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.7144775390625, + "y": 78.6787109375, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "fc26d8de.94b0a8" + ] + ] + }, + { + "id": "40072c93.943294", + "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": 1758.4443359375, + "y": 129.12606811523438, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "fc26d8de.94b0a8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1981.666748046875, + "y": 77.57144165039062, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "7149eeb8.6b351" + ] + ] + }, + { + "id": "7149eeb8.6b351", + "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": 2220.198486328125, + "y": 73.32144165039062, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "6c7ae40f.24628c", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 1077.96875, + "y": 25.96875, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "910f30c.abfcad" + ] + ] + }, + { + "id": "cdf59db6.a5688", + "type": "comment", + "name": "TODO: Check validation", + "info": "", + "comments": "", + "x": 628, + "y": 21, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "e48e518f.1dc2a", + "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": 606.3436889648438, + "y": 717.34375, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "4a014615.6e9cf8", + "type": "set", + "name": "set vnf-level-oper-status to Active", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Active' />\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": 662.8237915039062, + "y": 543.680908203125, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "bf95d9ae.8087f8", + "type": "set", + "name": "copy input data to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-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\n", + "comments": "", + "x": 652.6769409179688, + "y": 502.6771240234375, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "c850e5af.e42fa8", + "type": "save", + "name": "update siteInstance configuration in AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' \n key='generic-vnf.vnf-id = $prop.vnf-index' >\n<parameter name='vnf-id' value='`$prop.vnf-index`' />\n<parameter name='in-maint' value='true' />\n<parameter name='is-closed-loop-disabled' value='false' />\n<parameter name='orchestration-status' value='Active' />\n<parameter name='operational-status' value='Active' />\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": 683.0104370117188, + "y": 627.5659790039062, + "z": "68309cb5.9fbe94", + "wires": [ + [ + + ] + ] + }, + { + "id": "b4c6f1a.73d561", + "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=\"generic-vnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"generic-vnf.vnf-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />", + "comments": "", + "outputs": 1, + "x": 654.0104370117188, + "y": 668.34375, + "z": "68309cb5.9fbe94", + "wires": [ + [ + + ] + ] + }, + { + "id": "d7008318.12e1b", + "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": 659.5104370117188, + "y": 585.34375, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "2b37bcac.68f084", + "type": "switchNode", + "name": "switch sdwan.site", + "xml": "<switch test=\"`$tmp.sdwan.site`\">\n", + "comments": "", + "outputs": 1, + "x": 615, + "y": 348, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "a9004d13.a7ec4", + "27d5839b.ac9ebc" + ] + ] + }, + { + "id": "3993fb6.79aca04", + "type": "set", + "name": "set sdwan.site", + "xml": "<set>\n<parameter name='tmp.sdwan.site' value='false' />\n", + "comments": "", + "x": 606, + "y": 217, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "27d5839b.ac9ebc", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 751, + "y": 441, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "1ed61d3a.a1c323" + ] + ] + }, + { + "id": "a9004d13.a7ec4", + "type": "outcomeTrue", + "name": "false", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 794.8887939453125, + "y": 361.00006103515625, + "z": "68309cb5.9fbe94", + "wires": [ + [ + "289c3fbe.f462" + ] + ] + }, + { + "id": "289c3fbe.f462", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 934, + "y": 361, + "z": "68309cb5.9fbe94", + "wires": [ + [ + + ] + ] + }, + { + "id": "1ed61d3a.a1c323", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 913, + "y": 440, + "z": "68309cb5.9fbe94", + "wires": [ + [ + + ] + ] + }, + { + "id": "ce5d0a29.098d18", + "type": "comment", + "name": "TODO: SDWAN implementation for site", + "info": "", + "comments": "", + "x": 1097, + "y": 485, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "ba135787.4aba08", + "type": "comment", + "name": "Site and role will be used to identify SDWAN service", + "info": "", + "comments": "", + "x": 1829, + "y": 358, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + }, + { + "id": "c30ca451.c8aa78", + "type": "comment", + "name": "TODO: AAI", + "info": "", + "comments": "", + "x": 900, + "y": 638, + "z": "68309cb5.9fbe94", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json new file mode 100644 index 00000000..bc081931 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json @@ -0,0 +1,690 @@ +[ + { + "id": "b9ac105c.8ec8f", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 97.01041412353516, + "y": 47.41365957260132, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "cdfd9c31.ba898" + ] + ] + }, + { + "id": "cdfd9c31.ba898", + "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": 196.29611206054688, + "y": 121.65176746528596, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "8cec72fa.c96d5" + ] + ] + }, + { + "id": "8cec72fa.c96d5", + "type": "method", + "name": "method site-vnf-topology-operation-create", + "xml": "<method rpc='site-vnf-topology-operation-create' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 217.43902587890625, + "y": 211.41365596931428, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "c88bbc51.c05a" + ] + ] + }, + { + "id": "c88bbc51.c05a", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 197.67707061767578, + "y": 383.08032772224396, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "6bf31f55.e7d98", + "c99fe643.20ccd8", + "34e47add.75c586", + "fe017e7c.6df8", + "bb192e9e.a5c6c", + "10180061.fe9e8", + "bc730e3d.2a3f4", + "fd6d952f.2ce658", + "bb650f09.4befc", + "c7f37fdc.75322", + "8a7774f7.eba7c8" + ] + ] + }, + { + "id": "34e47add.75c586", + "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": 520.3436431884766, + "y": 741.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "c99fe643.20ccd8", + "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": 579.8237457275391, + "y": 568.0841431617737, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "6bf31f55.e7d98", + "type": "set", + "name": "copy input data to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-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": 566.6768951416016, + "y": 466.0803589820862, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "fe017e7c.6df8", + "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": 559.0103912353516, + "y": 404.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + [ + + ] + ] + }, + { + "id": "bb192e9e.a5c6c", + "type": "set", + "name": "set vnf-index to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-index`' />\n", + "comments": "", + "x": 557.0103912353516, + "y": 521.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "10180061.fe9e8", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 581.0103912353516, + "y": 284.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "da5d62eb.78235", + "6a8033d.3310ccc" + ] + ] + }, + { + "id": "da5d62eb.78235", + "type": "other", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 836.7247467041016, + "y": 274.8898072242737, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "aa63df44.dc701" + ] + ] + }, + { + "id": "aa63df44.dc701", + "type": "set", + "name": "set vnf-index=0", + "xml": "<set>\n<parameter name='vnf-index' value='0' />\n", + "comments": "", + "x": 1001.0104675292969, + "y": 273.8898854255676, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "6a8033d.3310ccc", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 838.1533088684082, + "y": 339.17562532424927, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "62e804c3.fcb0ec" + ] + ] + }, + { + "id": "fde7e6bf.6c5328", + "type": "set", + "name": "set vnf-index = vnf_length", + "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n", + "comments": "", + "x": 1177.0104637145996, + "y": 317.4613137245178, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "59c71e1.00ba4e", + "type": "for", + "name": "for each existing VNF", + "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", + "comments": "", + "outputs": 1, + "x": 1162.4389762878418, + "y": 363.4612526893616, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "17e77a68.a0edf6" + ] + ] + }, + { + "id": "62e804c3.fcb0ec", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 973.8675689697266, + "y": 339.1755909919739, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "fde7e6bf.6c5328", + "59c71e1.00ba4e" + ] + ] + }, + { + "id": "17e77a68.a0edf6", + "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": 1538.7247467041016, + "y": 351.0327515602112, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "5bee4b88.02f404" + ] + ] + }, + { + "id": "5bee4b88.02f404", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1639.0103912353516, + "y": 420.6041626930237, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "45cdc14c.e4a58" + ] + ] + }, + { + "id": "45cdc14c.e4a58", + "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": 1664.581802368164, + "y": 480.6041626930237, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "22974b6a.26eb04", + "type": "comment", + "name": "make sure this VNF doesn't exist already", + "info": "", + "comments": "", + "x": 1503.867473602295, + "y": 320.6041626930237, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "bc730e3d.2a3f4", + "type": "set", + "name": "set new vnf_length", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n", + "comments": "", + "x": 533.0103912353516, + "y": 359.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "fd6d952f.2ce658", + "type": "save", + "name": "save siteInstance configuration in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' \n key='generic-vnf.vnf-id = $prop.vnf-index' >\n<parameter name='vnf-id' value='`$prop.vnf-index`' />\n<parameter name='vnf-name' value='`$prop.site.name`' />\n<parameter name='vnf-name2' value='`$prop.site.description`' />\n<parameter name='regional-resource-zone' value='`$prop.site.location`' />\n<parameter name='vnf-type' value='prop.site.type' />\n<parameter name='in-maint' value='true' />\n<parameter name='is-closed-loop-disabled' value='false' />\n<parameter name='orchestration-status' value='Created' />\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": 588.0103797912598, + "y": 654.9692330360413, + "z": "c9244d8c.dbc33", + "wires": [ + [ + + ] + ] + }, + { + "id": "bb650f09.4befc", + "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=\"generic-vnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"generic-vnf.vnf-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />", + "comments": "", + "outputs": 1, + "x": 568.0103912353516, + "y": 692.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + [ + + ] + ] + }, + { + "id": "c7f37fdc.75322", + "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": 573.5103912353516, + "y": 609.7469849586487, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "8a7774f7.eba7c8", + "type": "for", + "name": "for loop i - 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": 586.1151275634766, + "y": 141.48147916793823, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "359fa75f.492d58" + ] + ] + }, + { + "id": "359fa75f.492d58", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 973.8933715820312, + "y": 142.03711557388306, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "f0758e90.0e45c", + "2de72527.9a032a", + "378d80e2.17f6", + "7702e686.8af7a8", + "75b119e9.762ed8", + "1c70f9bf.47a396" + ] + ] + }, + { + "id": "f0758e90.0e45c", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1177.1152682304382, + "y": 88.03709030151367, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "665f8a5d.1e1384" + ] + ] + }, + { + "id": "665f8a5d.1e1384", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1364.1152682304382, + "y": 84.03709030151367, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "303b324.5f06cce" + ] + ] + }, + { + "id": "303b324.5f06cce", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1532.1152682304382, + "y": 84.6370964050293, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "2de72527.9a032a", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 1194.9549860954285, + "y": 131.0370855331421, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "ea9a727f.74db9" + ] + ] + }, + { + "id": "ea9a727f.74db9", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1381.9549860954285, + "y": 127.03708553314209, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "965ea5a4.e205c8" + ] + ] + }, + { + "id": "965ea5a4.e205c8", + "type": "set", + "name": "set description", + "xml": "<set>\n<parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1543.2884669303894, + "y": 126.49824523925781, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "378d80e2.17f6", + "type": "switchNode", + "name": "switch location", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`\">\n", + "comments": "", + "outputs": 1, + "x": 1185.0410990715027, + "y": 173.44442749023438, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "aa90cf46.db3a1" + ] + ] + }, + { + "id": "aa90cf46.db3a1", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1372.0410990715027, + "y": 169.44442749023438, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "77618d13.d7cf34" + ] + ] + }, + { + "id": "77618d13.d7cf34", + "type": "set", + "name": "set location", + "xml": "<set>\n<parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1540.0410990715027, + "y": 170.04443359375, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "7702e686.8af7a8", + "type": "switchNode", + "name": "switch id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1175.0104174613953, + "y": 42.010414123535156, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "ed13080f.421188" + ] + ] + }, + { + "id": "ed13080f.421188", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1362.0104174613953, + "y": 38.010414123535156, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "23e732a.cf615ce" + ] + ] + }, + { + "id": "23e732a.cf615ce", + "type": "set", + "name": "set id", + "xml": "<set>\n<parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1530.0104174613953, + "y": 38.61042022705078, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "75b119e9.762ed8", + "type": "switchNode", + "name": "switch type", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "comments": "", + "outputs": 1, + "x": 1184.0104174613953, + "y": 217.01040649414062, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "2190e18f.1b285e" + ] + ] + }, + { + "id": "2190e18f.1b285e", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1371.0104174613953, + "y": 213.01040649414062, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "195e7aa3.f12db5" + ] + ] + }, + { + "id": "195e7aa3.f12db5", + "type": "set", + "name": "set type", + "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1539.0104174613953, + "y": 213.61041259765625, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "1c70f9bf.47a396", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "comments": "", + "outputs": 1, + "x": 1187.0104174613953, + "y": 260.0104064941406, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "6e1ae54c.95dc4c" + ] + ] + }, + { + "id": "6e1ae54c.95dc4c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1374.0104174613953, + "y": 256.0104064941406, + "z": "c9244d8c.dbc33", + "wires": [ + [ + "338b1db2.4b0a32" + ] + ] + }, + { + "id": "338b1db2.4b0a32", + "type": "set", + "name": "set role", + "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1542.0104174613953, + "y": 256.61041259765625, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + }, + { + "id": "63e9e578.e6c03c", + "type": "comment", + "name": "TODO: AAI", + "info": "", + "comments": "", + "x": 813, + "y": 651, + "z": "c9244d8c.dbc33", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json new file mode 100644 index 00000000..ad6eb1e4 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json @@ -0,0 +1,803 @@ +[ + { + "id": "29fa8678.95f9ca", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 131, + "y": 118, + "z": "af5ae803.904aa8", + "wires": [ + [ + "d48a6f16.dbc94" + ] + ] + }, + { + "id": "d48a6f16.dbc94", + "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": 206.28570556640625, + "y": 158.23811149597168, + "z": "af5ae803.904aa8", + "wires": [ + [ + "7ed81cb7.0a51d4" + ] + ] + }, + { + "id": "7ed81cb7.0a51d4", + "type": "method", + "name": "method site-vnf-topology-operation-deactivate", + "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 227.42861938476562, + "y": 248, + "z": "af5ae803.904aa8", + "wires": [ + [ + "aa23d49.327ed28" + ] + ] + }, + { + "id": "aa23d49.327ed28", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 207.66666412353516, + "y": 419.6666717529297, + "z": "af5ae803.904aa8", + "wires": [ + [ + "9bb8f3a8.802f5", + "15d3779a.2c8a88", + "9540c63d.a06978", + "78df0c0e.576094", + "99b35972.99c3a8", + "61eb6b8d.7cad14", + "4080214.adfeae", + "6f647857.5c6b48", + "4302e938.be3ef8", + "1364166a.1d494a" + ] + ] + }, + { + "id": "9bb8f3a8.802f5", + "type": "for", + "name": "for loop i - VNF input parameters", + "xml": "<for index='idx' start='0' end='`$ctx.vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", + "comments": "", + "outputs": 1, + "x": 660.104736328125, + "y": 307.06783294677734, + "z": "af5ae803.904aa8", + "wires": [ + [ + "a5175fe3.e03a" + ] + ] + }, + { + "id": "a5175fe3.e03a", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 906.8829312324524, + "y": 307.623462411575, + "z": "af5ae803.904aa8", + "wires": [ + [ + "a25f1f5b.132b7", + "617dd8fe.aa7948", + "15ed8251.27c1ce", + "984a8326.9a457", + "ff594d8d.7aa95", + "20f2971f.ecec88" + ] + ] + }, + { + "id": "a25f1f5b.132b7", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1112.1048202514648, + "y": 262.62343978881836, + "z": "af5ae803.904aa8", + "wires": [ + [ + "e1ea29c6.845788" + ] + ] + }, + { + "id": "e1ea29c6.845788", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1299.1048202514648, + "y": 258.62343978881836, + "z": "af5ae803.904aa8", + "wires": [ + [ + "cda20cf5.41ce9" + ] + ] + }, + { + "id": "cda20cf5.41ce9", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1467.1048202514648, + "y": 259.223445892334, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "617dd8fe.aa7948", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 1129.944538116455, + "y": 305.6234350204468, + "z": "af5ae803.904aa8", + "wires": [ + [ + "9accb009.2112d" + ] + ] + }, + { + "id": "9accb009.2112d", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1316.944538116455, + "y": 301.6234350204468, + "z": "af5ae803.904aa8", + "wires": [ + [ + "8ca9a7db.ec8f18" + ] + ] + }, + { + "id": "8ca9a7db.ec8f18", + "type": "set", + "name": "set description", + "xml": "<set>\n<parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1478.278018951416, + "y": 301.0845947265625, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "15ed8251.27c1ce", + "type": "switchNode", + "name": "switch location", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`\">\n", + "comments": "", + "outputs": 1, + "x": 1120.0306510925293, + "y": 348.03077697753906, + "z": "af5ae803.904aa8", + "wires": [ + [ + "8dc32f9.9a097d" + ] + ] + }, + { + "id": "8dc32f9.9a097d", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1307.0306510925293, + "y": 344.03077697753906, + "z": "af5ae803.904aa8", + "wires": [ + [ + "c9cae02e.83783" + ] + ] + }, + { + "id": "c9cae02e.83783", + "type": "set", + "name": "set location", + "xml": "<set>\n<parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1475.0306510925293, + "y": 344.6307830810547, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "984a8326.9a457", + "type": "switchNode", + "name": "switch id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1109.9999694824219, + "y": 216.59676361083984, + "z": "af5ae803.904aa8", + "wires": [ + [ + "96a74444.b53228" + ] + ] + }, + { + "id": "96a74444.b53228", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1296.9999694824219, + "y": 212.59676361083984, + "z": "af5ae803.904aa8", + "wires": [ + [ + "df6964b4.228f78" + ] + ] + }, + { + "id": "df6964b4.228f78", + "type": "set", + "name": "set id", + "xml": "<set>\n<parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1464.9999694824219, + "y": 213.19676971435547, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "ff594d8d.7aa95", + "type": "switchNode", + "name": "switch type", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "comments": "", + "outputs": 1, + "x": 1118.9999694824219, + "y": 391.5967559814453, + "z": "af5ae803.904aa8", + "wires": [ + [ + "343eddcc.c79502" + ] + ] + }, + { + "id": "343eddcc.c79502", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1305.9999694824219, + "y": 387.5967559814453, + "z": "af5ae803.904aa8", + "wires": [ + [ + "c923d4d2.c53e48" + ] + ] + }, + { + "id": "c923d4d2.c53e48", + "type": "set", + "name": "set type", + "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='tmp.sdwan.site' value='true' />", + "comments": "", + "x": 1473.9999694824219, + "y": 388.19676208496094, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "20f2971f.ecec88", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "comments": "", + "outputs": 1, + "x": 1121.9999694824219, + "y": 434.5967559814453, + "z": "af5ae803.904aa8", + "wires": [ + [ + "4a74022c.fbbfdc" + ] + ] + }, + { + "id": "4a74022c.fbbfdc", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1308.9999694824219, + "y": 430.5967559814453, + "z": "af5ae803.904aa8", + "wires": [ + [ + "ed0bb784.6f5f28" + ] + ] + }, + { + "id": "ed0bb784.6f5f28", + "type": "set", + "name": "set role & sdwan.site", + "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='tmp.sdwan.site' value='true' />\n", + "comments": "", + "x": 1516.9999694824219, + "y": 430.19676971435547, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "15d3779a.2c8a88", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 667.9895935058594, + "y": 108.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + "ce757eba.3051d", + "317e6180.be733e", + "355929c1.e3c516" + ] + ] + }, + { + "id": "ce757eba.3051d", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1080.9895935058594, + "y": 101.9896469116211, + "z": "af5ae803.904aa8", + "wires": [ + [ + "3a71c6fc.a403ea" + ] + ] + }, + { + "id": "3a71c6fc.a403ea", + "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": 1299.7670593261719, + "y": 77.87859344482422, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "317e6180.be733e", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 992.9899597167969, + "y": 155.98966217041016, + "z": "af5ae803.904aa8", + "wires": [ + [ + "6231a17a.01c0e" + ] + ] + }, + { + "id": "6231a17a.01c0e", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1164.2594909667969, + "y": 139.54419708251953, + "z": "af5ae803.904aa8", + "wires": [ + [ + "b34aef0c.acf71", + "8f0f5852.1fb888" + ] + ] + }, + { + "id": "b34aef0c.acf71", + "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": 1462.2754821777344, + "y": 120.41820526123047, + "z": "af5ae803.904aa8", + "wires": [ + [ + "dbdd8064.8b575" + ] + ] + }, + { + "id": "8f0f5852.1fb888", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1383.5768737792969, + "y": 163.4013900756836, + "z": "af5ae803.904aa8", + "wires": [ + [ + "790650c4.ec7c" + ] + ] + }, + { + "id": "790650c4.ec7c", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1584.0054626464844, + "y": 168.9728012084961, + "z": "af5ae803.904aa8", + "wires": [ + [ + "3c6f340.b39b3cc" + ] + ] + }, + { + "id": "dbdd8064.8b575", + "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": 1772.7040710449219, + "y": 118.66829681396484, + "z": "af5ae803.904aa8", + "wires": [ + [ + "442b99c7.862238" + ] + ] + }, + { + "id": "3c6f340.b39b3cc", + "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": 1755.4339294433594, + "y": 169.11565399169922, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "442b99c7.862238", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1978.6563415527344, + "y": 117.56102752685547, + "z": "af5ae803.904aa8", + "wires": [ + [ + "9a4c2f33.323f8" + ] + ] + }, + { + "id": "9a4c2f33.323f8", + "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": 2217.1880798339844, + "y": 113.31102752685547, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "355929c1.e3c516", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 1074.9583435058594, + "y": 65.95833587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + "3a71c6fc.a403ea" + ] + ] + }, + { + "id": "28632f1f.75eb4", + "type": "comment", + "name": "TODO: Check validation", + "info": "", + "comments": "", + "x": 624.9895935058594, + "y": 60.989585876464844, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "9540c63d.a06978", + "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": 603.3332824707031, + "y": 757.3333358764648, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "78df0c0e.576094", + "type": "set", + "name": "set vnf-level-oper-status to PendingDelete", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\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": 682.8133850097656, + "y": 585.6704711914062, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "99b35972.99c3a8", + "type": "set", + "name": "copy input data to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-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\n", + "comments": "", + "x": 649.6665344238281, + "y": 542.6667098999023, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "61eb6b8d.7cad14", + "type": "save", + "name": "update siteInstance configuration in AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' \n key='generic-vnf.vnf-id = $prop.vnf-index' >\n<parameter name='vnf-id' value='`$prop.vnf-index`' />\n<parameter name='in-maint' value='true' />\n<parameter name='is-closed-loop-disabled' value='false' />\n<parameter name='orchestration-status' value='PendingDelete' />\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<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": 677, + "y": 665.5556030273438, + "z": "af5ae803.904aa8", + "wires": [ + [ + + ] + ] + }, + { + "id": "4080214.adfeae", + "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=\"generic-vnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"generic-vnf.vnf-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />", + "comments": "", + "outputs": 1, + "x": 651.0000305175781, + "y": 708.3333358764648, + "z": "af5ae803.904aa8", + "wires": [ + [ + + ] + ] + }, + { + "id": "6f647857.5c6b48", + "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": 656.5000305175781, + "y": 625.3333358764648, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "1364166a.1d494a", + "type": "switchNode", + "name": "switch sdwan.site", + "xml": "<switch test=\"`$tmp.sdwan.site`\">\n", + "comments": "", + "outputs": 1, + "x": 611.9895935058594, + "y": 387.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + "2e02ce5b.120d72", + "c3598024.ef229" + ] + ] + }, + { + "id": "4302e938.be3ef8", + "type": "set", + "name": "set sdwan.site", + "xml": "<set>\n<parameter name='tmp.sdwan.site' value='false' />\n", + "comments": "", + "x": 602.9895935058594, + "y": 256.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "c3598024.ef229", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 747.9895935058594, + "y": 480.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + "38d8d2a8.f58c0e" + ] + ] + }, + { + "id": "2e02ce5b.120d72", + "type": "outcomeTrue", + "name": "false", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 791.8783874511719, + "y": 400.9896469116211, + "z": "af5ae803.904aa8", + "wires": [ + [ + "ad672f8e.2adcd" + ] + ] + }, + { + "id": "ad672f8e.2adcd", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 930.9895935058594, + "y": 400.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + + ] + ] + }, + { + "id": "38d8d2a8.f58c0e", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 909.9895935058594, + "y": 479.98958587646484, + "z": "af5ae803.904aa8", + "wires": [ + [ + + ] + ] + }, + { + "id": "d9bbd64d.c1dfa8", + "type": "comment", + "name": "TODO: SDWAN implementation for site", + "info": "", + "comments": "", + "x": 1067.9895935058594, + "y": 521.9895858764648, + "z": "af5ae803.904aa8", + "wires": [ + + ] + }, + { + "id": "dfb2bb0b.f25f38", + "type": "comment", + "name": "TODO: AAI", + "info": "", + "comments": "", + "x": 902, + "y": 671, + "z": "af5ae803.904aa8", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.json new file mode 100644 index 00000000..0c552342 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.json @@ -0,0 +1,617 @@ +[ + { + "id": "a2b91e00.0dacb", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 119, + "y": 37, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "17fbd1a8.a9b4ce" + ] + ] + }, + { + "id": "17fbd1a8.a9b4ce", + "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.28570556640625, + "y": 77.23811149597168, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "cd1ac734.4667a8" + ] + ] + }, + { + "id": "cd1ac734.4667a8", + "type": "method", + "name": "method site-vnf-topology-operation-delete", + "xml": "<method rpc='site-vnf-topology-operation-delete' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 215.42861938476562, + "y": 167, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "8f642f93.2a801" + ] + ] + }, + { + "id": "8f642f93.2a801", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 347.6666564941406, + "y": 226.66668701171875, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "76c48b79.d84cf4", + "bfaa0886.4026e8", + "d0626629.81a8c8", + "a00c6468.40dc18", + "d6cddc91.15c3a", + "1aa89ef4.371e21" + ] + ] + }, + { + "id": "76c48b79.d84cf4", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 668.9895935058594, + "y": 73.98958587646484, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "e84dd0b6.bd49f", + "6abf3e26.6123e", + "cad37430.9a8ae8" + ] + ] + }, + { + "id": "e84dd0b6.bd49f", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1081.9895935058594, + "y": 66.9896469116211, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "1e4a1529.eacc1b" + ] + ] + }, + { + "id": "1e4a1529.eacc1b", + "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": 1300.7670593261719, + "y": 42.87859344482422, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "6abf3e26.6123e", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 993.9899597167969, + "y": 120.98966217041016, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "8e41da85.f0c968" + ] + ] + }, + { + "id": "8e41da85.f0c968", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1165.2594909667969, + "y": 104.54419708251953, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "40ff91c4.16b8c", + "901feb4d.552588" + ] + ] + }, + { + "id": "40ff91c4.16b8c", + "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": 1463.2754821777344, + "y": 85.41820526123047, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "21662e74.a22c42" + ] + ] + }, + { + "id": "901feb4d.552588", + "type": "switchNode", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1384.5768737792969, + "y": 128.4013900756836, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "ee9e043e.1f4d08" + ] + ] + }, + { + "id": "ee9e043e.1f4d08", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1585.0054626464844, + "y": 133.9728012084961, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "b08c7bb.174c688" + ] + ] + }, + { + "id": "21662e74.a22c42", + "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": 1773.7040710449219, + "y": 83.66829681396484, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "c6e29244.22831" + ] + ] + }, + { + "id": "b08c7bb.174c688", + "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": 1756.4339294433594, + "y": 134.11565399169922, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "c6e29244.22831", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1979.6563415527344, + "y": 82.56102752685547, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "34cb4af6.5dade6" + ] + ] + }, + { + "id": "34cb4af6.5dade6", + "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": 2218.1880798339844, + "y": 78.31102752685547, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "cad37430.9a8ae8", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 1075.9583435058594, + "y": 30.958335876464844, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "1e4a1529.eacc1b" + ] + ] + }, + { + "id": "4dc3e987.9fd4e8", + "type": "comment", + "name": "TODO: Check validation", + "info": "", + "comments": "", + "x": 625.9895935058594, + "y": 25.989585876464844, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "bfaa0886.4026e8", + "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": 590.333251953125, + "y": 562.3333740234375, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "728d2d28.940264", + "type": "for", + "name": "for each vnf", + "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n", + "comments": "", + "outputs": 1, + "x": 1117.7793083190918, + "y": 393.66661167144775, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "7caecd51.491534" + ] + ] + }, + { + "id": "347e4d01.6da902", + "type": "comment", + "name": "Remove VNF from service data", + "info": "", + "comments": "", + "x": 640.9380798339844, + "y": 342.2382507324219, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "7caecd51.491534", + "type": "set", + "name": "move vnf to remove one", + "xml": "<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n", + "comments": "", + "x": 1351.3704414367676, + "y": 392.6905632019043, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "d6cddc91.15c3a", + "type": "switchNode", + "name": "switch vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 604.0371704101562, + "y": 395.2462406158447, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "f6c22b0f.9c87a8", + "3909fa08.1288e6" + ] + ] + }, + { + "id": "f6c22b0f.9c87a8", + "type": "outcome", + "name": "1", + "xml": "<outcome value='1'>\n", + "comments": "", + "outputs": 1, + "x": 781.0372123718262, + "y": 355.91282749176025, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "489f0baa.cc5474" + ] + ] + }, + { + "id": "489f0baa.cc5474", + "type": "set", + "name": "Remove vnfs", + "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n", + "comments": "", + "x": 944.7037086486816, + "y": 355.91292667388916, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "3909fa08.1288e6", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 779.7039566040039, + "y": 439.2461004257202, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "1459edc6.fe9a92" + ] + ] + }, + { + "id": "e0ce4e15.0694e", + "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": 1137.333396911621, + "y": 484.2461853027344, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "1b0c5771.6e6a79", + "type": "set", + "name": "Remove the last vnf in the list", + "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n", + "comments": "", + "x": 1173.037052154541, + "y": 439.3572063446045, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "1459edc6.fe9a92", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 948.3704452514648, + "y": 439.9127473831177, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "728d2d28.940264", + "1b0c5771.6e6a79", + "e0ce4e15.0694e" + ] + ] + }, + { + "id": "d0626629.81a8c8", + "type": "switchNode", + "name": "switch current vnf-level-oper-status == PendingDelete", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingDelete'`\">\n", + "comments": "", + "outputs": 1, + "x": 702.9999885559082, + "y": 181.00003623962402, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "aa414c85.4ebad" + ] + ] + }, + { + "id": "350728d2.6ecb38", + "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=\"Cannot delete a VNF in a Created state\" />\n", + "comments": "", + "x": 1165.9999809265137, + "y": 180, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "a00c6468.40dc18", + "type": "switchNode", + "name": "switch current vf-module_length", + "xml": "<switch test=\"`$ctx.vnf-data.vf-modules.vf-module_length`\">\n", + "comments": "", + "outputs": 1, + "x": 653.3333320617676, + "y": 267.00000190734863, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "e2c40a8f.28c2e8", + "efcade27.df8a7", + "fdf813a0.7dec9" + ] + ] + }, + { + "id": "e2c40a8f.28c2e8", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", + "comments": "", + "outputs": 1, + "x": 881.9999732971191, + "y": 223.6666431427002, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "4056136c.450bfc" + ] + ] + }, + { + "id": "efcade27.df8a7", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 880.5713844299316, + "y": 265.0953006744385, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "4056136c.450bfc" + ] + ] + }, + { + "id": "4056136c.450bfc", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1029.1428985595703, + "y": 245.0953016281128, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + + ] + ] + }, + { + "id": "fdf813a0.7dec9", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 880.5714340209961, + "y": 306.52388858795166, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "dbbd756.2a74488" + ] + ] + }, + { + "id": "dbbd756.2a74488", + "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=\"Cannot delete the VNF because there are VFs defined\" />\n", + "comments": "", + "x": 1047.7143287658691, + "y": 306.09527683258057, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + }, + { + "id": "aa414c85.4ebad", + "type": "outcomeTrue", + "name": "false", + "xml": "<outcome value='false'>\n", + "comments": "", + "outputs": 1, + "x": 1005, + "y": 181, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + "350728d2.6ecb38" + ] + ] + }, + { + "id": "1aa89ef4.371e21", + "type": "delete", + "name": "delete Site in AAI", + "xml": "<delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' \n key='generic-vnf.vnf-id = $prop.vnf-index' >", + "comments": "", + "outputs": 1, + "x": 604, + "y": 510, + "z": "7bfb2dad.3744a4", + "wires": [ + [ + + ] + ] + }, + { + "id": "e61bcb70.9a5e48", + "type": "comment", + "name": "TODO: AAI", + "info": "", + "comments": "", + "x": 775, + "y": 512, + "z": "7bfb2dad.3744a4", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json index 548017d5..3ebab100 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json @@ -1,487 +1,461 @@ [ - { - "id": "b38b0b37.4fbba8", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 156.66665649414062, - "y": 414.16667597634455, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "52d79f98.236c9", - "db0b2c04.23c78", - "2090c272.2f2dae", - "f3ec5636.aa7578", - "de04dcb6.e0093", - "286a5aeb.cd2826" - ] - ] - }, - { - "id": "52d79f98.236c9", - "type": "switchNode", - "name": "switch svc-request-id", - "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'>\n", - "comments": "", - "outputs": 1, - "x": 439.4285659790039, - "y": 297.24701404571533, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "f9ab1dd1.ac849" - ] - ] - }, - { - "id": "f9ab1dd1.ac849", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 665.1428604125977, - "y": 297.2470178604126, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "a08153b.30607b" - ] - ] - }, - { - "id": "a08153b.30607b", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n", - "comments": "", - "x": 816.5714263916016, - "y": 297.24701595306396, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "db0b2c04.23c78", - "type": "switchNode", - "name": "switch svc-action", - "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", - "comments": "", - "outputs": 1, - "x": 427.99992915562234, - "y": 255.81844561440607, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "eeea9033.66cb9" - ] - ] - }, - { - "id": "eeea9033.66cb9", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 663.7142808096751, - "y": 254.38984339577814, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "d8278276.52076" - ] - ] - }, - { - "id": "d8278276.52076", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n", - "comments": "", - "x": 813.7142541067942, - "y": 254.3898529325213, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "2090c272.2f2dae", - "type": "switchNode", - "name": "switch request-action", - "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", - "comments": "", - "outputs": 1, - "x": 437.99998256138406, - "y": 340.1041607175555, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "3462c626.b9b84a" - ] - ] - }, - { - "id": "3462c626.b9b84a", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 665.1428560529439, - "y": 340.10417161669056, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "b3d88cc6.52ff2" - ] - ] - }, - { - "id": "b3d88cc6.52ff2", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n", - "comments": "", - "x": 816.5714220319478, - "y": 340.10416970934193, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "e6d8c21d.71c1c", - "type": "switchNode", - "name": "switch model-customization-id", - "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`'>\n", - "comments": "", - "outputs": 1, - "x": 972.4645347595215, - "y": 486.53292655944824, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "de43bd69.67fda" - ] - ] - }, - { - "id": "de43bd69.67fda", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 1177.4645347595215, - "y": 486.53290939331055, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "4575d060.3b037" - ] - ] - }, - { - "id": "4575d060.3b037", - "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-information.onap-model-information.model-customization-uuid is a required input\" />\n", - "comments": "", - "x": 1328.8931007385254, - "y": 486.5329074859619, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "689a33f6.b4cc9c", - "type": "switchNode", - "name": "switch tenant", - "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'>\n", - "comments": "", - "outputs": 1, - "x": 918.3216133117676, - "y": 527.9614372253418, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "238e5ffc.d0317" - ] - ] - }, - { - "id": "238e5ffc.d0317", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 1176.035930633545, - "y": 527.9614715576172, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "bcaf5c05.49c86" - ] - ] - }, - { - "id": "bcaf5c05.49c86", - "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-information.vnf-request-input.tenant is a required input\" />\n", - "comments": "", - "x": 1327.4644966125488, - "y": 527.9614696502686, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "c2b4e8d1.4fcae8", - "type": "comment", - "name": "Validation of required fields", - "info": "", - "comments": "", - "x": 587.9999389648438, - "y": 211.53272819519043, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "f3ec5636.aa7578", - "type": "switchNode", - "name": "switch svc-action", - "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", - "comments": "", - "outputs": 1, - "x": 423.238037109375, - "y": 528.7947521209717, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "2acfd81d.e2f408" - ] - ] - }, - { - "id": "2acfd81d.e2f408", - "type": "outcome", - "name": "assign", - "xml": "<outcome value='assign'>\n", - "comments": "", - "outputs": 1, - "x": 585.738037109375, - "y": 528.7947521209717, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "5a45a048.95a1d" - ] - ] - }, - { - "id": "5a45a048.95a1d", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 740.738037109375, - "y": 528.7947521209717, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "e6d8c21d.71c1c", - "689a33f6.b4cc9c", - "217fcc81.9f4ba4" - ] - ] - }, - { - "id": "a37f14a8.387e78", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 100.41666630336204, - "y": 84.0803279876709, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "b399deb4.255d6" - ] - ] - }, - { - "id": "b399deb4.255d6", - "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": 175.70237186976829, - "y": 124.31843948364258, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "869696da.e07a18" - ] - ] - }, - { - "id": "869696da.e07a18", - "type": "method", - "name": "method validate-vnf-input", - "xml": "<method rpc='validate-vnf-input' mode='sync'>\n", - "comments": "", - "outputs": 1, - "x": 151.0952933175222, - "y": 165.33032417297363, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "b38b0b37.4fbba8" - ] - ] - }, - { - "id": "9789ee81.07f95", - "type": "comment", - "name": "validate-vnf-input", - "info": "", - "comments": "", - "x": 494.76152256556907, - "y": 31.666671752929688, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "de04dcb6.e0093", - "type": "switchNode", - "name": "switch service-instance-id", - "xml": "<switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'>\n", - "comments": "", - "outputs": 1, - "x": 451.0238135201589, - "y": 384.16668701171875, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "54e9ea0e.6ae744" - ] - ] - }, - { - "id": "54e9ea0e.6ae744", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 663.4523947579519, - "y": 384.1666831970215, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "d1e3ee4b.ceb14" - ] - ] - }, - { - "id": "d1e3ee4b.ceb14", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n", - "comments": "", - "x": 814.8809607369558, - "y": 384.16668128967285, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "286a5aeb.cd2826", - "type": "switchNode", - "name": "switch vnf-id", - "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id`'>\n", - "comments": "", - "outputs": 1, - "x": 408.5238227844238, - "y": 427.6666774749756, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "bb28e2bc.36c43" - ] - ] - }, - { - "id": "bb28e2bc.36c43", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 663.8095321655273, - "y": 426.23810958862305, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "9c9ba7cb.f1d4b8" - ] - ] - }, - { - "id": "9c9ba7cb.f1d4b8", - "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-information.vnf-id is a required input\" />\n", - "comments": "", - "x": 815.2380981445312, - "y": 426.2381076812744, - "z": "19ac43dc.b5de6c", - "wires": [] - }, - { - "id": "217fcc81.9f4ba4", - "type": "switchNode", - "name": "switch aic-cloud-region", - "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>\n", - "comments": "", - "outputs": 1, - "x": 947.6666946411133, - "y": 570.238094329834, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "30f287b7.9d1118" - ] - ] - }, - { - "id": "30f287b7.9d1118", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 1174.3810119628906, - "y": 570.2381286621094, - "z": "19ac43dc.b5de6c", - "wires": [ - [ - "44a324d9.932adc" - ] - ] - }, - { - "id": "44a324d9.932adc", - "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.aic-cloud-region is a required input\" />\n", - "comments": "", - "x": 1325.8095779418945, - "y": 570.2381267547607, - "z": "19ac43dc.b5de6c", - "wires": [] - } + { + "id": "c428e8d.27cce18", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 189, + "y": 416.50000422341486, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "3ab2d225.c8f26e", + "f97f4e94.92985", + "99754530.a920a8", + "77ab2ae3.a31c54", + "c2bc3d2d.6fb7d" + ] + ] + }, + { + "id": "3ab2d225.c8f26e", + "type": "switchNode", + "name": "switch svc-request-id", + "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'>\n", + "comments": "", + "outputs": 1, + "x": 471.7619094848633, + "y": 299.58034229278564, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "a9a2f3f.7cb551" + ] + ] + }, + { + "id": "a9a2f3f.7cb551", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 697.476203918457, + "y": 299.5803461074829, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "cb1db5f9.619c48" + ] + ] + }, + { + "id": "cb1db5f9.619c48", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n", + "comments": "", + "x": 848.9047698974609, + "y": 299.5803442001343, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "f97f4e94.92985", + "type": "switchNode", + "name": "switch svc-action", + "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", + "comments": "", + "outputs": 1, + "x": 460.3332726614817, + "y": 258.1517738614764, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "4bce0fc2.589ce" + ] + ] + }, + { + "id": "4bce0fc2.589ce", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 696.0476243155344, + "y": 256.72317164284846, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "8b6ba872.3b8a98" + ] + ] + }, + { + "id": "8b6ba872.3b8a98", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n", + "comments": "", + "x": 846.0475976126536, + "y": 256.7231811795916, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "99754530.a920a8", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 470.33332606724343, + "y": 342.4374889646258, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "1356b9d1.f1abc6" + ] + ] + }, + { + "id": "1356b9d1.f1abc6", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 697.4761995588033, + "y": 342.4374998637609, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "9bdd0c3e.f5034" + ] + ] + }, + { + "id": "9bdd0c3e.f5034", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n", + "comments": "", + "x": 848.9047655378072, + "y": 342.43749795641224, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "77407e17.13aa", + "type": "switchNode", + "name": "switch model-customization-id", + "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`'>\n", + "comments": "", + "outputs": 1, + "x": 1004.7978782653809, + "y": 488.86625480651855, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "c78e5862.3ed2f8" + ] + ] + }, + { + "id": "c78e5862.3ed2f8", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 1209.7978782653809, + "y": 488.86623764038086, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "a0bae35d.bd0f3" + ] + ] + }, + { + "id": "a0bae35d.bd0f3", + "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-information.onap-model-information.model-customization-uuid is a required input\" />\n", + "comments": "", + "x": 1361.2264442443848, + "y": 488.8662357330322, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "9b39e778.02f938", + "type": "switchNode", + "name": "switch tenant", + "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'>\n", + "comments": "", + "outputs": 1, + "x": 950.654956817627, + "y": 530.2947654724121, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "204bc24c.52717e" + ] + ] + }, + { + "id": "204bc24c.52717e", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 1208.3692741394043, + "y": 530.2947998046875, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "cd515ce9.de34" + ] + ] + }, + { + "id": "cd515ce9.de34", + "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-information.vnf-request-input.tenant is a required input\" />\n", + "comments": "", + "x": 1359.7978401184082, + "y": 530.2947978973389, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "38ecaf2a.7759a", + "type": "comment", + "name": "Validation of required fields", + "info": "", + "comments": "", + "x": 620.3332824707031, + "y": 213.86605644226074, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "77ab2ae3.a31c54", + "type": "switchNode", + "name": "switch svc-action", + "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", + "comments": "", + "outputs": 1, + "x": 455.5713806152344, + "y": 531.128080368042, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "8e972969.bb2dd8" + ] + ] + }, + { + "id": "8e972969.bb2dd8", + "type": "outcome", + "name": "assign", + "xml": "<outcome value='assign'>\n", + "comments": "", + "outputs": 1, + "x": 618.0713806152344, + "y": 531.128080368042, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "f91647c8.1d72f8" + ] + ] + }, + { + "id": "f91647c8.1d72f8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 773.0713806152344, + "y": 531.128080368042, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "77407e17.13aa", + "9b39e778.02f938", + "4108c244.bc563c" + ] + ] + }, + { + "id": "bfe21f2e.7dff3", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 132.7500098092214, + "y": 86.41365623474121, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "d64c66df.cad6c8" + ] + ] + }, + { + "id": "d64c66df.cad6c8", + "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": 208.03571537562766, + "y": 126.65176773071289, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "2e84fc71.260244" + ] + ] + }, + { + "id": "2e84fc71.260244", + "type": "method", + "name": "method validate-vnf-input", + "xml": "<method rpc='validate-vnf-input' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 183.42863682338157, + "y": 167.66365242004395, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "c428e8d.27cce18" + ] + ] + }, + { + "id": "580b25f3.b0273c", + "type": "comment", + "name": "validate-vnf-input", + "info": "", + "comments": "", + "x": 527.0948660714284, + "y": 34, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "c2bc3d2d.6fb7d", + "type": "switchNode", + "name": "switch service-instance-id", + "xml": "<switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'>\n", + "comments": "", + "outputs": 1, + "x": 483.3571570260183, + "y": 386.50001525878906, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "4f2dc133.3331a" + ] + ] + }, + { + "id": "4f2dc133.3331a", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 695.7857382638113, + "y": 386.5000114440918, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "46f09548.364bec" + ] + ] + }, + { + "id": "46f09548.364bec", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n", + "comments": "", + "x": 847.2143042428152, + "y": 386.50000953674316, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + }, + { + "id": "4108c244.bc563c", + "type": "switchNode", + "name": "switch aic-cloud-region", + "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>\n", + "comments": "", + "outputs": 1, + "x": 980.0000381469727, + "y": 572.5714225769043, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "c4c6b560.de5ab8" + ] + ] + }, + { + "id": "c4c6b560.de5ab8", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 1206.71435546875, + "y": 572.5714569091797, + "z": "a20f7f20.3dd04", + "wires": [ + [ + "c4c87ecd.ccad2" + ] + ] + }, + { + "id": "c4c87ecd.ccad2", + "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.aic-cloud-region is a required input\" />\n", + "comments": "", + "x": 1358.142921447754, + "y": 572.571455001831, + "z": "a20f7f20.3dd04", + "wires": [ + + ] + } ] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json index bfb38e5c..dcdfbec8 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json @@ -1,271 +1,679 @@ [ - { - "id": "7fb1a187.9549f", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 96.66666412353516, - "y": 86.66666412353516, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "c2b8a7b8.a5e428" - ] - ] - }, - { - "id": "c2b8a7b8.a5e428", - "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": 171.9523696899414, - "y": 126.90477561950684, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "89a5ce6c.8a947" - ] - ] - }, - { - "id": "89a5ce6c.8a947", - "type": "method", - "name": "method vnf-topology-operation", - "xml": "<method rpc='vnf-topology-operation' mode='sync'>\n", - "comments": "", - "outputs": 1, - "x": 165.0952911376953, - "y": 166.66665840148926, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "baea3ff6.bd225" - ] - ] - }, - { - "id": "435f3efd.64ab3", - "type": "comment", - "name": "vnf-topology-operation", - "info": "", - "comments": "", - "x": 491.0115203857422, - "y": 34.253007888793945, - "z": "dcb795e3.12ddb8", - "wires": [] - }, - { - "id": "baea3ff6.bd225", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 177.8333740234375, - "y": 334.36017417907715, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "f2687cfc.01d4c", - "b4265d07.b24f2", - "b14b13c7.baa14" - ] - ] - }, - { - "id": "f2687cfc.01d4c", - "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": 470.3333282470703, - "y": 484.52420711517334, - "z": "dcb795e3.12ddb8", - "wires": [] - }, - { - "id": "b4265d07.b24f2", - "type": "switchNode", - "name": "switch svc-action", - "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", - "comments": "", - "outputs": 1, - "x": 473.23804473876953, - "y": 332.5714178085327, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "76164f7d.903b1", - "117347a9.8b7218", - "e07500fb.cff53", - "9b91fc07.60be4", - "bc77aaba.4aabe8" - ] - ] - }, - { - "id": "76164f7d.903b1", - "type": "outcome", - "name": "assign", - "xml": "<outcome value='assign'>\n", - "comments": "", - "outputs": 1, - "x": 672.0475540161133, - "y": 265.1905632019043, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "5ec13553.7c0efc" - ] - ] - }, - { - "id": "117347a9.8b7218", - "type": "outcome", - "name": "unassign", - "xml": "<outcome value='unassign'>\n", - "comments": "", - "outputs": 1, - "x": 676.0951766967773, - "y": 395.38128662109375, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "9d96816e.64ca5" - ] - ] - }, - { - "id": "9b91fc07.60be4", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 670.8094024658203, - "y": 439.57136249542236, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "2717cc4c.7bccc4" - ] - ] - }, - { - "id": "2717cc4c.7bccc4", - "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.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n", - "comments": "", - "x": 856.9998474121094, - "y": 439.5714273452759, - "z": "dcb795e3.12ddb8", - "wires": [] - }, - { - "id": "b14b13c7.baa14", - "type": "call", - "name": "call GENERIC-RESOURCE-API:validate-vnf-input", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 579.0832977294922, - "y": 224.04770278930664, - "z": "dcb795e3.12ddb8", - "wires": [ - [] - ] - }, - { - "id": "5ec13553.7c0efc", - "type": "call", - "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-assign", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1014.1904067993164, - "y": 264.76202392578125, - "z": "dcb795e3.12ddb8", - "wires": [ - [] - ] - }, - { - "id": "3e660d10.204032", - "type": "call", - "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-deactivate", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1025.5236740112305, - "y": 349.0953722000122, - "z": "dcb795e3.12ddb8", - "wires": [ - [] - ] - }, - { - "id": "9d96816e.64ca5", - "type": "call", - "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-unassign", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1021.1902732849121, - "y": 395.0954179763794, - "z": "dcb795e3.12ddb8", - "wires": [ - [] - ] - }, - { - "id": "e07500fb.cff53", - "type": "outcome", - "name": "deactivate", - "xml": "<outcome value='deactivate'>\n", - "comments": "", - "outputs": 1, - "x": 681.190315246582, - "y": 349.76204776763916, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "3e660d10.204032" - ] - ] - }, - { - "id": "1d805763.8f6c79", - "type": "call", - "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-activate", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1018.333251953125, - "y": 306.6666555404663, - "z": "dcb795e3.12ddb8", - "wires": [ - [] - ] - }, - { - "id": "bc77aaba.4aabe8", - "type": "outcome", - "name": "activate", - "xml": "<outcome value='activate'>\n", - "comments": "", - "outputs": 1, - "x": 674.9998931884766, - "y": 307.33333110809326, - "z": "dcb795e3.12ddb8", - "wires": [ - [ - "1d805763.8f6c79" - ] - ] - } + { + "id": "1b5f4355.88b3ed", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 136, + "y": 81.41365623474121, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "92410749.e30c28" + ] + ] + }, + { + "id": "92410749.e30c28", + "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": 211.28570556640625, + "y": 121.65176773071289, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "de7a7cf0.2991d" + ] + ] + }, + { + "id": "de7a7cf0.2991d", + "type": "method", + "name": "method vnf-topology-operation", + "xml": "<method rpc='vnf-topology-operation' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 204.42862701416016, + "y": 161.4136505126953, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "867be286.94ccc" + ] + ] + }, + { + "id": "281a9dd6.337dd2", + "type": "comment", + "name": "vnf-topology-operation", + "info": "", + "comments": "", + "x": 530.344856262207, + "y": 29, + "z": "c9c2af7b.65cd3", + "wires": [ + + ] + }, + { + "id": "867be286.94ccc", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 220.16676330566406, + "y": 348.10718727111816, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "fe43f540.d09078", + "15193abc.c22c05", + "fc3ae627.2d5b18" + ] + ] + }, + { + "id": "fe43f540.d09078", + "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": 512.6667175292969, + "y": 498.27122020721436, + "z": "c9c2af7b.65cd3", + "wires": [ + + ] + }, + { + "id": "15193abc.c22c05", + "type": "switchNode", + "name": "switch svc-action", + "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", + "comments": "", + "outputs": 1, + "x": 515.5714340209961, + "y": 346.31843090057373, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "a43184a6.086e28", + "7b06cbd3.e89e84", + "dae5d288.e7a92", + "7acf72d2.60660c", + "2e7ef9bc.356346", + "d945d7c6.11f878", + "bd3763ee.b90e6" + ] + ] + }, + { + "id": "a43184a6.086e28", + "type": "outcome", + "name": "assign", + "xml": "<outcome value='assign'>\n", + "comments": "", + "outputs": 1, + "x": 927.3809661865234, + "y": 56.937567710876465, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "19bbb0d.1420e4f" + ] + ] + }, + { + "id": "7b06cbd3.e89e84", + "type": "outcome", + "name": "unassign", + "xml": "<outcome value='unassign'>\n", + "comments": "", + "outputs": 1, + "x": 943.4286308288574, + "y": 487.12828254699707, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "c0267b56.9f8598" + ] + ] + }, + { + "id": "7acf72d2.60660c", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 932.1428680419922, + "y": 867.3183660507202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "7fb1d50a.a61dfc" + ] + ] + }, + { + "id": "7fb1d50a.a61dfc", + "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.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n", + "comments": "", + "x": 1165.3332977294922, + "y": 867.3184270858765, + "z": "c9c2af7b.65cd3", + "wires": [ + + ] + }, + { + "id": "fc3ae627.2d5b18", + "type": "call", + "name": "call GENERIC-RESOURCE-API:validate-vnf-input", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 621.4166870117188, + "y": 237.79471588134766, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "19bbb0d.1420e4f", + "type": "call", + "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-assign", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1269.5238189697266, + "y": 56.50902843475342, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "989adce1.617b6", + "type": "call", + "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-deactivate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1750.8571319580078, + "y": 399.84235858917236, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "c0267b56.9f8598", + "type": "call", + "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-unassign", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1288.5237274169922, + "y": 486.8424139022827, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "dae5d288.e7a92", + "type": "outcome", + "name": "deactivate", + "xml": "<outcome value='deactivate'>\n", + "comments": "", + "outputs": 1, + "x": 950.5237579345703, + "y": 342.5090456008911, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "d35c6654.dff7f8" + ] + ] + }, + { + "id": "b233aed1.7cc8b", + "type": "call", + "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-activate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1692.6665802001953, + "y": 221.41364765167236, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "2e7ef9bc.356346", + "type": "outcome", + "name": "activate", + "xml": "<outcome value='activate'>\n", + "comments": "", + "outputs": 1, + "x": 930.3333053588867, + "y": 148.08033561706543, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "b8b2367a.dc9308" + ] + ] + }, + { + "id": "d945d7c6.11f878", + "type": "outcome", + "name": "create", + "xml": "<outcome value='create'>\n", + "comments": "", + "outputs": 1, + "x": 945.0001182556152, + "y": 587.5000038146973, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "11cfb10a.0c9b2f" + ] + ] + }, + { + "id": "bd3763ee.b90e6", + "type": "outcome", + "name": "delete", + "xml": "<outcome value='delete'>\n", + "comments": "", + "outputs": 1, + "x": 943.0001068115234, + "y": 730.5000066757202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "b6227308.758fb" + ] + ] + }, + { + "id": "3b079f6f.6575e", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 1172.0000762939453, + "y": 198.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "91e1f35b.e83e1", + "9ab20bbe.72bfe8" + ] + ] + }, + { + "id": "9ab20bbe.72bfe8", + "type": "outcome", + "name": "ActivateSiteInstance", + "xml": "<outcome value='ActivateSiteInstance'>", + "comments": "", + "outputs": 1, + "x": 1385.4762725830078, + "y": 129.979229927063, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "cc08e8cd.1386a8" + ] + ] + }, + { + "id": "91e1f35b.e83e1", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1354.381004333496, + "y": 221.3572244644165, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "b233aed1.7cc8b" + ] + ] + }, + { + "id": "b8b2367a.dc9308", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1111.0000762939453, + "y": 143.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "3b079f6f.6575e" + ] + ] + }, + { + "id": "cc08e8cd.1386a8", + "type": "call", + "name": "call GENERIC-RESOURCE-API:sotn-vnf-topology-operation-activate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-activate' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1759.0000762939453, + "y": 128.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "c5b71763.802b68", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 1213.0000762939453, + "y": 375.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "68410e70.ad006", + "bb394983.2aedd8" + ] + ] + }, + { + "id": "bb394983.2aedd8", + "type": "outcome", + "name": "DeActivateSiteInstance", + "xml": "<outcome value='DeActivateSiteInstance'>", + "comments": "", + "outputs": 1, + "x": 1426.4762725830078, + "y": 306.979229927063, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "91176b7.7e10a98" + ] + ] + }, + { + "id": "68410e70.ad006", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1395.381004333496, + "y": 398.3572244644165, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "989adce1.617b6" + ] + ] + }, + { + "id": "d35c6654.dff7f8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1152.0000762939453, + "y": 320.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "c5b71763.802b68" + ] + ] + }, + { + "id": "91176b7.7e10a98", + "type": "call", + "name": "call GENERIC-RESOURCE-API:sotn-vnf-topology-operation-deactivate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-deactivate' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1796.0000762939453, + "y": 304.5000123977661, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "2493a0e1.8557e", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 1188.3336029052734, + "y": 640.086371421814, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "83563263.c6fd7", + "db1508ed.23aba8" + ] + ] + }, + { + "id": "db1508ed.23aba8", + "type": "outcome", + "name": "CreateSiteInstance", + "xml": "<outcome value='CreateSiteInstance'>", + "comments": "", + "outputs": 1, + "x": 1401.809799194336, + "y": 571.5655889511108, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "614f2a06.d13b14" + ] + ] + }, + { + "id": "83563263.c6fd7", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1370.7145309448242, + "y": 662.9435834884644, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "b50447b1.828c48" + ] + ] + }, + { + "id": "11cfb10a.0c9b2f", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1127.3336029052734, + "y": 585.086371421814, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "2493a0e1.8557e" + ] + ] + }, + { + "id": "614f2a06.d13b14", + "type": "call", + "name": "call GENERIC-RESOURCE-API:sotn-vnf-topology-operation-create", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-create' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1775.3336029052734, + "y": 570.086371421814, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "b50447b1.828c48", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1511.0001068115234, + "y": 664.0000066757202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "ae568733.43d4f8", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 1189.0001068115234, + "y": 783.0000066757202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "7dcf461f.f62e18", + "3e92266c.ac902a" + ] + ] + }, + { + "id": "3e92266c.ac902a", + "type": "outcome", + "name": "DeleteSiteInstance", + "xml": "<outcome value='DeleteSiteInstance'>", + "comments": "", + "outputs": 1, + "x": 1402.476303100586, + "y": 714.4792242050171, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "bb58fef3.31757" + ] + ] + }, + { + "id": "7dcf461f.f62e18", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1371.3810348510742, + "y": 805.8572187423706, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "efc8c613.2b0088" + ] + ] + }, + { + "id": "b6227308.758fb", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1128.0001068115234, + "y": 728.0000066757202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + "ae568733.43d4f8" + ] + ] + }, + { + "id": "bb58fef3.31757", + "type": "call", + "name": "call GENERIC-RESOURCE-API:sotn-vnf-topology-operation-delete", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-delete' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1776.0001068115234, + "y": 713.0000066757202, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + }, + { + "id": "efc8c613.2b0088", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1511.6666107177734, + "y": 806.9136419296265, + "z": "c9c2af7b.65cd3", + "wires": [ + [ + + ] + ] + } ] diff --git a/platform-logic/generic-resource-api/src/main/resources/graph.versions b/platform-logic/generic-resource-api/src/main/resources/graph.versions index 73e4f7c1..d0e98086 100644 --- a/platform-logic/generic-resource-api/src/main/resources/graph.versions +++ b/platform-logic/generic-resource-api/src/main/resources/graph.versions @@ -80,4 +80,8 @@ GENERIC-RESOURCE-API sotn-network-topology-operation-create ${project.version} s GENERIC-RESOURCE-API sotn-network-topology-operation-delete ${project.version} sync GENERIC-RESOURCE-API sotn-network-topology-operation-activate ${project.version} sync GENERIC-RESOURCE-API sotn-network-topology-operation-deactivate ${project.version} sync -GENERIC-RESOURCE-API validate-sotn-network-input-parameters ${project.version} sync
\ No newline at end of file +GENERIC-RESOURCE-API validate-sotn-network-input-parameters ${project.version} sync +GENERIC-RESOURCE-API site-vnf-topology-operation-create ${project.version} sync +GENERIC-RESOURCE-API site-vnf-topology-operation-delete ${project.version} sync +GENERIC-RESOURCE-API site-vnf-topology-operation-activate ${project.version} sync +GENERIC-RESOURCE-API site-vnf-topology-operation-deactivate ${project.version} sync
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml new file mode 100644 index 00000000..0078f07d --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml @@ -0,0 +1,149 @@ +<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='site-vnf-topology-operation-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`' > + <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].`' /> + </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> + </block> + </outcome> + </switch> + <set> + <parameter name='tmp.sdwan.site' value='false' /> + </set> + <for index='idx' start='0' end='`$ctx.vnf-data.vnf-request-input.vnf-input-parameters.param_length`' > + <block> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='tmp.sdwan.site' value='true' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='tmp.sdwan.site' value='true' /> + </set> + </outcome> + </switch> + </block> + </for> + <switch test="`$tmp.sdwan.site`"> + <outcome value='false'> + <block></block> + </outcome> + <outcome value='true'> + <block atomic="true"></block> + </outcome> + </switch> + <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.' /> + </set> + <set> + <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Active' /> + <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> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' + key='generic-vnf.vnf-id = $prop.vnf-index' > + <parameter name='vnf-id' value='`$prop.vnf-index`' /> + <parameter name='in-maint' value='true' /> + <parameter name='is-closed-loop-disabled' value='false' /> + <parameter name='orchestration-status' value='Active' /> + <parameter name='operational-status' value='Active' /> + <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/'` " /> + </update> + <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="generic-vnf" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-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_site-vnf-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml new file mode 100644 index 00000000..ab728d7c --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml @@ -0,0 +1,137 @@ +<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='site-vnf-topology-operation-create' mode='sync'> + <block atomic="true"> + <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`"> + <block> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + </block> + </for> + <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> + <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-information.vnf-id' value='`$prop.vnf-index`' /> + </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='generic-vnf' + key='generic-vnf.vnf-id = $prop.vnf-index' > + <parameter name='vnf-id' value='`$prop.vnf-index`' /> + <parameter name='vnf-name' value='`$prop.site.name`' /> + <parameter name='vnf-name2' value='`$prop.site.description`' /> + <parameter name='regional-resource-zone' value='`$prop.site.location`' /> + <parameter name='vnf-type' value='prop.site.type' /> + <parameter name='in-maint' value='true' /> + <parameter name='is-closed-loop-disabled' value='false' /> + <parameter name='orchestration-status' value='Created' /> + <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="generic-vnf" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-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_site-vnf-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml new file mode 100644 index 00000000..373706fd --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml @@ -0,0 +1,149 @@ +<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='site-vnf-topology-operation-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`' > + <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].`' /> + </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> + </block> + </outcome> + </switch> + <set> + <parameter name='tmp.sdwan.site' value='false' /> + </set> + <for index='idx' start='0' end='`$ctx.vnf-data.vnf-request-input.vnf-input-parameters.param_length`' > + <block> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='tmp.sdwan.site' value='true' /> + </set> + </outcome> + </switch> + <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='tmp.sdwan.site' value='true' /> + </set> + </outcome> + </switch> + </block> + </for> + <switch test="`$tmp.sdwan.site`"> + <outcome value='false'> + <block></block> + </outcome> + <outcome value='true'> + <block atomic="true"></block> + </outcome> + </switch> + <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.' /> + </set> + <set> + <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' /> + <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> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' + key='generic-vnf.vnf-id = $prop.vnf-index' > + <parameter name='vnf-id' value='`$prop.vnf-index`' /> + <parameter name='in-maint' value='true' /> + <parameter name='is-closed-loop-disabled' value='false' /> + <parameter name='orchestration-status' value='PendingDelete' /> + <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`' /> + <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/'` " /> + </update> + <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="generic-vnf" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-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_site-vnf-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.xml new file mode 100644 index 00000000..2bba7f30 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.xml @@ -0,0 +1,101 @@ +<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='site-vnf-topology-operation-delete' 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`' > + <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].`' /> + </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> + </block> + </outcome> + </switch> + <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingDelete'`"> + <outcome value='false'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Cannot delete a VNF in a Created state" /> + </return> + </outcome> + </switch> + <switch test="`$ctx.vnf-data.vf-modules.vf-module_length`"> + <outcome value='0'> + <block></block> + </outcome> + <outcome value=''> + <block></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="Cannot delete the VNF because there are VFs defined" /> + </return> + </outcome> + </switch> + <switch test='`$service-data.vnfs.vnf_length`'> + <outcome value='1'> + <set> + <parameter name="service-data.vnfs." value=""/> + </set> + </outcome> + <outcome value='Other'> + <block atomic="true"> + <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' > + <set> + <parameter name="$tmpidx" value="`$idx - 1`"/> + <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." /> + </set> + </for> + <set> + <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/> + </set> + <set> + <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/> + </set> + </block> + </outcome> + </switch> + <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' + key='generic-vnf.vnf-id = $prop.vnf-index' ></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/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml index c9515f24..744ab373 100755..100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml @@ -1,44 +1,77 @@ -<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='validate-vnf-input' mode='sync'>
-<block atomic="true"><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.service-instance-id is a required input" />
-</return></outcome></switch><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-information.vnf-id is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value='assign'>
-<block atomic="true"><switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-information.onap-model-information.model-customization-uuid is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-information.vnf-request-input.tenant is a required input" />
-</return></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
-<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.aic-cloud-region is a required input" />
-</return></outcome></switch></block></outcome></switch></block></method></service-logic> +<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='validate-vnf-input' mode='sync'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.request-information.request-action`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="request-information.request-action is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="service-information.service-instance-id is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'> + <outcome value='assign'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="vnf-information.onap-model-information.model-customization-uuid is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="vnf-information.vnf-request-input.tenant is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'> + <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.aic-cloud-region is a required input" /> + </return> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </method> +</service-logic> diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml index 9f4ee0e6..669ed75d 100755..100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml @@ -1,21 +1,77 @@ -<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='vnf-topology-operation' mode='sync'>
-<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >
-</call><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value='assign'>
-<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >
-</call></outcome><outcome value='activate'>
-<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >
-</call></outcome><outcome value='deactivate'>
-<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >
-</call></outcome><outcome value='unassign'>
-<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >
-</call></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-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
-</return></outcome></switch><return status='success'>
-<parameter name="ack-final-indicator" value="Y" />
-<parameter name="error-code" value="200" />
-<parameter name="error-message" value="`$error-message`" />
-</return></block></method></service-logic> +<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='vnf-topology-operation' mode='sync'> + <block atomic="true"> + <call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' ></call> + <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'> + <outcome value='assign'> + <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' ></call> + </outcome> + <outcome value='activate'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.request-information.request-action`'> + <outcome value='ActivateSiteInstance'> + <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-activate' mode='sync' ></call> + </outcome> + <outcome value='Other'> + <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' ></call> + </outcome> + </switch> + </block> + </outcome> + <outcome value='deactivate'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.request-information.request-action`'> + <outcome value='DeActivateSiteInstance'> + <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-deactivate' mode='sync' ></call> + </outcome> + <outcome value='Other'> + <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' ></call> + </outcome> + </switch> + </block> + </outcome> + <outcome value='unassign'> + <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' ></call> + </outcome> + <outcome value='create'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.request-information.request-action`'> + <outcome value='CreateSiteInstance'> + <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-create' mode='sync' ></call> + </outcome> + <outcome value='Other'> + <block></block> + </outcome> + </switch> + </block> + </outcome> + <outcome value='delete'> + <block atomic="true"> + <switch test='`$vnf-topology-operation-input.request-information.request-action`'> + <outcome value='DeleteSiteInstance'> + <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-delete' mode='sync' ></call> + </outcome> + <outcome value='Other'> + <block></block> + </outcome> + </switch> + </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-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" /> + </return> + </outcome> + </switch> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="`$error-message`" /> + </return> + </block> + </method> +</service-logic> |