diff options
11 files changed, 3356 insertions, 2300 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 index c640ab5b..dabcc4f1 100644 --- 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 @@ -1,20 +1,20 @@ [ { - "id": "8213d9f3.3e3b78", + "id": "fe5a38bb.bd0078", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 134.01040649414062, - "y": 78.01041412353516, - "z": "68309cb5.9fbe94", + "x": 108, + "y": 187.0103931427002, + "z": "e876afdc.6a24f", "wires": [ [ - "3fd007b3.454158" + "8fa75912.54ed58" ] ] }, { - "id": "3fd007b3.454158", + "id": "8fa75912.54ed58", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,795 +22,1407 @@ "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", + "x": 183.28570556640625, + "y": 227.24850463867188, + "z": "e876afdc.6a24f", "wires": [ [ - "f3d8ce84.4fd8" + "a48c87a9.a55028" ] ] }, { - "id": "f3d8ce84.4fd8", + "id": "a48c87a9.a55028", "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", + "x": 204.42861938476562, + "y": 317.0103931427002, + "z": "e876afdc.6a24f", "wires": [ [ - "931047c0.e29ba8" + "38f14e2f.c24e22" ] ] }, { - "id": "931047c0.e29ba8", + "id": "38f14e2f.c24e22", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 210.67707061767578, - "y": 379.67708587646484, - "z": "68309cb5.9fbe94", + "x": 192.66673278808594, + "y": 506.6771717071533, + "z": "e876afdc.6a24f", "wires": [ [ - "87b79277.d3a8", - "443f31de.8f2cf", - "e48e518f.1dc2a", - "4a014615.6e9cf8", - "bf95d9ae.8087f8", - "c850e5af.e42fa8", - "b4c6f1a.73d561", - "d7008318.12e1b", - "3993fb6.79aca04", - "2b37bcac.68f084" + "44a8ff3e.e9b76", + "79a45953.cb4488", + "6e5a67bd.c2ddb8", + "dc5b8c85.92a84", + "3adc7192.5bf7fe", + "1ddd800f.cc627", + "708f2def.d37784", + "73349d78.1f3074", + "6ab44a9b.48e9b4", + "3f3b503b.d5da4", + "99fac312.5a742" ] ] }, { - "id": "87b79277.d3a8", + "id": "dc5b8c85.92a84", "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", + "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", "comments": "", "outputs": 1, - "x": 663.1151428222656, - "y": 267.0782470703125, - "z": "68309cb5.9fbe94", + "x": 649.1047821044922, + "y": 325.078284740448, + "z": "e876afdc.6a24f", "wires": [ [ - "73aa520a.b2adbc" + "b5990ea7.a9c72" ] ] }, { - "id": "73aa520a.b2adbc", + "id": "44a8ff3e.e9b76", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "comments": "", + "outputs": 1, + "x": 631.9896621704102, + "y": 135.99998807907104, + "z": "e876afdc.6a24f", + "wires": [ + [ + "def084ef.6fe5a8", + "6c59b52d.4816dc", + "fe5f06d4.6ce418" + ] + ] + }, + { + "id": "def084ef.6fe5a8", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 862.9896392822266, + "y": 138.0000514984131, + "z": "e876afdc.6a24f", + "wires": [ + [ + "a40915eb.62f7c8" + ] + ] + }, + { + "id": "a40915eb.62f7c8", + "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": 1020.7671546936035, + "y": 118.88899993896484, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "6c59b52d.4816dc", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 854.9900665283203, + "y": 173.00007343292236, + "z": "e876afdc.6a24f", + "wires": [ + [ + "7b4738a3.9186a8" + ] + ] + }, + { + "id": "7b4738a3.9186a8", "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1021.2595367431641, + "y": 164.55460691452026, + "z": "e876afdc.6a24f", + "wires": [ + [ + "39aaaddb.c527a2", + "80c14f8c.d4c2", + "fb9527f.4513dd8" + ] + ] + }, + { + "id": "39aaaddb.c527a2", + "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": 909.893337726593, - "y": 267.6338765351102, - "z": "68309cb5.9fbe94", + "x": 1291.2756271362305, + "y": 108.42860794067383, + "z": "e876afdc.6a24f", "wires": [ [ - "ac680e81.777c9", - "27ece0ee.53311", - "2e9d64a5.63180c", - "ad341ac7.a856e8", - "43160102.ca0c8", - "8a88d2d2.3cbb4" + "792cd7fe.bce288" ] ] }, { - "id": "ac680e81.777c9", + "id": "80c14f8c.d4c2", "type": "switchNode", - "name": "switch name", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1227.5769805908203, + "y": 159.41179656982422, + "z": "e876afdc.6a24f", + "wires": [ + [ + "767a61a0.371db" + ] + ] + }, + { + "id": "767a61a0.371db", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1379.0057830810547, + "y": 159.98322677612305, + "z": "e876afdc.6a24f", + "wires": [ + [ + "10547f9b.2e5b4" + ] + ] + }, + { + "id": "506c3f6d.abfb3", + "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": 1115.1152267456055, - "y": 222.63385391235352, - "z": "68309cb5.9fbe94", + "x": 1688.7043685913086, + "y": 68.67873001098633, + "z": "e876afdc.6a24f", "wires": [ [ - "f0bc6f88.f42a7" + "970983d7.84ecd" ] ] }, { - "id": "f0bc6f88.f42a7", + "id": "10547f9b.2e5b4", + "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": 1517.434181213379, + "y": 161.12604904174805, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "970983d7.84ecd", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1302.1152267456055, - "y": 218.63385391235352, - "z": "68309cb5.9fbe94", + "x": 1862.6568489074707, + "y": 68.57145023345947, + "z": "e876afdc.6a24f", "wires": [ [ - "a80ac0f1.029e7" + "13efb35.8a5a24d" ] ] }, { - "id": "a80ac0f1.029e7", + "id": "13efb35.8a5a24d", "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", + "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": 2058.1885986328125, + "y": 68.32144069671631, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "fe5f06d4.6ce418", + "type": "outcome", + "name": "0", + "xml": "<outcome value='0'>\n", "comments": "", - "x": 1470.1152267456055, - "y": 219.23386001586914, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 860.9584503173828, + "y": 100.96874046325684, + "z": "e876afdc.6a24f", "wires": [ - + [ + "a40915eb.62f7c8" + ] ] }, { - "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", + "id": "3adc7192.5bf7fe", + "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": 576.3336982727051, + "y": 689.3441772460938, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "6ab44a9b.48e9b4", + "type": "set", + "name": "set vnf-level-oper-status to Active", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n", + "comments": "", + "x": 638.8138885498047, + "y": 523.6816167831421, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "73349d78.1f3074", + "type": "set", + "name": "set vnf-index and vnf-object-path", + "xml": "<set>\n<parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$tmp.vidx].vnf-id + '/vnf-data/'` \" />", + "comments": "", + "x": 638.50048828125, + "y": 480.3441514968872, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "aaa950b9.3f56b", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1132.9549446105957, - "y": 265.63384914398193, - "z": "68309cb5.9fbe94", + "x": 1565.500316619873, + "y": 818.0003184080124, + "z": "e876afdc.6a24f", "wires": [ [ - "3c96f97e.2329d6" + "88dbfad5.81b4c8" ] ] }, { - "id": "3c96f97e.2329d6", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "88dbfad5.81b4c8", + "type": "set", + "name": "set controller data", + "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n", + "comments": "", + "x": 1754.0004119873047, + "y": 812.0003280639648, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "1c9cd1a7.9cc68e", + "type": "not-found", + "name": "not-found", + "xml": "<outcome value='not-found'>\n", "comments": "", "outputs": 1, - "x": 1319.9549446105957, - "y": 261.63384914398193, - "z": "68309cb5.9fbe94", + "x": 1568.991283416748, + "y": 865.5743540525436, + "z": "e876afdc.6a24f", "wires": [ [ - "38a8969d.eda21a" + "55bc7178.25cc8" ] ] }, { - "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", + "id": "55bc7178.25cc8", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", "comments": "", - "x": 1481.2884254455566, - "y": 261.09500885009766, - "z": "68309cb5.9fbe94", + "x": 1742.5626945495605, + "y": 853.860090136528, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "98e7b2b4.03262", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1561.324291229248, + "y": 906.9076670408249, + "z": "e876afdc.6a24f", "wires": [ - + [ + "201a39ec.7051b6" + ] ] }, { - "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", + "id": "201a39ec.7051b6", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", + "comments": "", + "x": 1749.0968475341797, + "y": 902.3468598127365, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "fccf6b1b.062f88", + "type": "get-resource", + "name": "get-resource esr-thirdparty-sdnc", + "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n", "comments": "", "outputs": 1, - "x": 1123.04105758667, - "y": 308.0411911010742, - "z": "68309cb5.9fbe94", + "x": 1298.500228881836, + "y": 866.0003242492676, + "z": "e876afdc.6a24f", "wires": [ [ - "4384d4ab.76bf6c" + "aaa950b9.3f56b", + "1c9cd1a7.9cc68e", + "98e7b2b4.03262" ] ] }, { - "id": "4384d4ab.76bf6c", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "9d503875.591ee8", + "type": "execute", + "name": "execute RestApiCallNode Create SDWAN site", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />", "comments": "", "outputs": 1, - "x": 1310.04105758667, - "y": 304.0411911010742, - "z": "68309cb5.9fbe94", + "x": 1352.0003204345703, + "y": 1023.0002918243408, + "z": "e876afdc.6a24f", "wires": [ [ - "3079a852.4cd8f8" + "caf01e6b.3d325" ] ] }, { - "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", + "id": "e7caa58d.8c0ca8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "comments": "", - "x": 1478.04105758667, - "y": 304.64119720458984, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1820.6667022705078, + "y": 1037.8891677856445, + "z": "e876afdc.6a24f", "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", + "id": "67309670.5d6238", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n", + "comments": "", + "x": 1796.111343383789, + "y": 1099.4445505142212, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "e2a202c3.ab071", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", "comments": "", "outputs": 1, - "x": 1113.0103759765625, - "y": 176.607177734375, - "z": "68309cb5.9fbe94", + "x": 1651.111343383789, + "y": 1096.4445505142212, + "z": "e876afdc.6a24f", "wires": [ [ - "653e71ed.565a9" + "67309670.5d6238" ] ] }, { - "id": "653e71ed.565a9", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "caf01e6b.3d325", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1300.0103759765625, - "y": 172.607177734375, - "z": "68309cb5.9fbe94", + "x": 1647.5557174682617, + "y": 1038.1113357543945, + "z": "e876afdc.6a24f", "wires": [ [ - "2466a0b0.31d85" + "e7caa58d.8c0ca8" ] ] }, { - "id": "2466a0b0.31d85", + "id": "3f3b503b.d5da4", "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", + "name": "copy input data to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />", + "comments": "", + "x": 627.0004348754883, + "y": 566.0005855560303, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "93347dcc.a6583", + "type": "execute", + "name": "execute RestApiCallNode Get token", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>", + "comments": "", + "outputs": 1, + "x": 1299.7543258666992, + "y": 959.0043849945068, + "z": "e876afdc.6a24f", + "wires": [ + [ + "c5378ae6.053748", + "cfecc2b7.775a9" + ] + ] + }, + { + "id": "c5378ae6.053748", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", - "x": 1468.0103759765625, - "y": 173.20718383789062, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1564.754207611084, + "y": 944.004280090332, + "z": "e876afdc.6a24f", "wires": [ - + [ + "574fb0f8.2705b" + ] ] }, { - "id": "43160102.ca0c8", + "id": "cfecc2b7.775a9", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", + "comments": "", + "outputs": 1, + "x": 1557.004207611084, + "y": 985.6471633911133, + "z": "e876afdc.6a24f", + "wires": [ + [ + "a43bfc8d.c3ede" + ] + ] + }, + { + "id": "a43bfc8d.c3ede", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1683.087703704834, + "y": 985.893196105957, + "z": "e876afdc.6a24f", + "wires": [ + [] + ] + }, + { + "id": "574fb0f8.2705b", + "type": "set", + "name": "set token-id", + "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", + "comments": "", + "x": 1701.754207611084, + "y": 944.004280090332, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "bbce2e16.d72aa", + "type": "comment", + "name": "tmp.thirdparty-sdnc-id is hardcoded value?", + "info": "", + "comments": "", + "x": 1295.0041198730469, + "y": 833.0042457580566, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "708f2def.d37784", + "type": "set", + "name": "set vnf-index to service data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].name' value='siteId' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].value' value='`$site-result[0].id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n", + "comments": "", + "x": 628.0042037963867, + "y": 442.00424671173096, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "c2a60a1e.d3e7f8", "type": "switchNode", - "name": "switch type", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "name": "switch ActivateSDWANDeviceInstance", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`\">\n\n \n \n\n", "comments": "", "outputs": 1, - "x": 1122.0103759765625, - "y": 351.60717010498047, - "z": "68309cb5.9fbe94", + "x": 1756.2543411254883, + "y": 138.00390720367432, + "z": "e876afdc.6a24f", "wires": [ [ - "5f80b289.c102cc" + "3b24cc2e.de2954" ] ] }, { - "id": "5f80b289.c102cc", + "id": "3b24cc2e.de2954", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1309.0103759765625, - "y": 347.60717010498047, - "z": "68309cb5.9fbe94", + "x": 1983.2541961669922, + "y": 137.00390625, + "z": "e876afdc.6a24f", "wires": [ [ - "123b0821.89fa08" + "68cbbed8.08fd8" ] ] }, { - "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' />", + "id": "792cd7fe.bce288", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", - "x": 1507.0103759765625, - "y": 347.2071838378906, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1526.254165649414, + "y": 109.00389289855957, + "z": "e876afdc.6a24f", "wires": [ - + [ + "c2a60a1e.d3e7f8", + "506c3f6d.abfb3" + ] ] }, { - "id": "8a88d2d2.3cbb4", + "id": "460c13d8.2f2f3c", + "type": "comment", + "name": "Get devices", + "info": "", + "comments": "", + "x": 1790.0043563842773, + "y": 158.75392246246338, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "79a45953.cb4488", + "type": "set", + "name": "set prop.site.sdwan false", + "xml": "<set>\n<parameter name='prop.site.sdwan' value=\"false\" />\n\n", + "comments": "", + "x": 618, + "y": 229.0000123977661, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "1ddd800f.cc627", "type": "switchNode", - "name": "switch role", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "name": "switch prop.site.sdwan", + "xml": "<switch test=\"`$prop.site.sdwan`\">\n", "comments": "", "outputs": 1, - "x": 1125.0103759765625, - "y": 394.60717010498047, - "z": "68309cb5.9fbe94", + "x": 607.0001220703125, + "y": 384.6666269302368, + "z": "e876afdc.6a24f", "wires": [ [ - "dbc514.9b453af" + "7c42fbb6.c14864" ] ] }, { - "id": "dbc514.9b453af", + "id": "7c42fbb6.c14864", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1312.0103759765625, - "y": 390.60717010498047, - "z": "68309cb5.9fbe94", + "x": 786.000171661377, + "y": 381.6666269302368, + "z": "e876afdc.6a24f", "wires": [ [ - "78dc31fa.1149c" + "9d5e017e.9579d" ] ] }, { - "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", + "id": "9d5e017e.9579d", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 960.000244140625, + "y": 908.6668318510056, + "z": "e876afdc.6a24f", "wires": [ - + [ + "93347dcc.a6583", + "9d503875.591ee8", + "69c072d6.f6ae7c", + "fccf6b1b.062f88" + ] ] }, { - "id": "443f31de.8f2cf", - "type": "switchNode", - "name": "switch service-data.vnfs.vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "id": "68cbbed8.08fd8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1921.6669616699219, + "y": 248.00000762939453, + "z": "e876afdc.6a24f", + "wires": [ + [ + "7e0b70dd.7568" + ] + ] + }, + { + "id": "7e0b70dd.7568", + "type": "for", + "name": "for loop deviceidx - Get deviceId from servicedata", + "xml": "<for index=\"deviceidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">", "comments": "", "outputs": 1, - "x": 671, - "y": 69, - "z": "68309cb5.9fbe94", + "x": 2205.0007934570312, + "y": 251.00003814697266, + "z": "e876afdc.6a24f", "wires": [ [ - "d2748c44.5140a", - "132b0e47.fe6172", - "6c7ae40f.24628c" + "bb46e6b5.934b78" ] ] }, { - "id": "d2748c44.5140a", - "type": "other", - "name": "Null", - "xml": "<outcome value=''>\n", + "id": "bb46e6b5.934b78", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 1084, - "y": 62.00006103515625, - "z": "68309cb5.9fbe94", + "x": 2135.00057220459, + "y": 334.0002021789551, + "z": "e876afdc.6a24f", "wires": [ [ - "910f30c.abfcad" + "68a7dd5e.b34a34" ] ] }, { - "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", + "id": "68a7dd5e.b34a34", + "type": "switchNode", + "name": "switch deviceId", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`\">\n", "comments": "", - "x": 1302.7774658203125, - "y": 37.889007568359375, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 2295.0008277893066, + "y": 336.00005531311035, + "z": "e876afdc.6a24f", "wires": [ - + [ + "eb058687.6ea298" + ] ] }, { - "id": "132b0e47.fe6172", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", + "id": "eb058687.6ea298", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 996.0003662109375, - "y": 116.00007629394531, - "z": "68309cb5.9fbe94", + "x": 2447.0009994506836, + "y": 335.00005531311035, + "z": "e876afdc.6a24f", "wires": [ [ - "2df38444.65759c" + "468bec8a.569b34" ] ] }, { - "id": "2df38444.65759c", + "id": "468bec8a.569b34", + "type": "set", + "name": "set deviceId", + "xml": "<set>\n<parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />\n<parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' />\n", + "comments": "", + "x": 2587.001003265381, + "y": 334.6000099182129, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "fb9527f.4513dd8", + "type": "set", + "name": "set prop.site.deviceId_length", + "xml": "<set>\n<parameter name='prop.site.deviceId_length' value='0' />\n", + "comments": "", + "x": 1264.000072479248, + "y": 64, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "b5990ea7.a9c72", "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", "outputs": 1, - "x": 1167.2698974609375, - "y": 99.55461120605469, - "z": "68309cb5.9fbe94", + "x": 1026.0003089904785, + "y": 424.00009059906006, + "z": "e876afdc.6a24f", "wires": [ [ - "1580b603.a7115a", - "2393097b.207106" + "982966d0.a9a8e8", + "f41887bb.544248", + "4ca7692.19f0f98", + "e068ac07.3a75f", + "caf25c5.4962fa", + "a0b5938f.d00a8", + "a3f45232.9e1a1", + "b56118e.cb3ebe8", + "6dc0a862.fb8db8", + "beea925c.34a3c" ] ] }, { - "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", + "id": "beea925c.34a3c", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n\n", "comments": "", "outputs": 1, - "x": 1465.285888671875, - "y": 80.42861938476562, - "z": "68309cb5.9fbe94", + "x": 1260.2222442626953, + "y": 283.000036239624, + "z": "e876afdc.6a24f", "wires": [ [ - "d610b844.0652c8" + "86ab3afd.9888f8" ] ] }, { - "id": "2393097b.207106", + "id": "86ab3afd.9888f8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1438.2222576141357, + "y": 286.000036239624, + "z": "e876afdc.6a24f", + "wires": [ + [ + "daf4941f.5f7e68" + ] + ] + }, + { + "id": "daf4941f.5f7e68", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1585.222267150879, + "y": 285.60003185272217, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "982966d0.a9a8e8", "type": "switchNode", - "name": "switch tmp.vidx ", - "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "name": "switch type", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", "comments": "", "outputs": 1, - "x": 1386.5872802734375, - "y": 123.41180419921875, - "z": "68309cb5.9fbe94", + "x": 1239.1179161071777, + "y": 580.9734859466553, + "z": "e876afdc.6a24f", "wires": [ [ - "dd032095.3aded" + "bbc62e0b.50f11" ] ] }, { - "id": "dd032095.3aded", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>\n", + "id": "bbc62e0b.50f11", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1587.015869140625, - "y": 128.98321533203125, - "z": "68309cb5.9fbe94", + "x": 1418.1177597045898, + "y": 581.9734058380127, + "z": "e876afdc.6a24f", "wires": [ [ - "40072c93.943294" + "91550639.119c38" ] ] }, { - "id": "d610b844.0652c8", + "id": "91550639.119c38", + "type": "set", + "name": "set type", + "xml": "<set>\n<parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />", + "comments": "", + "x": 1568.1177711486816, + "y": 583.5734205245972, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "f41887bb.544248", "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", + "name": "switch role", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", "comments": "", "outputs": 1, - "x": 1775.7144775390625, - "y": 78.6787109375, - "z": "68309cb5.9fbe94", + "x": 1240.1175918579102, + "y": 624.9735260009766, + "z": "e876afdc.6a24f", "wires": [ [ - "fc26d8de.94b0a8" + "2facef98.25444" ] ] }, { - "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", + "id": "2facef98.25444", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1410.1175994873047, + "y": 634.9734888076782, + "z": "e876afdc.6a24f", + "wires": [ + [ + "2de9cb05.be1da4" + ] + ] + }, + { + "id": "6dc0a862.fb8db8", + "type": "switchNode", + "name": "switch location-name", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", "comments": "", - "x": 1758.4443359375, - "y": 129.12606811523438, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1283.117431640625, + "y": 324.97334480285645, + "z": "e876afdc.6a24f", "wires": [ - + [ + "bd2efb08.1c1158" + ] ] }, { - "id": "fc26d8de.94b0a8", + "id": "bd2efb08.1c1158", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1981.666748046875, - "y": 77.57144165039062, - "z": "68309cb5.9fbe94", + "x": 1447.117603302002, + "y": 324.97334575653076, + "z": "e876afdc.6a24f", "wires": [ [ - "7149eeb8.6b351" + "4ee2193.b3e14e8" ] ] }, { - "id": "7149eeb8.6b351", + "id": "4ee2193.b3e14e8", "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", + "name": "set location-name", + "xml": "<set>\n<parameter name='prop.site.location-name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 2220.198486328125, - "y": 73.32144165039062, - "z": "68309cb5.9fbe94", + "x": 1609.1176147460938, + "y": 324.57340240478516, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "b56118e.cb3ebe8", + "type": "switchNode", + "name": "switch address", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", + "comments": "", + "outputs": 1, + "x": 1266.117431640625, + "y": 360.9733486175537, + "z": "e876afdc.6a24f", "wires": [ - + [ + "86891afb.54bc78" + ] ] }, { - "id": "6c7ae40f.24628c", - "type": "outcome", - "name": "0", - "xml": "<outcome value='0'>\n", + "id": "86891afb.54bc78", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1077.96875, - "y": 25.96875, - "z": "68309cb5.9fbe94", + "x": 1436.1172790527344, + "y": 368.9733476638794, + "z": "e876afdc.6a24f", "wires": [ [ - "910f30c.abfcad" + "4e393c27.e3c2c4" ] ] }, { - "id": "cdf59db6.a5688", - "type": "comment", - "name": "TODO: Check validation", - "info": "", + "id": "4e393c27.e3c2c4", + "type": "set", + "name": "set location-address", + "xml": "<set>\n<parameter name='prop.site.location-address' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1624.1174545288086, + "y": 364.5733232498169, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "a3f45232.9e1a1", + "type": "switchNode", + "name": "switch postcode", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", "comments": "", - "x": 628, - "y": 21, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1267.117431640625, + "y": 402.97330951690674, + "z": "e876afdc.6a24f", "wires": [ - + [ + "8476b452.fd9df8" + ] ] }, { - "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", + "id": "8476b452.fd9df8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", - "x": 606.3436889648438, - "y": 717.34375, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1432.117603302002, + "y": 401.97330951690674, + "z": "e876afdc.6a24f", "wires": [ - + [ + "44bf054e.3e0bdc" + ] ] }, { - "id": "4a014615.6e9cf8", + "id": "44bf054e.3e0bdc", "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", + "name": "set location-postcode", + "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1619.1174545288086, + "y": 403.57332611083984, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "4ca7692.19f0f98", + "type": "switchNode", + "name": "switch controlPoints", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`\">\n", "comments": "", - "x": 662.8237915039062, - "y": 543.680908203125, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1261.0007247924805, + "y": 670.0002679824829, + "z": "e876afdc.6a24f", "wires": [ - + [ + "6d9c8ede.093ce" + ] ] }, { - "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", + "id": "6d9c8ede.093ce", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", - "x": 652.6769409179688, - "y": 502.6771240234375, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1421.0007400512695, + "y": 681.0003499984741, + "z": "e876afdc.6a24f", "wires": [ - + [ + "473f9a91.4991c4" + ] ] }, { - "id": "c850e5af.e42fa8", + "id": "6c8e946.594c76c", + "type": "set", + "name": "set role", + "xml": "<set>\n<parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n", + "comments": "", + "x": 1764.0007648468018, + "y": 602.0002603530884, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "c48a4f4.5838eb", + "type": "set", + "name": "set controlPoint", + "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", + "comments": "", + "x": 1806.0007667541504, + "y": 701.0003480911255, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "99fac312.5a742", "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", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='generated-site-id' value='`$site-result[0].site-id`' /> \n<parameter name='operational-status' value='Active' />\n", + "comments": "", + "outputs": 1, + "x": 657.0001220703125, + "y": 627.0001001358032, + "z": "e876afdc.6a24f", + "wires": [ + [] + ] + }, + { + "id": "6e5a67bd.c2ddb8", + "type": "execute", + "name": "execute Properties", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n", + "comments": "", + "outputs": 1, + "x": 603.0000381469727, + "y": 274.00000190734863, + "z": "e876afdc.6a24f", + "wires": [ + [] + ] + }, + { + "id": "239b469c.39b6fa", + "type": "execute", + "name": "execute split roles", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", "comments": "", "outputs": 1, - "x": 683.0104370117188, - "y": 627.5659790039062, - "z": "68309cb5.9fbe94", + "x": 1820.6671142578125, + "y": 658.0001821517944, + "z": "e876afdc.6a24f", + "wires": [ + [] + ] + }, + { + "id": "2de9cb05.be1da4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1567.667251586914, + "y": 638.0001821517944, + "z": "e876afdc.6a24f", "wires": [ [ - + "6c8e946.594c76c", + "239b469c.39b6fa" ] ] }, { - "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": "", + "id": "473f9a91.4991c4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 654.0104370117188, - "y": 668.34375, - "z": "68309cb5.9fbe94", + "x": 1579.6670875549316, + "y": 685.0001058578491, + "z": "e876afdc.6a24f", "wires": [ [ - + "c48a4f4.5838eb", + "363cf22d.62d78e" ] ] }, { - "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/'` \" />", + "id": "363cf22d.62d78e", + "type": "execute", + "name": "execute split control points", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", "comments": "", - "x": 659.5104370117188, - "y": 585.34375, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1848.667106628418, + "y": 762.0001888275146, + "z": "e876afdc.6a24f", "wires": [ - + [] ] }, { - "id": "2b37bcac.68f084", + "id": "a0b5938f.d00a8", "type": "switchNode", - "name": "switch sdwan.site", - "xml": "<switch test=\"`$tmp.sdwan.site`\">\n", + "name": "switch latitude", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", + "comments": "", + "outputs": 1, + "x": 1257.333740234375, + "y": 447.0000867843628, + "z": "e876afdc.6a24f", + "wires": [ + [ + "b21592f4.5618f" + ] + ] + }, + { + "id": "b21592f4.5618f", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 615, - "y": 348, - "z": "68309cb5.9fbe94", + "x": 1433.3335876464844, + "y": 442.0000457763672, + "z": "e876afdc.6a24f", "wires": [ [ - "a9004d13.a7ec4", - "27d5839b.ac9ebc" + "29af6eef.bf06b2" ] ] }, { - "id": "3993fb6.79aca04", + "id": "29af6eef.bf06b2", "type": "set", - "name": "set sdwan.site", - "xml": "<set>\n<parameter name='tmp.sdwan.site' value='false' />\n", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1607.333595275879, + "y": 440.6000623703003, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "caf25c5.4962fa", + "type": "switchNode", + "name": "switch longitude", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", "comments": "", - "x": 606, - "y": 217, - "z": "68309cb5.9fbe94", + "outputs": 1, + "x": 1260.333740234375, + "y": 487.00012969970703, + "z": "e876afdc.6a24f", "wires": [ - + [ + "7df2c337.3c1b4c" + ] ] }, { - "id": "27d5839b.ac9ebc", + "id": "7df2c337.3c1b4c", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 751, - "y": 441, - "z": "68309cb5.9fbe94", + "x": 1432.3337478637695, + "y": 482.00017166137695, + "z": "e876afdc.6a24f", "wires": [ [ - "1ed61d3a.a1c323" + "86c3a1c7.6636a" ] ] }, { - "id": "a9004d13.a7ec4", + "id": "86c3a1c7.6636a", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1614.3336029052734, + "y": 485.6000232696533, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "4e291944.287288", "type": "outcomeTrue", - "name": "false", - "xml": "<outcome value='false'>\n", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 794.8887939453125, - "y": 361.00006103515625, - "z": "68309cb5.9fbe94", + "x": 1423.3337478637695, + "y": 532.0001745223999, + "z": "e876afdc.6a24f", "wires": [ [ - "289c3fbe.f462" + "f818ecd2.ba80f" ] ] }, { - "id": "289c3fbe.f462", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "2bbb97af.762cc8", + "type": "set", + "name": "set emails", + "xml": "<set>\n<parameter name='prop.site.emails' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1781.3334426879883, + "y": 500.6000266075134, + "z": "e876afdc.6a24f", + "wires": [] + }, + { + "id": "e068ac07.3a75f", + "type": "switchNode", + "name": "switch emails", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", "comments": "", "outputs": 1, - "x": 934, - "y": 361, - "z": "68309cb5.9fbe94", + "x": 1250.3338165283203, + "y": 532.0001745223999, + "z": "e876afdc.6a24f", "wires": [ [ - + "4e291944.287288" ] ] }, { - "id": "1ed61d3a.a1c323", + "id": "3f69ab6a.936704", + "type": "execute", + "name": "execute split emails", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", + "comments": "", + "outputs": 1, + "x": 1806.9997863769531, + "y": 546.9999294281006, + "z": "e876afdc.6a24f", + "wires": [ + [] + ] + }, + { + "id": "f818ecd2.ba80f", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 913, - "y": 440, - "z": "68309cb5.9fbe94", + "x": 1585.333755493164, + "y": 533.0000920295715, + "z": "e876afdc.6a24f", "wires": [ [ - + "2bbb97af.762cc8", + "3f69ab6a.936704" ] ] }, { - "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": "", + "id": "69c072d6.f6ae7c", + "type": "set", + "name": "set siteId", + "xml": "<set>\n<parameter name='prop.site.siteId' value=\"\" />\n\n", "comments": "", - "x": 1829, - "y": 358, - "z": "68309cb5.9fbe94", - "wires": [ - - ] + "x": 1220.0000762939453, + "y": 762.0000247955322, + "z": "e876afdc.6a24f", + "wires": [] }, { - "id": "c30ca451.c8aa78", + "id": "c77bd4e4.651878", "type": "comment", - "name": "TODO: AAI", + "name": "should be null in request", "info": "", "comments": "", - "x": 900, - "y": 638, - "z": "68309cb5.9fbe94", - "wires": [ - - ] + "x": 1229, + "y": 732.999979019165, + "z": "e876afdc.6a24f", + "wires": [] } -] +]
\ No newline at end of file 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 index bc081931..761c6ebb 100644 --- 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 @@ -1,20 +1,20 @@ [ { - "id": "b9ac105c.8ec8f", + "id": "3fa6c370.2c61bc", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 97.01041412353516, - "y": 47.41365957260132, - "z": "c9244d8c.dbc33", + "x": 168, + "y": 73, + "z": "6855f1c0.cd5d9", "wires": [ [ - "cdfd9c31.ba898" + "ac645450.910698" ] ] }, { - "id": "cdfd9c31.ba898", + "id": "ac645450.910698", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,669 +22,925 @@ "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", + "x": 267.2856979370117, + "y": 147.23810789268464, + "z": "6855f1c0.cd5d9", "wires": [ [ - "8cec72fa.c96d5" + "5fcc8bf6.3fd144" ] ] }, { - "id": "8cec72fa.c96d5", + "id": "5fcc8bf6.3fd144", "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", + "x": 288.4286117553711, + "y": 236.99999639671296, + "z": "6855f1c0.cd5d9", "wires": [ [ - "c88bbc51.c05a" + "47608ee1.25de2" ] ] }, { - "id": "c88bbc51.c05a", + "id": "47608ee1.25de2", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 197.67707061767578, - "y": 383.08032772224396, - "z": "c9244d8c.dbc33", + "x": 268.6666564941406, + "y": 408.66666814964265, + "z": "6855f1c0.cd5d9", "wires": [ [ - "6bf31f55.e7d98", - "c99fe643.20ccd8", - "34e47add.75c586", - "fe017e7c.6df8", - "bb192e9e.a5c6c", - "10180061.fe9e8", - "bc730e3d.2a3f4", - "fd6d952f.2ce658", - "bb650f09.4befc", - "c7f37fdc.75322", - "8a7774f7.eba7c8" + "4ce2c94.4697a38", + "fa21f7d4.da1878", + "9f3ac02c.307b8", + "fd3d2238.2c1fe", + "e2f2310b.40c4e", + "5ac01571.a9444c", + "8b6a96f4.ee9ed8", + "e97be576.bbc408", + "ec41d40.2a2183", + "7988a83e.fa96c8", + "5922b71f.a74538" ] ] }, { - "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", + "id": "fa21f7d4.da1878", "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": [ - - ] + "x": 686.8133697509766, + "y": 649.6705284118652, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "6bf31f55.e7d98", + "id": "4ce2c94.4697a38", "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": [ - - ] + "x": 673.6665191650391, + "y": 547.6667442321777, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "fe017e7c.6df8", + "id": "8b6a96f4.ee9ed8", "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", + "x": 666.0000152587891, + "y": 486.33337020874023, + "z": "6855f1c0.cd5d9", "wires": [ - [ - - ] + [] ] }, { - "id": "bb192e9e.a5c6c", + "id": "9f3ac02c.307b8", "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": [ - - ] + "x": 664.0000152587891, + "y": 603.3333702087402, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "10180061.fe9e8", + "id": "fd3d2238.2c1fe", "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", + "x": 697.9999771118164, + "y": 287.33335971832275, + "z": "6855f1c0.cd5d9", "wires": [ [ - "da5d62eb.78235", - "6a8033d.3310ccc" + "af77c768.729e28", + "9f82c38a.b1c5e" ] ] }, { - "id": "da5d62eb.78235", + "id": "af77c768.729e28", "type": "other", "name": "NULL", "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 836.7247467041016, - "y": 274.8898072242737, - "z": "c9244d8c.dbc33", + "x": 932.7143630981445, + "y": 282.4761800765991, + "z": "6855f1c0.cd5d9", "wires": [ [ - "aa63df44.dc701" + "7f22439b.b7e59c" ] ] }, { - "id": "aa63df44.dc701", + "id": "7f22439b.b7e59c", "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": [ - - ] + "x": 1093.0000686645508, + "y": 282.4762716293335, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "6a8033d.3310ccc", + "id": "9f82c38a.b1c5e", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 838.1533088684082, - "y": 339.17562532424927, - "z": "c9244d8c.dbc33", + "x": 929.1429023742676, + "y": 315.76201152801514, + "z": "6855f1c0.cd5d9", "wires": [ [ - "62e804c3.fcb0ec" + "f21508e6.2fefd8" ] ] }, { - "id": "fde7e6bf.6c5328", + "id": "d3b6023e.8241", "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": [ - - ] + "x": 1322.000144958496, + "y": 294.04773712158203, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "59c71e1.00ba4e", + "id": "386f3e01.1a8bf2", "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", + "x": 1310.4287643432617, + "y": 329.0477089881897, + "z": "6855f1c0.cd5d9", "wires": [ [ - "17e77a68.a0edf6" + "29eb3ce3.eefee4" ] ] }, { - "id": "62e804c3.fcb0ec", + "id": "f21508e6.2fefd8", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 973.8675689697266, - "y": 339.1755909919739, - "z": "c9244d8c.dbc33", + "x": 1063.8571853637695, + "y": 317.761981010437, + "z": "6855f1c0.cd5d9", "wires": [ [ - "fde7e6bf.6c5328", - "59c71e1.00ba4e" + "d3b6023e.8241", + "386f3e01.1a8bf2" ] ] }, { - "id": "17e77a68.a0edf6", + "id": "29eb3ce3.eefee4", "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", + "x": 1703.714500427246, + "y": 329.6191930770874, + "z": "6855f1c0.cd5d9", "wires": [ [ - "5bee4b88.02f404" + "f4656079.b7339" ] ] }, { - "id": "5bee4b88.02f404", + "id": "f4656079.b7339", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1639.0103912353516, - "y": 420.6041626930237, - "z": "c9244d8c.dbc33", + "x": 1985.000202178955, + "y": 328.190598487854, + "z": "6855f1c0.cd5d9", "wires": [ [ - "45cdc14c.e4a58" + "a7f60449.092558" ] ] }, { - "id": "45cdc14c.e4a58", + "id": "a7f60449.092558", "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": [ - - ] + "x": 2113.5715713500977, + "y": 379.19061279296875, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "22974b6a.26eb04", + "id": "ea3b233.535f1e", "type": "comment", - "name": "make sure this VNF doesn't exist already", + "name": "make sure this vnf-id doesn't exist already", "info": "", "comments": "", - "x": 1503.867473602295, - "y": 320.6041626930237, - "z": "c9244d8c.dbc33", - "wires": [ - - ] + "x": 1672.8571166992188, + "y": 293.1905851364136, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "bc730e3d.2a3f4", + "id": "e2f2310b.40c4e", "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", + "x": 640.0000152587891, + "y": 441.33337020874023, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "5ac01571.a9444c", + "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": 679.1047325134277, + "y": 370.0678906440735, + "z": "6855f1c0.cd5d9", "wires": [ - + [ + "93e1cbb7.57ce48" + ] ] }, { - "id": "fd6d952f.2ce658", + "id": "7988a83e.fa96c8", + "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": 642.0000419616699, + "y": 872.5969972610474, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "e97be576.bbc408", "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", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $prop.vnf-index' >\n<parameter name='id' value='`$prop.vnf-index`' /> \n<parameter name='name' value='`$prop.site.name`' />\n<parameter name='description' value='`$prop.site.description`' />\n<parameter name='type' value='prop.site.type' />\n<parameter name='role' value='prop.site.role' />\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", + "x": 690.6667861938477, + "y": 744.819028377533, + "z": "6855f1c0.cd5d9", "wires": [ - [ - - ] + [] ] }, { - "id": "bb650f09.4befc", + "id": "ec41d40.2a2183", "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`\" />", + "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=\"site-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/site-resources/site-resource/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"site-resource.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", + "x": 679.6667900085449, + "y": 807.5969109535217, + "z": "6855f1c0.cd5d9", "wires": [ - [ - - ] + [] ] }, { - "id": "c7f37fdc.75322", + "id": "5922b71f.a74538", "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", + "x": 681.0000381469727, + "y": 693.5967993736267, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "93e1cbb7.57ce48", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1033.0001964569092, + "y": 637.3333625793457, + "z": "6855f1c0.cd5d9", "wires": [ - + [ + "b62a8412.3c1788", + "a29c24e2.c2b698", + "185872ae.4cf93d", + "a2c31dc7.abd3", + "518b2b7f.cf5094", + "83798f0c.55ca3", + "558728b4.014198", + "960e77d0.8444e8", + "8079e916.7357a8", + "27a90ae1.17e976", + "e0bb5acb.0941c8", + "4078d1f3.66f1c" + ] ] }, { - "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", + "id": "518b2b7f.cf5094", + "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": 586.1151275634766, - "y": 141.48147916793823, - "z": "c9244d8c.dbc33", + "x": 1302.2220001220703, + "y": 503.3333148956299, + "z": "6855f1c0.cd5d9", "wires": [ [ - "359fa75f.492d58" + "a8e94b67.c81878" ] ] }, { - "id": "359fa75f.492d58", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "a8e94b67.c81878", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 973.8933715820312, - "y": 142.03711557388306, - "z": "c9244d8c.dbc33", + "x": 1480.2220134735107, + "y": 506.3333148956299, + "z": "6855f1c0.cd5d9", "wires": [ [ - "f0758e90.0e45c", - "2de72527.9a032a", - "378d80e2.17f6", - "7702e686.8af7a8", - "75b119e9.762ed8", - "1c70f9bf.47a396" + "72cf7d47.6ab0e4" ] ] }, { - "id": "f0758e90.0e45c", + "id": "72cf7d47.6ab0e4", + "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": 1627.222023010254, + "y": 505.933310508728, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "b62a8412.3c1788", "type": "switchNode", - "name": "switch name", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "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": 1177.1152682304382, - "y": 88.03709030151367, - "z": "c9244d8c.dbc33", + "x": 1281.1176719665527, + "y": 801.3067646026611, + "z": "6855f1c0.cd5d9", "wires": [ [ - "665f8a5d.1e1384" + "61dfbdbd.9f7ea4" ] ] }, { - "id": "665f8a5d.1e1384", + "id": "61dfbdbd.9f7ea4", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1364.1152682304382, - "y": 84.03709030151367, - "z": "c9244d8c.dbc33", + "x": 1460.1175155639648, + "y": 802.3066844940186, + "z": "6855f1c0.cd5d9", "wires": [ [ - "303b324.5f06cce" + "10f1f531.8f5fbb" ] ] }, { - "id": "303b324.5f06cce", + "id": "10f1f531.8f5fbb", "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", + "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='prop.site.sdwan' value=\"true\" />", + "comments": "", + "x": 1610.1175270080566, + "y": 803.906699180603, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "a29c24e2.c2b698", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", "comments": "", - "x": 1532.1152682304382, - "y": 84.6370964050293, - "z": "c9244d8c.dbc33", + "outputs": 1, + "x": 1282.1173477172852, + "y": 845.3068046569824, + "z": "6855f1c0.cd5d9", "wires": [ - + [ + "5bd37c75.4f37f4" + ] ] }, { - "id": "2de72527.9a032a", + "id": "5bd37c75.4f37f4", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1452.1173553466797, + "y": 855.3067674636841, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "1ce2a35f.a33a2d" + ] + ] + }, + { + "id": "83798f0c.55ca3", "type": "switchNode", - "name": "switch description", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "name": "switch location-name", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", "comments": "", "outputs": 1, - "x": 1194.9549860954285, - "y": 131.0370855331421, - "z": "c9244d8c.dbc33", + "x": 1325.1171875, + "y": 545.3066234588623, + "z": "6855f1c0.cd5d9", "wires": [ [ - "ea9a727f.74db9" + "a3698113.22606" ] ] }, { - "id": "ea9a727f.74db9", + "id": "a3698113.22606", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1381.9549860954285, - "y": 127.03708553314209, - "z": "c9244d8c.dbc33", + "x": 1489.117359161377, + "y": 545.3066244125366, + "z": "6855f1c0.cd5d9", "wires": [ [ - "965ea5a4.e205c8" + "30c433ef.1afe7c" ] ] }, { - "id": "965ea5a4.e205c8", + "id": "30c433ef.1afe7c", "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", + "name": "set location-name", + "xml": "<set>\n<parameter name='prop.site.location-name' 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": [ - - ] + "x": 1651.1173706054688, + "y": 544.906681060791, + "z": "6855f1c0.cd5d9", + "wires": [] }, { - "id": "378d80e2.17f6", + "id": "558728b4.014198", "type": "switchNode", - "name": "switch location", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location'`\">\n", + "name": "switch address", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", "comments": "", "outputs": 1, - "x": 1185.0410990715027, - "y": 173.44442749023438, - "z": "c9244d8c.dbc33", + "x": 1308.1171875, + "y": 581.3066272735596, + "z": "6855f1c0.cd5d9", "wires": [ [ - "aa90cf46.db3a1" + "461f7e3d.fc2b6" ] ] }, { - "id": "aa90cf46.db3a1", + "id": "461f7e3d.fc2b6", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1372.0410990715027, - "y": 169.44442749023438, - "z": "c9244d8c.dbc33", + "x": 1478.1170349121094, + "y": 589.3066263198853, + "z": "6855f1c0.cd5d9", "wires": [ [ - "77618d13.d7cf34" + "95768555.59f738" ] ] }, { - "id": "77618d13.d7cf34", + "id": "95768555.59f738", "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", + "name": "set location-address", + "xml": "<set>\n<parameter name='prop.site.location-address' 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", + "x": 1666.1172103881836, + "y": 584.9066019058228, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "960e77d0.8444e8", + "type": "switchNode", + "name": "switch postcode", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", + "comments": "", + "outputs": 1, + "x": 1309.1171875, + "y": 623.3065881729126, + "z": "6855f1c0.cd5d9", "wires": [ - + [ + "2481d837.14c698" + ] ] }, { - "id": "7702e686.8af7a8", + "id": "2481d837.14c698", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1474.117359161377, + "y": 622.3065881729126, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "f6fca1a2.7d9b4" + ] + ] + }, + { + "id": "f6fca1a2.7d9b4", + "type": "set", + "name": "set location-postcode", + "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1661.1172103881836, + "y": 623.9066047668457, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "185872ae.4cf93d", "type": "switchNode", - "name": "switch id", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "name": "switch controlPoints", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`\">\n", "comments": "", "outputs": 1, - "x": 1175.0104174613953, - "y": 42.010414123535156, - "z": "c9244d8c.dbc33", + "x": 1303.0004806518555, + "y": 890.3335466384888, + "z": "6855f1c0.cd5d9", "wires": [ [ - "ed13080f.421188" + "e1f3da86.e05088" ] ] }, { - "id": "ed13080f.421188", + "id": "e1f3da86.e05088", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1362.0104174613953, - "y": 38.010414123535156, - "z": "c9244d8c.dbc33", + "x": 1463.0004959106445, + "y": 901.33362865448, + "z": "6855f1c0.cd5d9", "wires": [ [ - "23e732a.cf615ce" + "88f8ac7d.16131" ] ] }, { - "id": "23e732a.cf615ce", + "id": "cde157fb.eaac18", "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", + "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<parameter name='prop.site.sdwan' value=\"true\" />\n", + "comments": "", + "x": 1806.0005207061768, + "y": 822.3335390090942, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "ecdf21f6.a7851", + "type": "set", + "name": "set controlPoint", + "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", + "comments": "", + "x": 1848.0005226135254, + "y": 921.3336267471313, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "56e0196c.fe1028", + "type": "execute", + "name": "execute split roles", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", + "comments": "", + "outputs": 1, + "x": 1862.6668701171875, + "y": 878.3334608078003, + "z": "6855f1c0.cd5d9", + "wires": [ + [] + ] + }, + { + "id": "1ce2a35f.a33a2d", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1609.667007446289, + "y": 858.3334608078003, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "cde157fb.eaac18", + "56e0196c.fe1028" + ] + ] + }, + { + "id": "88f8ac7d.16131", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1621.6668434143066, + "y": 905.333384513855, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "ecdf21f6.a7851", + "913d9445.5019a8" + ] + ] + }, + { + "id": "913d9445.5019a8", + "type": "execute", + "name": "execute split control points", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", "comments": "", - "x": 1530.0104174613953, - "y": 38.61042022705078, - "z": "c9244d8c.dbc33", + "outputs": 1, + "x": 1890.666862487793, + "y": 982.3334674835205, + "z": "6855f1c0.cd5d9", "wires": [ - + [] ] }, { - "id": "75b119e9.762ed8", + "id": "8079e916.7357a8", "type": "switchNode", - "name": "switch type", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "name": "switch latitude", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", "comments": "", "outputs": 1, - "x": 1184.0104174613953, - "y": 217.01040649414062, - "z": "c9244d8c.dbc33", + "x": 1299.33349609375, + "y": 667.3333654403687, + "z": "6855f1c0.cd5d9", "wires": [ [ - "2190e18f.1b285e" + "d72cdc6.5e2602" ] ] }, { - "id": "2190e18f.1b285e", + "id": "d72cdc6.5e2602", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1371.0104174613953, - "y": 213.01040649414062, - "z": "c9244d8c.dbc33", + "x": 1475.3333435058594, + "y": 662.333324432373, + "z": "6855f1c0.cd5d9", "wires": [ [ - "195e7aa3.f12db5" + "f171e729.d22298" ] ] }, { - "id": "195e7aa3.f12db5", + "id": "f171e729.d22298", "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", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' 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", + "x": 1649.333351135254, + "y": 660.9333410263062, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "27a90ae1.17e976", + "type": "switchNode", + "name": "switch longitude", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", + "comments": "", + "outputs": 1, + "x": 1302.33349609375, + "y": 707.3334083557129, + "z": "6855f1c0.cd5d9", "wires": [ - + [ + "32eefde6.ce89c2" + ] ] }, { - "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", + "id": "32eefde6.ce89c2", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1187.0104174613953, - "y": 260.0104064941406, - "z": "c9244d8c.dbc33", + "x": 1474.3335037231445, + "y": 702.3334503173828, + "z": "6855f1c0.cd5d9", "wires": [ [ - "6e1ae54c.95dc4c" + "fdc73161.cebd7" ] ] }, { - "id": "6e1ae54c.95dc4c", + "id": "fdc73161.cebd7", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1656.3333587646484, + "y": 705.9333019256592, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "86d304b7.c70368", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1374.0104174613953, - "y": 256.0104064941406, - "z": "c9244d8c.dbc33", + "x": 1465.3335037231445, + "y": 752.3334531784058, + "z": "6855f1c0.cd5d9", "wires": [ [ - "338b1db2.4b0a32" + "63e2146a.caa4bc" ] ] }, { - "id": "338b1db2.4b0a32", + "id": "d126c16e.ed1c9", "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", + "name": "set emails", + "xml": "<set>\n<parameter name='prop.site.emails' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1823.3331985473633, + "y": 720.9333052635193, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "a2c31dc7.abd3", + "type": "switchNode", + "name": "switch emails", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", + "comments": "", + "outputs": 1, + "x": 1292.3335723876953, + "y": 752.3334531784058, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "86d304b7.c70368" + ] + ] + }, + { + "id": "36b11d40.243472", + "type": "execute", + "name": "execute split emails", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", "comments": "", - "x": 1542.0104174613953, - "y": 256.61041259765625, - "z": "c9244d8c.dbc33", + "outputs": 1, + "x": 1848.9995422363281, + "y": 767.3332080841064, + "z": "6855f1c0.cd5d9", "wires": [ - + [] ] }, { - "id": "63e9e578.e6c03c", + "id": "63e2146a.caa4bc", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1627.333511352539, + "y": 753.3333706855774, + "z": "6855f1c0.cd5d9", + "wires": [ + [ + "d126c16e.ed1c9", + "36b11d40.243472" + ] + ] + }, + { + "id": "ac6dde9e.14fd8", "type": "comment", - "name": "TODO: AAI", + "name": "Take the parameter names by removing prefix", "info": "", "comments": "", - "x": 813, - "y": 651, - "z": "c9244d8c.dbc33", + "x": 1407.0001831054688, + "y": 382.6666793823242, + "z": "6855f1c0.cd5d9", + "wires": [] + }, + { + "id": "e0bb5acb.0941c8", + "type": "execute", + "name": "execute split parameterName", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/> \n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n", + "comments": "", + "outputs": 1, + "x": 1360.0348815917969, + "y": 413.64584732055664, + "z": "6855f1c0.cd5d9", "wires": [ - + [] ] + }, + { + "id": "4078d1f3.66f1c", + "type": "set", + "name": "set parameterName", + "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n", + "comments": "", + "x": 1327.4792137145996, + "y": 447.6458492279053, + "z": "6855f1c0.cd5d9", + "wires": [] } -] +]
\ No newline at end of file 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 index ad6eb1e4..ce1905c6 100644 --- 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 @@ -1,803 +1,942 @@ [ { - "id": "29fa8678.95f9ca", - "type": "dgstart", - "name": "DGSTART", + "id": "4957f22c.5e2f1c", + "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": 131, - "y": 118, - "z": "af5ae803.904aa8", + "x": 212, + "y": 189.23809814453125, + "z": "a0c86160.b392c", "wires": [ [ - "d48a6f16.dbc94" + "c6d0a907.91d928" ] ] }, { - "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}'>", + "id": "91cb305c.596c5", + "type": "dgstart", + "name": "DGSTART", "outputs": 1, - "x": 206.28570556640625, - "y": 158.23811149597168, - "z": "af5ae803.904aa8", + "x": 136.71429443359375, + "y": 148.99998664855957, + "z": "a0c86160.b392c", "wires": [ [ - "7ed81cb7.0a51d4" + "4957f22c.5e2f1c" ] ] }, { - "id": "7ed81cb7.0a51d4", + "id": "c6d0a907.91d928", "type": "method", "name": "method site-vnf-topology-operation-deactivate", - "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>\n", + "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>", "comments": "", "outputs": 1, - "x": 227.42861938476562, - "y": 248, - "z": "af5ae803.904aa8", + "x": 205.1429214477539, + "y": 228.99998092651367, + "z": "a0c86160.b392c", "wires": [ [ - "aa23d49.327ed28" + "1123bd39.e47163" ] ] }, { - "id": "aa23d49.327ed28", + "id": "1123bd39.e47163", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 207.66666412353516, - "y": 419.6666717529297, - "z": "af5ae803.904aa8", + "x": 245.88101959228516, + "y": 300.69349193573, + "z": "a0c86160.b392c", "wires": [ [ - "9bb8f3a8.802f5", - "15d3779a.2c8a88", - "9540c63d.a06978", - "78df0c0e.576094", - "99b35972.99c3a8", - "61eb6b8d.7cad14", - "4080214.adfeae", - "6f647857.5c6b48", - "4302e938.be3ef8", - "1364166a.1d494a" + "cb3ab0a3.18f7a", + "9f93822a.38acf", + "79d541bc.c80a2", + "fd9e7734.9c2008", + "1b149ea5.120f71", + "75e2f346.784bbc", + "afea211a.e0c0a", + "f2b6a437.7e6008" ] ] }, { - "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": "", + "id": "1b149ea5.120f71", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 660.104736328125, - "y": 307.06783294677734, - "z": "af5ae803.904aa8", + "x": 652.9286193847656, + "y": 165.80950736999512, + "z": "a0c86160.b392c", "wires": [ [ - "a5175fe3.e03a" + "3c6f9bb2.b231d4", + "233b3043.9673c", + "a8b21c1e.3abec", + "35b35733.634ca8" ] ] }, { - "id": "a5175fe3.e03a", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "3c6f9bb2.b231d4", + "type": "switchNode", + "name": "switch service-data.vnfs.vnf_length", + "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", "comments": "", "outputs": 1, - "x": 906.8829312324524, - "y": 307.623462411575, - "z": "af5ae803.904aa8", + "x": 932.817626953125, + "y": 191.14282512664795, + "z": "a0c86160.b392c", "wires": [ [ - "a25f1f5b.132b7", - "617dd8fe.aa7948", - "15ed8251.27c1ce", - "984a8326.9a457", - "ff594d8d.7aa95", - "20f2971f.ecec88" + "bcdc7cd3.0b4fb", + "e83c4587.34b728" ] ] }, { - "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", + "id": "bcdc7cd3.0b4fb", + "type": "other", + "name": "outcome Null", + "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 1112.1048202514648, - "y": 262.62343978881836, - "z": "af5ae803.904aa8", + "x": 1186.4287490844727, + "y": 172.8095121383667, + "z": "a0c86160.b392c", "wires": [ [ - "e1ea29c6.845788" + "e5a3d434.f56108" ] ] }, { - "id": "e1ea29c6.845788", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "e5a3d434.f56108", + "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": 1360.4287643432617, + "y": 172.8095121383667, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "e83c4587.34b728", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1299.1048202514648, - "y": 258.62343978881836, - "z": "af5ae803.904aa8", + "x": 1169.9287185668945, + "y": 208.80952262878418, + "z": "a0c86160.b392c", "wires": [ [ - "cda20cf5.41ce9" + "da47adb6.7e467" ] ] }, { - "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", + "id": "da47adb6.7e467", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1351.9289169311523, + "y": 219.80952835083008, + "z": "a0c86160.b392c", "wires": [ - + [ + "d1af55da.8f3b18", + "6cc13507.3cb79c" + ] ] }, { - "id": "617dd8fe.aa7948", + "id": "6cc13507.3cb79c", "type": "switchNode", - "name": "switch description", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "name": "switch tmp.vidx ", + "xml": "<switch test=\"`$tmp.vidx`\">\n\n", "comments": "", "outputs": 1, - "x": 1129.944538116455, - "y": 305.6234350204468, - "z": "af5ae803.904aa8", + "x": 1541.928810119629, + "y": 236.80952262878418, + "z": "a0c86160.b392c", "wires": [ [ - "9accb009.2112d" + "7a52469e.0fa9f8" ] ] }, { - "id": "9accb009.2112d", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "a8b21c1e.3abec", + "type": "switchNode", + "name": "switch vnf-level-oper-status", + "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n", "comments": "", "outputs": 1, - "x": 1316.944538116455, - "y": 301.6234350204468, - "z": "af5ae803.904aa8", + "x": 896.0954284667969, + "y": 286.69837856292725, + "z": "a0c86160.b392c", "wires": [ [ - "8ca9a7db.ec8f18" + "263aaa11.82a2b6", + "59d6bbbd.f09a24" ] ] }, { - "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", + "id": "263aaa11.82a2b6", + "type": "outcome", + "name": "outcome Active", + "xml": "<outcome value='Active'>\n", "comments": "", "outputs": 1, - "x": 1120.0306510925293, - "y": 348.03077697753906, - "z": "af5ae803.904aa8", + "x": 1202.9287414550781, + "y": 267.8095006942749, + "z": "a0c86160.b392c", "wires": [ [ - "8dc32f9.9a097d" + "894517c4.94cc68" ] ] }, { - "id": "8dc32f9.9a097d", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "59d6bbbd.f09a24", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1307.0306510925293, - "y": 344.03077697753906, - "z": "af5ae803.904aa8", + "x": 1170.9287414550781, + "y": 307.8095006942749, + "z": "a0c86160.b392c", "wires": [ [ - "c9cae02e.83783" + "de14e045.7333a" ] ] }, { - "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", + "id": "de14e045.7333a", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />", "comments": "", - "x": 1475.0306510925293, - "y": 344.6307830810547, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1328.4287414550781, + "y": 307.8095006942749, + "z": "a0c86160.b392c", + "wires": [] }, { - "id": "984a8326.9a457", + "id": "233b3043.9673c", "type": "switchNode", - "name": "switch id", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'id'`\">\n", + "name": "switch vnf-id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n", "comments": "", "outputs": 1, - "x": 1109.9999694824219, - "y": 216.59676361083984, - "z": "af5ae803.904aa8", + "x": 874.9287261962891, + "y": 131.8094997406006, + "z": "a0c86160.b392c", "wires": [ [ - "96a74444.b53228" + "bd1b23ac.08604" ] ] }, { - "id": "96a74444.b53228", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "bd1b23ac.08604", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", "comments": "", "outputs": 1, - "x": 1296.9999694824219, - "y": 212.59676361083984, - "z": "af5ae803.904aa8", + "x": 1017.9287185668945, + "y": 131.80950260162354, + "z": "a0c86160.b392c", "wires": [ [ - "df6964b4.228f78" + "78d81ec0.02c25" ] ] }, { - "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", + "id": "78d81ec0.02c25", + "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-information.vnf-id is a required input\" />\n", "comments": "", - "x": 1464.9999694824219, - "y": 213.19676971435547, - "z": "af5ae803.904aa8", + "x": 1166.4287185668945, + "y": 131.80950164794922, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "d1af55da.8f3b18", + "type": "for", + "name": "for vidx..service-data.vnfs.vnf[]", + "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", + "comments": "", + "outputs": 1, + "x": 1587.428840637207, + "y": 198.8095121383667, + "z": "a0c86160.b392c", "wires": [ - + [ + "ea3ec79e.bdec18" + ] ] }, { - "id": "ff594d8d.7aa95", + "id": "ea3ec79e.bdec18", "type": "switchNode", - "name": "switch type", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "name": "switch vnf-id found", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n", "comments": "", "outputs": 1, - "x": 1118.9999694824219, - "y": 391.5967559814453, - "z": "af5ae803.904aa8", + "x": 1873.428840637207, + "y": 198.8095121383667, + "z": "a0c86160.b392c", "wires": [ [ - "343eddcc.c79502" + "a7ba6ae5.977098" ] ] }, { - "id": "343eddcc.c79502", + "id": "a7ba6ae5.977098", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1305.9999694824219, - "y": 387.5967559814453, - "z": "af5ae803.904aa8", + "x": 2058.9289169311523, + "y": 198.80951404571533, + "z": "a0c86160.b392c", "wires": [ [ - "c923d4d2.c53e48" + "4dbc76e0.8d7858" ] ] }, { - "id": "c923d4d2.c53e48", + "id": "4dbc76e0.8d7858", "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' />", + "name": "set tmp.vidx and ctx.vnf-data", + "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n", "comments": "", - "x": 1473.9999694824219, - "y": 388.19676208496094, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 2266.928840637207, + "y": 198.8095121383667, + "z": "a0c86160.b392c", + "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", + "id": "5ac1b74d.5a62b8", + "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-information.vnf-id not found in service-data\" />\n", + "comments": "", + "x": 1833.428810119629, + "y": 236.80952262878418, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "7a52469e.0fa9f8", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 1121.9999694824219, - "y": 434.5967559814453, - "z": "af5ae803.904aa8", + "x": 1695.928810119629, + "y": 236.80952262878418, + "z": "a0c86160.b392c", "wires": [ [ - "4a74022c.fbbfdc" + "5ac1b74d.5a62b8" ] ] }, { - "id": "4a74022c.fbbfdc", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "cb3ab0a3.18f7a", + "type": "set", + "name": "set vnf in service-data", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />", + "comments": "", + "x": 639.7145080566406, + "y": 634.00022315979, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "9f93822a.38acf", + "type": "set", + "name": "set vnfId and vnf-object-path", + "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` \" />", "comments": "", + "x": 661.2701034545898, + "y": 671.2224445343018, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "fd9e7734.9c2008", + "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": 615.0478849411011, + "y": 821.7778739929199, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "79d541bc.c80a2", + "type": "set", + "name": "set vnf-level-oper-status to PendingDelete", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n", + "comments": "", + "x": 699.7145080566406, + "y": 715.0002861022949, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "894517c4.94cc68", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1308.9999694824219, - "y": 430.5967559814453, - "z": "af5ae803.904aa8", + "x": 1396.856201171875, + "y": 271.88886964321136, + "z": "a0c86160.b392c", "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", + "id": "35b35733.634ca8", + "type": "execute", + "name": "execute requiredParameters", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n", "comments": "", - "x": 1516.9999694824219, - "y": 430.19676971435547, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 924.7145385742188, + "y": 94, + "z": "a0c86160.b392c", "wires": [ - + [] ] }, { - "id": "15d3779a.2c8a88", - "type": "switchNode", - "name": "switch service-data.vnfs.vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "id": "13f26ce4.e0b983", + "type": "comment", + "name": "site-vnf-topology-operation-deactivate", + "info": "", + "comments": "", + "x": 519, + "y": 94.23809814453125, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "75e2f346.784bbc", + "type": "for", + "name": "for loop idx - VNF input parameters", + "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", "comments": "", "outputs": 1, - "x": 667.9895935058594, - "y": 108.98958587646484, - "z": "af5ae803.904aa8", + "x": 697.0001487731934, + "y": 365.0000219345093, + "z": "a0c86160.b392c", "wires": [ [ - "ce757eba.3051d", - "317e6180.be733e", - "355929c1.e3c516" + "ccc1f150.dcee8" ] ] }, { - "id": "ce757eba.3051d", - "type": "other", - "name": "Null", - "xml": "<outcome value=''>\n", + "id": "ccc1f150.dcee8", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 1080.9895935058594, - "y": 101.9896469116211, - "z": "af5ae803.904aa8", + "x": 903.8958854675293, + "y": 364.9218854904175, + "z": "a0c86160.b392c", "wires": [ [ - "3a71c6fc.a403ea" + "e5d9799e.ae8628", + "1badb5ed.e28e8a" ] ] }, { - "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", + "id": "e5d9799e.ae8628", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", "comments": "", - "x": 1299.7670593261719, - "y": 77.87859344482422, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1041.0130882263184, + "y": 364.89532566070557, + "z": "a0c86160.b392c", "wires": [ - + [ + "a6693add.80f898" + ] ] }, { - "id": "317e6180.be733e", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", + "id": "a6693add.80f898", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 992.9899597167969, - "y": 155.98966217041016, - "z": "af5ae803.904aa8", + "x": 1181.013095855713, + "y": 365.89532566070557, + "z": "a0c86160.b392c", "wires": [ [ - "6231a17a.01c0e" + "139aae5d.e30622" ] ] }, { - "id": "6231a17a.01c0e", + "id": "139aae5d.e30622", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1164.2594909667969, - "y": 139.54419708251953, - "z": "af5ae803.904aa8", + "x": 1329.562744140625, + "y": 366.9220190048218, + "z": "a0c86160.b392c", "wires": [ [ - "b34aef0c.acf71", - "8f0f5852.1fb888" + "3d248a1d.8a4626" ] ] }, { - "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", + "id": "3d248a1d.8a4626", + "type": "set", + "name": "set role", + "xml": "<set>\n<parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n", + "comments": "", + "x": 1473.8961067199707, + "y": 367.9220361709595, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "afea211a.e0c0a", + "type": "switchNode", + "name": "switch prop.site.sdwan", + "xml": "<switch test=\"`$prop.site.sdwan`\">\n", "comments": "", "outputs": 1, - "x": 1462.2754821777344, - "y": 120.41820526123047, - "z": "af5ae803.904aa8", + "x": 671, + "y": 520.0000438690186, + "z": "a0c86160.b392c", "wires": [ [ - "dbdd8064.8b575" + "79bc523a.1ecdec" ] ] }, { - "id": "8f0f5852.1fb888", - "type": "switchNode", - "name": "switch tmp.vidx ", - "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "id": "79bc523a.1ecdec", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1383.5768737792969, - "y": 163.4013900756836, - "z": "af5ae803.904aa8", + "x": 852.0001335144043, + "y": 521.0000705718994, + "z": "a0c86160.b392c", "wires": [ [ - "790650c4.ec7c" + "c9dc3c5b.ce873" ] ] }, { - "id": "790650c4.ec7c", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>\n", + "id": "44a4d10f.69bea", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1584.0054626464844, - "y": 168.9728012084961, - "z": "af5ae803.904aa8", + "x": 1556.500156402588, + "y": 489.00012493133545, + "z": "a0c86160.b392c", "wires": [ [ - "3c6f340.b39b3cc" + "4ad01ef7.c1305" ] ] }, { - "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", + "id": "4ad01ef7.c1305", + "type": "set", + "name": "set controller data", + "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n", + "comments": "", + "x": 1745.0002517700195, + "y": 483.0001345872879, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "5be09b23.d55b04", + "type": "not-found", + "name": "not-found", + "xml": "<outcome value='not-found'>\n", "comments": "", "outputs": 1, - "x": 1772.7040710449219, - "y": 118.66829681396484, - "z": "af5ae803.904aa8", + "x": 1559.991123199463, + "y": 536.5741605758667, + "z": "a0c86160.b392c", "wires": [ [ - "442b99c7.862238" + "48c84162.ad4b8" ] ] }, { - "id": "3c6f340.b39b3cc", + "id": "48c84162.ad4b8", "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", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", "comments": "", - "x": 1755.4339294433594, - "y": 169.11565399169922, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1733.5625343322754, + "y": 524.8598966598511, + "z": "a0c86160.b392c", + "wires": [] }, { - "id": "442b99c7.862238", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "89230c24.b3cdd", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1978.6563415527344, - "y": 117.56102752685547, - "z": "af5ae803.904aa8", + "x": 1552.324131011963, + "y": 577.907473564148, + "z": "a0c86160.b392c", "wires": [ [ - "9a4c2f33.323f8" + "85634a7c.b937a8" ] ] }, { - "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", + "id": "85634a7c.b937a8", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", "comments": "", - "x": 2217.1880798339844, - "y": 113.31102752685547, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1740.0966873168945, + "y": 573.3466663360596, + "z": "a0c86160.b392c", + "wires": [] }, { - "id": "355929c1.e3c516", - "type": "outcome", - "name": "0", - "xml": "<outcome value='0'>\n", + "id": "a63c00b2.95bd5", + "type": "get-resource", + "name": "get-resource esr-thirdparty-sdnc", + "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n", "comments": "", "outputs": 1, - "x": 1074.9583435058594, - "y": 65.95833587646484, - "z": "af5ae803.904aa8", + "x": 1289.5000686645508, + "y": 537.0001307725906, + "z": "a0c86160.b392c", "wires": [ [ - "3a71c6fc.a403ea" + "44a4d10f.69bea", + "5be09b23.d55b04", + "89230c24.b3cdd" ] ] }, { - "id": "28632f1f.75eb4", - "type": "comment", - "name": "TODO: Check validation", - "info": "", + "id": "d6db6a91.6f4a78", + "type": "execute", + "name": "execute RestApiCallNode Create SDWAN site", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />", "comments": "", - "x": 624.9895935058594, - "y": 60.989585876464844, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1318.0004119873047, + "y": 735.0002021789551, + "z": "a0c86160.b392c", "wires": [ - + [ + "6896c2eb.698ffc" + ] ] }, { - "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", + "id": "d2619b3c.655228", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "comments": "", - "x": 603.3332824707031, - "y": 757.3333358764648, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1811.6665420532227, + "y": 708.8889743089676, + "z": "a0c86160.b392c", "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", + "id": "abc65d9c.3615e", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n", "comments": "", - "x": 682.8133850097656, - "y": 585.6704711914062, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1787.111183166504, + "y": 770.4443570375443, + "z": "a0c86160.b392c", + "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", + "id": "af0f8953.715328", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", "comments": "", - "x": 649.6665344238281, - "y": 542.6667098999023, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1642.111183166504, + "y": 767.4443570375443, + "z": "a0c86160.b392c", "wires": [ - + [ + "abc65d9c.3615e" + ] ] }, { - "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", + "id": "6896c2eb.698ffc", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 677, - "y": 665.5556030273438, - "z": "af5ae803.904aa8", + "x": 1638.5555572509766, + "y": 709.1111422777176, + "z": "a0c86160.b392c", "wires": [ [ - + "d2619b3c.655228" ] ] }, { - "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`\" />", + "id": "98c6743f.874588", + "type": "execute", + "name": "execute RestApiCallNode Get token", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>", "comments": "", "outputs": 1, - "x": 651.0000305175781, - "y": 708.3333358764648, - "z": "af5ae803.904aa8", + "x": 1290.754165649414, + "y": 630.0041915178299, + "z": "a0c86160.b392c", "wires": [ [ - + "39a5c053.f8453" ] ] }, { - "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/'` \" />", + "id": "39a5c053.f8453", + "type": "success", + "name": "success", + "xml": "<outcome value='success'>\n", "comments": "", - "x": 656.5000305175781, - "y": 625.3333358764648, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1555.7540473937988, + "y": 615.0040866136551, + "z": "a0c86160.b392c", "wires": [ - + [ + "f6e07bec.bc35c8" + ] ] }, { - "id": "1364166a.1d494a", - "type": "switchNode", - "name": "switch sdwan.site", - "xml": "<switch test=\"`$tmp.sdwan.site`\">\n", + "id": "a60d94cb.1ae848", + "type": "failure", + "name": "failure", + "xml": "<outcome value='failure'>\n", "comments": "", "outputs": 1, - "x": 611.9895935058594, - "y": 387.98958587646484, - "z": "af5ae803.904aa8", + "x": 1548.0040473937988, + "y": 656.6469699144363, + "z": "a0c86160.b392c", "wires": [ [ - "2e02ce5b.120d72", - "c3598024.ef229" + "a3e0da6b.559e48" ] ] }, { - "id": "4302e938.be3ef8", - "type": "set", - "name": "set sdwan.site", - "xml": "<set>\n<parameter name='tmp.sdwan.site' value='false' />\n", + "id": "a3e0da6b.559e48", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", - "x": 602.9895935058594, - "y": 256.98958587646484, - "z": "af5ae803.904aa8", + "outputs": 1, + "x": 1674.0875434875488, + "y": 656.8930026292801, + "z": "a0c86160.b392c", "wires": [ - + [] ] }, { - "id": "c3598024.ef229", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "f6e07bec.bc35c8", + "type": "set", + "name": "set token-id", + "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", "comments": "", + "x": 1692.7540473937988, + "y": 615.0040866136551, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "f570928f.4101f", + "type": "comment", + "name": "tmp.thirdparty-sdnc-id is hardcoded value?", + "info": "", + "comments": "", + "x": 1286.0039596557617, + "y": 504.0040522813797, + "z": "a0c86160.b392c", + "wires": [] + }, + { + "id": "c9dc3c5b.ce873", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 747.9895935058594, - "y": 480.98958587646484, - "z": "af5ae803.904aa8", + "x": 1013.0000686645508, + "y": 521.6665782928467, + "z": "a0c86160.b392c", "wires": [ [ - "38d8d2a8.f58c0e" + "98c6743f.874588", + "d6db6a91.6f4a78", + "a63c00b2.95bd5" ] ] }, { - "id": "2e02ce5b.120d72", - "type": "outcomeTrue", - "name": "false", - "xml": "<outcome value='false'>\n", + "id": "f2b6a437.7e6008", + "type": "save", + "name": "update siteInstance configuration in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='operational-status' value='PendingDelete' />\n", "comments": "", "outputs": 1, - "x": 791.8783874511719, - "y": 400.9896469116211, - "z": "af5ae803.904aa8", + "x": 693.0000915527344, + "y": 754.0001029968262, + "z": "a0c86160.b392c", + "wires": [ + [] + ] + }, + { + "id": "1badb5ed.e28e8a", + "type": "switchNode", + "name": "switch siteId", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`\">\n", + "comments": "", + "outputs": 1, + "x": 1041.0129852294922, + "y": 439.8953685760498, + "z": "a0c86160.b392c", "wires": [ [ - "ad672f8e.2adcd" + "d169692c.c9c248" ] ] }, { - "id": "ad672f8e.2adcd", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "d169692c.c9c248", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 930.9895935058594, - "y": 400.98958587646484, - "z": "af5ae803.904aa8", + "x": 1181.0129928588867, + "y": 440.8953685760498, + "z": "a0c86160.b392c", "wires": [ [ - + "6b473348.32e71c" ] ] }, { - "id": "38d8d2a8.f58c0e", + "id": "6b473348.32e71c", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 909.9895935058594, - "y": 479.98958587646484, - "z": "af5ae803.904aa8", + "x": 1329.5626411437988, + "y": 441.922061920166, + "z": "a0c86160.b392c", "wires": [ [ - + "b1ed9a25.d49d18" ] ] }, { - "id": "d9bbd64d.c1dfa8", - "type": "comment", - "name": "TODO: SDWAN implementation for site", - "info": "", + "id": "b1ed9a25.d49d18", + "type": "set", + "name": "set siteId", + "xml": "<set>\n<parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", "comments": "", - "x": 1067.9895935058594, - "y": 521.9895858764648, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1473.8960037231445, + "y": 442.9220790863037, + "z": "a0c86160.b392c", + "wires": [] }, { - "id": "dfb2bb0b.f25f38", + "id": "5308b9e7.a82c18", "type": "comment", - "name": "TODO: AAI", + "name": "Get siteId to delete", "info": "", "comments": "", - "x": 902, - "y": 671, - "z": "af5ae803.904aa8", - "wires": [ - - ] + "x": 1052.9999694824219, + "y": 409.0000247955322, + "z": "a0c86160.b392c", + "wires": [] } -] +]
\ No newline at end of file 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 index 0c552342..01081e1f 100644 --- 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 @@ -1,20 +1,20 @@ [ { - "id": "a2b91e00.0dacb", + "id": "a7726866.c82328", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 119, - "y": 37, - "z": "7bfb2dad.3744a4", + "x": 195, + "y": 120.41365623474121, + "z": "3abedd3.792ad22", "wires": [ [ - "17fbd1a8.a9b4ce" + "3384c619.e1dafa" ] ] }, { - "id": "17fbd1a8.a9b4ce", + "id": "3384c619.e1dafa", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,596 +22,432 @@ "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", + "x": 270.28570556640625, + "y": 160.6517677307129, + "z": "3abedd3.792ad22", "wires": [ [ - "cd1ac734.4667a8" + "ca099e7c.f45ae" ] ] }, { - "id": "cd1ac734.4667a8", + "id": "ca099e7c.f45ae", "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", + "x": 250.42861938476562, + "y": 296.4136562347412, + "z": "3abedd3.792ad22", "wires": [ [ - "8f642f93.2a801" + "cdd2879.5989078" ] ] }, { - "id": "8f642f93.2a801", + "id": "965a63f9.a0196", + "type": "comment", + "name": "site-vnf-topology-operation-delete", + "info": "", + "comments": "", + "x": 644.3449172973633, + "y": 194.00005531311035, + "z": "3abedd3.792ad22", + "wires": [] + }, + { + "id": "cdd2879.5989078", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 347.6666564941406, - "y": 226.66668701171875, - "z": "7bfb2dad.3744a4", + "x": 271.66666412353516, + "y": 422.0803279876709, + "z": "3abedd3.792ad22", "wires": [ [ - "76c48b79.d84cf4", - "bfaa0886.4026e8", - "d0626629.81a8c8", - "a00c6468.40dc18", - "d6cddc91.15c3a", - "1aa89ef4.371e21" + "e74f18c4.f49f98", + "e52597d4.97d0a8", + "6a942976.e989d8", + "6ffb0bce.7eb574", + "ba634d70.518cb", + "52c3ad0c.e6f634", + "26f755dc.77218a", + "ea9d888e.357438", + "a4fc2f21.bb9f6" ] ] }, { - "id": "76c48b79.d84cf4", + "id": "26f755dc.77218a", "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", + "x": 733.0947036743164, + "y": 355.6748266220093, + "z": "3abedd3.792ad22", "wires": [ [ - "e84dd0b6.bd49f", - "6abf3e26.6123e", - "cad37430.9a8ae8" + "41237296.cb603c", + "1b9b9bc6.ffabe4" ] ] }, { - "id": "e84dd0b6.bd49f", + "id": "41237296.cb603c", "type": "other", - "name": "Null", + "name": "outcome Null", "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 1081.9895935058594, - "y": 66.9896469116211, - "z": "7bfb2dad.3744a4", + "x": 997.8170166015625, + "y": 338.23044872283936, + "z": "3abedd3.792ad22", "wires": [ [ - "1e4a1529.eacc1b" + "37a1ebd3.c0d944" ] ] }, { - "id": "1e4a1529.eacc1b", + "id": "37a1ebd3.c0d944", "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": [ - - ] + "x": 1178.8168869018555, + "y": 333.23032665252686, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "6abf3e26.6123e", + "id": "1b9b9bc6.ffabe4", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 993.9899597167969, - "y": 120.98966217041016, - "z": "7bfb2dad.3744a4", + "x": 983.3170166015625, + "y": 390.230411529541, + "z": "3abedd3.792ad22", "wires": [ [ - "8e41da85.f0c968" + "af3a8c66.5e3d1" ] ] }, { - "id": "8e41da85.f0c968", + "id": "af3a8c66.5e3d1", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1165.2594909667969, - "y": 104.54419708251953, - "z": "7bfb2dad.3744a4", + "x": 1155.316722869873, + "y": 390.2304096221924, + "z": "3abedd3.792ad22", "wires": [ [ - "40ff91c4.16b8c", - "901feb4d.552588" + "2540b8b2.d6e138", + "8b080a11.ba38d8" ] ] }, { - "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", + "id": "8b080a11.ba38d8", + "type": "switchNode", + "name": "switch tmp.nidx ", + "xml": "<switch test=\"`$tmp.nidx`\">\n\n", "comments": "", "outputs": 1, - "x": 1463.2754821777344, - "y": 85.41820526123047, - "z": "7bfb2dad.3744a4", + "x": 1330.31689453125, + "y": 409.23033142089844, + "z": "3abedd3.792ad22", "wires": [ [ - "21662e74.a22c42" + "29f38b0a.335fc4" ] ] }, { - "id": "901feb4d.552588", + "id": "52c3ad0c.e6f634", "type": "switchNode", - "name": "switch tmp.vidx ", - "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "name": "switch vnf-level-oper-status", + "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`'>\n", "comments": "", "outputs": 1, - "x": 1384.5768737792969, - "y": 128.4013900756836, - "z": "7bfb2dad.3744a4", + "x": 703.4837036132812, + "y": 430.1192903518677, + "z": "3abedd3.792ad22", "wires": [ [ - "ee9e043e.1f4d08" + "80dde12f.593ab", + "95f83539.1330d8" ] ] }, { - "id": "ee9e043e.1f4d08", + "id": "80dde12f.593ab", "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>\n", + "name": "outcome PendingDelete", + "xml": "<outcome value='PendingDelete'>\n", "comments": "", "outputs": 1, - "x": 1585.0054626464844, - "y": 133.9728012084961, - "z": "7bfb2dad.3744a4", + "x": 994.3169708251953, + "y": 434.23041343688965, + "z": "3abedd3.792ad22", "wires": [ [ - "b08c7bb.174c688" + "c271a18f.ad7ae" ] ] }, { - "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", + "id": "95f83539.1330d8", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1773.7040710449219, - "y": 83.66829681396484, - "z": "7bfb2dad.3744a4", + "x": 940.3170318603516, + "y": 481.2304172515869, + "z": "3abedd3.792ad22", "wires": [ [ - "c6e29244.22831" + "c4d6206d.a0bea" ] ] }, { - "id": "b08c7bb.174c688", + "id": "c4d6206d.a0bea", "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", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />", "comments": "", - "x": 1756.4339294433594, - "y": 134.11565399169922, - "z": "7bfb2dad.3744a4", - "wires": [ - - ] + "x": 1099.8167991638184, + "y": 484.2304162979126, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "c6e29244.22831", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "ea9d888e.357438", + "type": "switchNode", + "name": "switch vnf-id", + "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n", "comments": "", "outputs": 1, - "x": 1979.6563415527344, - "y": 82.56102752685547, - "z": "7bfb2dad.3744a4", + "x": 669.3170204162598, + "y": 311.23042011260986, + "z": "3abedd3.792ad22", "wires": [ [ - "34cb4af6.5dade6" + "62e62064.0111a" ] ] }, { - "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", + "id": "62e62064.0111a", "type": "outcome", - "name": "0", - "xml": "<outcome value='0'>\n", + "name": "NULL", + "xml": "<outcome value=''>", "comments": "", "outputs": 1, - "x": 1075.9583435058594, - "y": 30.958335876464844, - "z": "7bfb2dad.3744a4", + "x": 867.3170852661133, + "y": 301.230432510376, + "z": "3abedd3.792ad22", "wires": [ [ - "1e4a1529.eacc1b" + "583791bd.81172" ] ] }, { - "id": "4dc3e987.9fd4e8", - "type": "comment", - "name": "TODO: Check validation", - "info": "", + "id": "583791bd.81172", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-request-input.vnf-input-parameters.name is a required input\" />\n", "comments": "", - "x": 625.9895935058594, - "y": 25.989585876464844, - "z": "7bfb2dad.3744a4", - "wires": [ - - ] + "x": 1033.8169708251953, + "y": 298.2304267883301, + "z": "3abedd3.792ad22", + "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", + "id": "a4fc2f21.bb9f6", + "type": "execute", + "name": "execute requiredParameters", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n", "comments": "", - "x": 590.333251953125, - "y": 562.3333740234375, - "z": "7bfb2dad.3744a4", + "outputs": 1, + "x": 726.8170776367188, + "y": 251.23041915893555, + "z": "3abedd3.792ad22", "wires": [ - + [] ] }, { - "id": "728d2d28.940264", + "id": "2540b8b2.d6e138", "type": "for", - "name": "for each vnf", - "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n", + "name": "for nidx..service-data.vnfs.vnf[]", + "xml": "<for index='nidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", "comments": "", "outputs": 1, - "x": 1117.7793083190918, - "y": 393.66661167144775, - "z": "7bfb2dad.3744a4", + "x": 1390.8168983459473, + "y": 345.2303276062012, + "z": "3abedd3.792ad22", "wires": [ [ - "7caecd51.491534" + "58bd02b1.41b51c" ] ] }, { - "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", + "id": "58bd02b1.41b51c", "type": "switchNode", - "name": "switch vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "name": "switch vnf-id found", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$nidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n", "comments": "", "outputs": 1, - "x": 604.0371704101562, - "y": 395.2462406158447, - "z": "7bfb2dad.3744a4", + "x": 1646.8169174194336, + "y": 345.2303276062012, + "z": "3abedd3.792ad22", "wires": [ [ - "f6c22b0f.9c87a8", - "3909fa08.1288e6" + "c5d4dadf.96bed8" ] ] }, { - "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", + "id": "c5d4dadf.96bed8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 779.7039566040039, - "y": 439.2461004257202, - "z": "7bfb2dad.3744a4", + "x": 1823.3169708251953, + "y": 348.2303276062012, + "z": "3abedd3.792ad22", "wires": [ [ - "1459edc6.fe9a92" + "fef684cd.0b0aa8" ] ] }, { - "id": "e0ce4e15.0694e", + "id": "fef684cd.0b0aa8", "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", + "name": "set tmp.nidx and ctx.vnf-data", + "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$nidx].vnf-data.`' />\n", "comments": "", - "outputs": 1, - "x": 702.9999885559082, - "y": 181.00003623962402, - "z": "7bfb2dad.3744a4", - "wires": [ - [ - "aa414c85.4ebad" - ] - ] + "x": 1990.3169860839844, + "y": 409.2303276062012, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "350728d2.6ecb38", + "id": "a5b8b731.dc3498", "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", + "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": "", - "outputs": 1, - "x": 881.9999732971191, - "y": 223.6666431427002, - "z": "7bfb2dad.3744a4", - "wires": [ - [ - "4056136c.450bfc" - ] - ] + "x": 1635.816909790039, + "y": 409.23033142089844, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "efcade27.df8a7", + "id": "29f38b0a.335fc4", "type": "outcome", "name": "NULL", - "xml": "<outcome value=''>", + "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 880.5713844299316, - "y": 265.0953006744385, - "z": "7bfb2dad.3744a4", + "x": 1498.316909790039, + "y": 409.23033142089844, + "z": "3abedd3.792ad22", "wires": [ [ - "4056136c.450bfc" + "a5b8b731.dc3498" ] ] }, { - "id": "4056136c.450bfc", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "6ffb0bce.7eb574", + "type": "set", + "name": "set vnfId and vnf-object-path", + "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='vnf-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />", "comments": "", - "outputs": 1, - "x": 1029.1428985595703, - "y": 245.0953016281128, - "z": "7bfb2dad.3744a4", - "wires": [ - [ - - ] - ] + "x": 681.3334350585938, + "y": 605.747073173523, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "fdf813a0.7dec9", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", + "id": "ba634d70.518cb", + "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": "", - "outputs": 1, - "x": 880.5714340209961, - "y": 306.52388858795166, - "z": "7bfb2dad.3744a4", - "wires": [ - [ - "dbbd756.2a74488" - ] - ] + "x": 630.4445953369141, + "y": 731.3025035858154, + "z": "3abedd3.792ad22", + "wires": [] }, { - "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", + "id": "e52597d4.97d0a8", + "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": 1047.7143287658691, - "y": 306.09527683258057, - "z": "7bfb2dad.3744a4", - "wires": [ - - ] + "x": 661.9660186767578, + "y": 503.2179307937622, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "aa414c85.4ebad", - "type": "outcomeTrue", - "name": "false", - "xml": "<outcome value='false'>\n", + "id": "6a942976.e989d8", + "type": "set", + "name": "Remove vnf from ServiceData", + "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.nidx].\" value=\"\"/>\n\n", "comments": "", - "outputs": 1, - "x": 1005, - "y": 181, - "z": "7bfb2dad.3744a4", - "wires": [ - [ - "350728d2.6ecb38" - ] - ] + "x": 697.5902099609375, + "y": 547.1858978271484, + "z": "3abedd3.792ad22", + "wires": [] }, { - "id": "1aa89ef4.371e21", + "id": "e74f18c4.f49f98", "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' >", + "name": "delete site instance configuration in AAI", + "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='site-resource' \n key='site-resource.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n", "comments": "", "outputs": 1, - "x": 604, - "y": 510, - "z": "7bfb2dad.3744a4", + "x": 707.8549957275391, + "y": 674.5513019561768, + "z": "3abedd3.792ad22", "wires": [ - [ - - ] + [] ] }, { - "id": "e61bcb70.9a5e48", - "type": "comment", - "name": "TODO: AAI", - "info": "", - "comments": "", - "x": 775, - "y": 512, - "z": "7bfb2dad.3744a4", + "id": "c271a18f.ad7ae", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1191.6233711242676, + "y": 444.55556774139404, + "z": "3abedd3.792ad22", "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 4c3b2c45..55e912d2 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,20 +1,20 @@ [ { - "id": "61f768ce.a1c1b8", + "id": "41d1eb7e.d42df4", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 127, - "y": 96.41365623474121, - "z": "57051de1.b81bb4", + "x": 132, + "y": 174.4136562347412, + "z": "4375a986.58da58", "wires": [ [ - "58ccea78.3d9004" + "b80f4569.cfd668" ] ] }, { - "id": "58ccea78.3d9004", + "id": "b80f4569.cfd668", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,627 +22,630 @@ "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": 241.28570556640625, - "y": 136.6517677307129, - "z": "57051de1.b81bb4", + "x": 207.28570556640625, + "y": 214.6517677307129, + "z": "4375a986.58da58", "wires": [ [ - "13d4c1ee.0b3fde" + "ce452a31.2d7d48" ] ] }, { - "id": "13d4c1ee.0b3fde", + "id": "ce452a31.2d7d48", "type": "method", "name": "method vnf-topology-operation", "xml": "<method rpc='vnf-topology-operation' mode='sync'>\n", "comments": "", "outputs": 1, - "x": 193.42862701416016, - "y": 176.4136505126953, - "z": "57051de1.b81bb4", + "x": 200.42862701416016, + "y": 254.4136505126953, + "z": "4375a986.58da58", "wires": [ [ - "bd2b5862.92ecf8" + "fddedb90.e69728" ] ] }, { - "id": "b240dafd.5a3558", + "id": "8ff57105.db631", "type": "comment", "name": "vnf-topology-operation", "info": "", "comments": "", - "x": 521.344856262207, - "y": 44, - "z": "57051de1.b81bb4", - "wires": [ - - ] + "x": 526.344856262207, + "y": 122, + "z": "4375a986.58da58", + "wires": [] }, { - "id": "bd2b5862.92ecf8", + "id": "fddedb90.e69728", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 209.59527587890625, - "y": 382.6786069869995, - "z": "57051de1.b81bb4", + "x": 216.16676330566406, + "y": 441.10718727111816, + "z": "4375a986.58da58", "wires": [ [ - "5967f821.700468", - "baed1c3a.1e989", - "c06aa47c.85b178" + "ac9bf788.c56fa8", + "88cf203d.250b4", + "2346097e.a3b566" ] ] }, { - "id": "5967f821.700468", + "id": "ac9bf788.c56fa8", "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": 494.95237731933594, - "y": 537.1282978057861, - "z": "57051de1.b81bb4", - "wires": [ - - ] + "x": 508.6667175292969, + "y": 591.2712202072144, + "z": "4375a986.58da58", + "wires": [] }, { - "id": "baed1c3a.1e989", + "id": "88cf203d.250b4", "type": "switchNode", "name": "switch svc-action", "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n", "comments": "", "outputs": 1, - "x": 504.9999465942383, - "y": 380.8898506164551, - "z": "57051de1.b81bb4", + "x": 511.5714340209961, + "y": 439.31843090057373, + "z": "4375a986.58da58", "wires": [ [ - "978f0c9b.1176d", - "62c9370e.8bad98", - "b577f516.b87bb8", - "c5263003.c4036", - "e9cebc1e.d2457", - "31b7bba9.7bea94", - "c33806c8.aa4d18", - "725fe95a.c30bf8" + "b29425ac.0e6b88", + "efa0b97f.2c8418", + "a699d525.8a5fb8", + "4c0d9e23.ae0fa", + "7e03d2fb.a3855c", + "c854e634.dbefd8", + "97cbf81.e321b08" ] ] }, { - "id": "978f0c9b.1176d", + "id": "b29425ac.0e6b88", "type": "outcome", "name": "assign", "xml": "<outcome value='assign'>\n", "comments": "", "outputs": 1, - "x": 873.3810729980469, - "y": 94.93759727478027, - "z": "57051de1.b81bb4", + "x": 923.3809661865234, + "y": 149.93756771087646, + "z": "4375a986.58da58", "wires": [ [ - "a22dae69.80ef5" + "ecd39eee.bd2f6" ] ] }, { - "id": "62c9370e.8bad98", + "id": "efa0b97f.2c8418", "type": "outcome", "name": "unassign", "xml": "<outcome value='unassign'>\n", "comments": "", "outputs": 1, - "x": 873.4286041259766, - "y": 430.1283016204834, - "z": "57051de1.b81bb4", + "x": 939.4286308288574, + "y": 580.1282825469971, + "z": "4375a986.58da58", "wires": [ [ - "463cb634.e904a8" + "91a6f5ca.5e21e8" ] ] }, { - "id": "c5263003.c4036", + "id": "4c0d9e23.ae0fa", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 874.7142448425293, - "y": 780.7469511032104, - "z": "57051de1.b81bb4", + "x": 928.1428680419922, + "y": 960.3183660507202, + "z": "4375a986.58da58", "wires": [ [ - "49dd7e11.20bc1" + "b067ec27.e84b4" ] ] }, { - "id": "49dd7e11.20bc1", + "id": "b067ec27.e84b4", "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": 1060.9046897888184, - "y": 780.747015953064, - "z": "57051de1.b81bb4", - "wires": [ - - ] + "x": 1161.3332977294922, + "y": 960.3184270858765, + "z": "4375a986.58da58", + "wires": [] }, { - "id": "c06aa47c.85b178", + "id": "2346097e.a3b566", "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": 609.416633605957, - "y": 233.7946949005127, - "z": "57051de1.b81bb4", + "x": 617.4166870117188, + "y": 330.79471588134766, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] }, { - "id": "a22dae69.80ef5", + "id": "ecd39eee.bd2f6", "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": 1215.52392578125, - "y": 94.50905799865723, - "z": "57051de1.b81bb4", + "x": 1265.5238189697266, + "y": 149.50902843475342, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] }, { - "id": "463cb634.e904a8", + "id": "960e9019.0d07b", + "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": 1746.8571319580078, + "y": 492.84235858917236, + "z": "4375a986.58da58", + "wires": [ + [] + ] + }, + { + "id": "91a6f5ca.5e21e8", "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": 1218.5237007141113, - "y": 429.84243297576904, - "z": "57051de1.b81bb4", + "x": 1284.5237274169922, + "y": 579.8424139022827, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] }, { - "id": "b577f516.b87bb8", + "id": "a699d525.8a5fb8", "type": "outcome", "name": "deactivate", "xml": "<outcome value='deactivate'>\n", "comments": "", "outputs": 1, - "x": 878.5238189697266, - "y": 315.5090947151184, - "z": "57051de1.b81bb4", + "x": 946.5237579345703, + "y": 435.5090456008911, + "z": "4375a986.58da58", "wires": [ [ - "bd95d506.9d29c8" + "65d7cc2b.f72464" ] ] }, { - "id": "e9cebc1e.d2457", + "id": "a260cf56.f0217", + "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": 1728.666763305664, + "y": 313.4136724472046, + "z": "4375a986.58da58", + "wires": [ + [] + ] + }, + { + "id": "7e03d2fb.a3855c", "type": "outcome", "name": "activate", "xml": "<outcome value='activate'>\n", "comments": "", "outputs": 1, - "x": 875.3333892822266, - "y": 155.08038139343262, - "z": "57051de1.b81bb4", + "x": 926.3333053588867, + "y": 241.08033561706543, + "z": "4375a986.58da58", "wires": [ [ - "9adca977.6fdd38" + "cb9db39e.3efd" ] ] }, { - "id": "31b7bba9.7bea94", + "id": "c854e634.dbefd8", "type": "outcome", - "name": "changeassign", - "xml": "<outcome value='changeassign'>\n", + "name": "create", + "xml": "<outcome value='create'>\n", "comments": "", "outputs": 1, - "x": 888.285831451416, - "y": 472.8422336578369, - "z": "57051de1.b81bb4", + "x": 941.0001182556152, + "y": 680.5000038146973, + "z": "4375a986.58da58", "wires": [ [ - "88556c83.1395f" + "32894e90.6b0c32" ] ] }, { - "id": "88556c83.1395f", - "type": "call", - "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-changeassign", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-changeassign' mode='sync' >\n", + "id": "97cbf81.e321b08", + "type": "outcome", + "name": "delete", + "xml": "<outcome value='delete'>\n", "comments": "", "outputs": 1, - "x": 1229.095199584961, - "y": 472.55640029907227, - "z": "57051de1.b81bb4", + "x": 939.0001068115234, + "y": 823.5000066757202, + "z": "4375a986.58da58", "wires": [ [ - + "6dc15b04.91f744" ] ] }, { - "id": "9adca977.6fdd38", + "id": "7bb307b0.304958", "type": "switchNode", "name": "switch request-action", "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", "comments": "", "outputs": 1, - "x": 1064.0001411437988, - "y": 154.00003051757812, - "z": "57051de1.b81bb4", + "x": 1168.0000762939453, + "y": 291.5000123977661, + "z": "4375a986.58da58", "wires": [ [ - "cc2bad6b.4598a", - "60d3ac48.b936d4" + "c9e81f54.ac68b", + "d05da9c5.f500d8" ] ] }, { - "id": "60d3ac48.b936d4", + "id": "d05da9c5.f500d8", "type": "outcome", "name": "ActivateSiteInstance", "xml": "<outcome value='ActivateSiteInstance'>", "comments": "", "outputs": 1, - "x": 1277.476276397705, - "y": 145.4792356491089, - "z": "57051de1.b81bb4", + "x": 1381.4762725830078, + "y": 222.979229927063, + "z": "4375a986.58da58", "wires": [ [ - "57cdb54d.2f9f3c" + "4a2d9e9d.93099" ] ] }, { - "id": "57cdb54d.2f9f3c", - "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", + "id": "c9e81f54.ac68b", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1651.0000801086426, - "y": 144.000018119812, - "z": "57051de1.b81bb4", + "x": 1350.381004333496, + "y": 314.3572244644165, + "z": "4375a986.58da58", "wires": [ [ - + "a260cf56.f0217" ] ] }, { - "id": "cc2bad6b.4598a", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", + "id": "cb9db39e.3efd", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1244.3810939788818, - "y": 226.85723209381104, - "z": "57051de1.b81bb4", + "x": 1107.0000762939453, + "y": 236.5000123977661, + "z": "4375a986.58da58", "wires": [ [ - "10dbd8d4.75e477" + "7bb307b0.304958" ] ] }, { - "id": "10dbd8d4.75e477", + "id": "4a2d9e9d.93099", "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", + "name": "call GENERIC-RESOURCE-API:site-vnf-topology-operation-activate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-activate' mode='sync' >\n", "comments": "", "outputs": 1, - "x": 1582.666669845581, - "y": 226.9136552810669, - "z": "57051de1.b81bb4", + "x": 1755.0000762939453, + "y": 221.5000123977661, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] }, { - "id": "bd95d506.9d29c8", + "id": "fef45f01.3fce6", "type": "switchNode", "name": "switch request-action", "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", "comments": "", "outputs": 1, - "x": 1073, - "y": 346, - "z": "57051de1.b81bb4", + "x": 1209.0000762939453, + "y": 468.5000123977661, + "z": "4375a986.58da58", "wires": [ [ - "b8195b3d.cc9f78", - "b97b745.9c9ca88" + "f6ce8f15.087c8", + "6a7a4689.125ee8" ] ] }, { - "id": "b97b745.9c9ca88", + "id": "6a7a4689.125ee8", "type": "outcome", - "name": "DeActivateSiteInstance", - "xml": "<outcome value='DeActivateSiteInstance'>", - "comments": "", - "outputs": 1, - "x": 1286.4761962890625, - "y": 277.4792175292969, - "z": "57051de1.b81bb4", - "wires": [ - [ - "f5aac374.2e2d4" - ] - ] - }, - { - "id": "f5aac374.2e2d4", - "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", + "name": "DeactivateSiteInstance", + "xml": "<outcome value='DeactivateSiteInstance'>", "comments": "", "outputs": 1, - "x": 1656, - "y": 275, - "z": "57051de1.b81bb4", + "x": 1422.4762725830078, + "y": 399.979229927063, + "z": "4375a986.58da58", "wires": [ [ - + "b4232a97.fef598" ] ] }, { - "id": "504dc14c.1b4a", - "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": 1610.8570556640625, - "y": 370.34234619140625, - "z": "57051de1.b81bb4", - "wires": [ - [ - - ] - ] - }, - { - "id": "b8195b3d.cc9f78", + "id": "f6ce8f15.087c8", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1255.3809280395508, - "y": 368.8572120666504, - "z": "57051de1.b81bb4", + "x": 1391.381004333496, + "y": 491.3572244644165, + "z": "4375a986.58da58", "wires": [ [ - "504dc14c.1b4a" + "960e9019.0d07b" ] ] }, { - "id": "c33806c8.aa4d18", - "type": "outcome", - "name": "create", - "xml": "<outcome value='create'>\n", - "comments": "", + "id": "65d7cc2b.f72464", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 871, - "y": 534, - "z": "57051de1.b81bb4", + "x": 1148.0000762939453, + "y": 413.5000123977661, + "z": "4375a986.58da58", "wires": [ [ - "18cbc95d.535697" + "fef45f01.3fce6" ] ] }, { - "id": "725fe95a.c30bf8", - "type": "outcome", - "name": "delete", - "xml": "<outcome value='delete'>\n", + "id": "b4232a97.fef598", + "type": "call", + "name": "call GENERIC-RESOURCE-API:site-vnf-topology-operation-deactivate", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-deactivate' mode='sync' >\n", "comments": "", "outputs": 1, - "x": 868.9999885559082, - "y": 677.000002861023, - "z": "57051de1.b81bb4", + "x": 1792.0000762939453, + "y": 397.5000123977661, + "z": "4375a986.58da58", "wires": [ - [ - "86c5aa37.0d5088" - ] + [] ] }, { - "id": "18cbc95d.535697", + "id": "49a6d604.e73918", "type": "switchNode", "name": "switch request-action", "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", "comments": "", "outputs": 1, - "x": 1098.3335647583008, - "y": 564.5863790512085, - "z": "57051de1.b81bb4", + "x": 1184.3336029052734, + "y": 733.086371421814, + "z": "4375a986.58da58", "wires": [ [ - "33af8fa8.cb18f", - "6468b583.fa7cec" + "92af337f.f9091", + "2260291f.e97ce6" ] ] }, { - "id": "6468b583.fa7cec", + "id": "2260291f.e97ce6", "type": "outcome", "name": "CreateSiteInstance", "xml": "<outcome value='CreateSiteInstance'>", "comments": "", "outputs": 1, - "x": 1327.8096809387207, - "y": 518.0655851364136, - "z": "57051de1.b81bb4", + "x": 1397.809799194336, + "y": 664.5655889511108, + "z": "4375a986.58da58", "wires": [ [ - "93206f47.4db71" + "a7e96e7.da3759" ] ] }, { - "id": "33af8fa8.cb18f", + "id": "92af337f.f9091", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1296.714412689209, - "y": 609.4435796737671, - "z": "57051de1.b81bb4", + "x": 1366.7145309448242, + "y": 755.9435834884644, + "z": "4375a986.58da58", "wires": [ [ - "3bcc0d9a.e0d3b2" + "7a7968b7.86bdd8" ] ] }, { - "id": "93206f47.4db71", - "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": "", + "id": "32894e90.6b0c32", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1701.3334846496582, - "y": 516.5863676071167, - "z": "57051de1.b81bb4", + "x": 1123.3336029052734, + "y": 678.086371421814, + "z": "4375a986.58da58", "wires": [ [ - + "49a6d604.e73918" ] ] }, { - "id": "3bcc0d9a.e0d3b2", + "id": "a7e96e7.da3759", + "type": "call", + "name": "call GENERIC-RESOURCE-API:site-vnf-topology-operation-create", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-create' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1771.3336029052734, + "y": 663.086371421814, + "z": "4375a986.58da58", + "wires": [ + [] + ] + }, + { + "id": "7a7968b7.86bdd8", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 1436.9999885559082, - "y": 610.500002861023, - "z": "57051de1.b81bb4", + "x": 1507.0001068115234, + "y": 757.0000066757202, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] }, { - "id": "86c5aa37.0d5088", + "id": "20f9ae9c.019342", "type": "switchNode", "name": "switch request-action", "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", "comments": "", "outputs": 1, - "x": 1088.000228881836, - "y": 685.5001239776611, - "z": "57051de1.b81bb4", + "x": 1185.0001068115234, + "y": 876.0000066757202, + "z": "4375a986.58da58", "wires": [ [ - "fc244f76.ceda2", - "bd7ae6f3.16da48" + "91de147a.222508", + "74446a5b.f474e4" ] ] }, { - "id": "bd7ae6f3.16da48", + "id": "74446a5b.f474e4", "type": "outcome", "name": "DeleteSiteInstance", "xml": "<outcome value='DeleteSiteInstance'>", "comments": "", "outputs": 1, - "x": 1328.4761848449707, - "y": 660.9792203903198, - "z": "57051de1.b81bb4", + "x": 1398.476303100586, + "y": 807.4792242050171, + "z": "4375a986.58da58", "wires": [ [ - "bad4d35c.1ebd6" + "553676c.1a72488" ] ] }, { - "id": "fc244f76.ceda2", + "id": "91de147a.222508", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1297.380916595459, - "y": 752.3572149276733, - "z": "57051de1.b81bb4", + "x": 1367.3810348510742, + "y": 898.8572187423706, + "z": "4375a986.58da58", "wires": [ [ - "fc430959.324e98" + "55eb587b.78c2a8" ] ] }, { - "id": "bad4d35c.1ebd6", - "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": "", + "id": "6dc15b04.91f744", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1701.9999885559082, - "y": 659.500002861023, - "z": "57051de1.b81bb4", + "x": 1124.0001068115234, + "y": 821.0000066757202, + "z": "4375a986.58da58", "wires": [ [ - + "20f9ae9c.019342" ] ] }, { - "id": "fc430959.324e98", + "id": "553676c.1a72488", + "type": "call", + "name": "call GENERIC-RESOURCE-API:site-vnf-topology-operation-delete", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-delete' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 1772.0001068115234, + "y": 806.0000066757202, + "z": "4375a986.58da58", + "wires": [ + [] + ] + }, + { + "id": "55eb587b.78c2a8", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 1437.6664924621582, - "y": 753.4136381149292, - "z": "57051de1.b81bb4", + "x": 1507.6666107177734, + "y": 899.9136419296265, + "z": "4375a986.58da58", "wires": [ - [ - - ] + [] ] } ] 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 index 0078f07d..20522bde 100644 --- 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 @@ -20,15 +20,38 @@ </outcome> <outcome value='Other'> <block atomic="true"> + <set> + <parameter name='prop.site.deviceId_length' value='0' /> + </set> <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> + <block> + <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> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`"> + <outcome value='true'> + <block atomic="true"> + <for index="deviceidx" start="0" end="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`"> + <block> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' /> + <parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' /> + </set> + </outcome> + </switch> + </block> + </for> + </block> + </outcome> + </switch> + </block> </for> <switch test="`$tmp.vidx`"> <outcome value=''> @@ -43,101 +66,207 @@ </outcome> </switch> <set> - <parameter name='tmp.sdwan.site' value='false' /> + <parameter name='prop.site.sdwan' value="false" /> </set> - <for index='idx' start='0' end='`$ctx.vnf-data.vnf-request-input.vnf-input-parameters.param_length`' > + <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > + <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' /> + <parameter name='contextPrefix' value='prop' /> + </execute> + <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vidx].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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`"> <outcome value='true'> <set> - <parameter name='prop.site.id' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`"> <outcome value='true'> <set> - <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.location-name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`"> <outcome value='true'> <set> - <parameter name='prop.site.description' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.location-address' value='`$service-data.vnfs.vnf[$vidx].vnf-data.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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`"> <outcome value='true'> <set> - <parameter name='prop.site.location' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.location-postcode' value='`$service-data.vnfs.vnf[$vidx].vnf-data.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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`"> <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' /> + <parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.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'`"> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`"> <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' /> + <parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> </set> </outcome> </switch> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`"> + <outcome value='true'> + <block atomic="true"> + <set> + <parameter name='prop.site.emails' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$prop.site.emails`'/> + <parameter name="regex" value=","/> + <parameter name="ctx_memory_result_key" value="prop.site.email"/> + </execute> + </block> + </outcome> + </switch> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`"> + <outcome value='true'> + <set> + <parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.sdwan' value="true" /> + </set> + </outcome> + </switch> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> + <outcome value='true'> + <block atomic="true"> + <set> + <parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.sdwan' value="true" /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$prop.site.role`'/> + <parameter name="regex" value=","/> + <parameter name="ctx_memory_result_key" value="prop.site.roles"/> + </execute> + </block> + </outcome> + </switch> + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`"> + <outcome value='true'> + <block atomic="true"> + <set> + <parameter name='prop.site.controlPoint' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$prop.site.controlPoint`'/> + <parameter name="regex" value=","/> + <parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/> + </execute> + </block> + </outcome> + </switch> </block> </for> - <switch test="`$tmp.sdwan.site`"> - <outcome value='false'> - <block></block> - </outcome> + <switch test="`$prop.site.sdwan`"> <outcome value='true'> - <block atomic="true"></block> + <block atomic="true"> + <set> + <parameter name='prop.site.siteId' value="" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND + depth = '1'" + pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + </set> + </outcome> + <outcome value='not-found'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> + </return> + </outcome> + </get-resource> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="post"/> + <parameter name="responsePrefix" value="token-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <outcome value='success'> + <set> + <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' /> + </set> + </outcome> + <outcome value='failure'> + <block></block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site.json'`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="post"/> + <parameter name="responsePrefix" value="site-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + </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.' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].name' value='siteId' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].value' value='`$site-result[0].id`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' /> + </set> + <set> + <parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> + <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$tmp.vidx].vnf-id + '/vnf-data/'` " /> </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`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' /> </set> <set> - <parameter name='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/'` " /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' /> </set> - <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' /> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' + key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' > + <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> + <parameter name='generated-site-id' value='`$site-result[0].site-id`' /> <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" /> @@ -146,4 +275,4 @@ </return> </block> </method> -</service-logic> +</service-logic>
\ No newline at end of file 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 index ab728d7c..02e6d237 100644 --- 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 @@ -1,137 +1,193 @@ -<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> +<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">
+ <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>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name="`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
+ </set>
+ <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 == 'location-name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-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 == 'address'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-address' 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 == 'postcode'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-postcode' 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 == 'latitude'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-latitude' 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 == 'longitude'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-latitude' 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 == 'emails'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.emails' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.emails`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.email"/>
+ </execute>
+ </block>
+ </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='prop.site.sdwan' value="true" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ <parameter name='prop.site.sdwan' value="true" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.role`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.roles"/>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.controlPoint' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.controlPoint`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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='site-resource'
+ key='site-resource.id = $prop.vnf-index' >
+ <parameter name='id' value='`$prop.vnf-index`' />
+ <parameter name='name' value='`$prop.site.name`' />
+ <parameter name='description' value='`$prop.site.description`' />
+ <parameter name='type' value='prop.site.type' />
+ <parameter name='role' value='prop.site.role' />
+ <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="site-resource" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/site-resources/site-resource/' + $prop.vnf-index`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="site-resource.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 index 373706fd..d4e18bb5 100644 --- 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 @@ -3,141 +3,171 @@ 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> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' > + <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/> + </execute> + <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`"> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id is a required input" /> + </return> + </outcome> + </switch> + <switch test='`$service-data.vnfs.vnf_length`'> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" /> + </return> + </outcome> + <outcome value='Other'> + <block atomic="true"> + <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' > + <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`"> + <outcome value='true'> + <set> + <parameter name='tmp.vidx' value='`$vidx`' /> + <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' /> + </set> + </outcome> + </switch> + </for> + <switch test="`$tmp.vidx`"> + <outcome value=''> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id not found in service-data" /> + </return> </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> + </outcome> + </switch> + <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'> + <outcome value='Active'> + <block atomic="true"></block> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" /> + </return> + </outcome> + </switch> + </block> + <for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].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'`"> + <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> <outcome value='true'> - <set> - <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> + <block atomic="true"> + <set> + <parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + <parameter name='prop.site.sdwan' value="true" /> + </set> + </block> </outcome> </switch> - <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`"> + <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`"> <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> + <block atomic="true"> + <set> + <parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> + </set> + </block> </outcome> </switch> </block> </for> - <switch test="`$tmp.sdwan.site`"> - <outcome value='false'> - <block></block> - </outcome> + <switch test="`$prop.site.sdwan`"> <outcome value='true'> - <block atomic="true"></block> + <block atomic="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND + depth = '1'" + pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + </set> + </outcome> + <outcome value='not-found'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> + </return> + </outcome> + </get-resource> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="post"/> + <parameter name="responsePrefix" value="token-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <outcome value='success'> + <set> + <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' /> + </set> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site.json'`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="post"/> + <parameter name="responsePrefix" value="site-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + </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.' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' /> </set> <set> - <parameter name='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`' /> + <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' /> + <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` " /> </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/'` " /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' /> + <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' /> </set> - <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='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' /> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' + key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' > + <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> <parameter name='operational-status' value='PendingDelete' /> - <parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' /> - <parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' /> - <parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' /> - <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" /> @@ -146,4 +176,4 @@ </return> </block> </method> -</service-logic> +</service-logic>
\ No newline at end of file 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 index 2bba7f30..4162ef75 100644 --- 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 @@ -1,101 +1,83 @@ -<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> +<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">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >
+ <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/>
+ </execute>
+ <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-request-input.vnf-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test="`$service-data.vnfs.vnf[$nidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.nidx' value='`$nidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$nidx].vnf-data.`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.nidx`">
+ <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[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='PendingDelete'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmp.nidx]." value=""/>
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='vnf-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vnf-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'` " />
+ </set>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='site-resource'
+ key='site-resource.id = $vnf-topology-operation-input.vnf-information.vnf-id'></delete>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/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 481a7a89..e0332cc6 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 @@ -9,50 +9,55 @@ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' ></call>
</outcome>
<outcome value='activate'>
- <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 atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='ActivateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-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'>
- <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 atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='DeactivateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-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='changeassign'>
- <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-changeassign' mode='sync' ></call>
- </outcome>
<outcome value='create'>
- <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 atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='CreateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
</outcome>
<outcome value='delete'>
- <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 atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='DeleteSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
</outcome>
<outcome value='Other'>
<return status='failure'>
@@ -69,4 +74,4 @@ </return>
</block>
</method>
-</service-logic>
\ No newline at end of file +</service-logic>
diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-site.json b/platform-logic/restapi-templates/src/main/json/sdwan-site.json index 11eee550..9d9fba4b 100644 --- a/platform-logic/restapi-templates/src/main/json/sdwan-site.json +++ b/platform-logic/restapi-templates/src/main/json/sdwan-site.json @@ -21,33 +21,41 @@ { "sites": [ { - "id": ${prop.id}, - "name": ${prop.name}, - "Locations": [ + "id": "", + "name": ${prop.site.name}, + "locations": [ { - "name": ${prop.location-name}, - "address": ${prop.location-address}, - "postcode": ${prop.location-postcode} + "name": ${prop.site.location-name}, + "address": ${prop.site.location-address}, + "postcode": ${prop.site.location-postcode}, + "latitude": ${prop.site.location-latitude}, + "longitude": ${prop.site.location-longitude} } ], - "devices": [ - { - "deviceId": ${prop.deviceId}, - "locationName": ${prop.location-name} + + "devices": [${repeat:prop.site.deviceId_length: + { + "deviceId":${prop.site.deviceId[${1}]}, + "locationName": ${prop.site.location-name}, + }, } - ], - "siteType": ${prop.type}, - "role": [${repeat:prop.roles_length: - ${prop.roles[${1}]}, + ], + + "siteType": ${prop.site.type}, + "role": [${repeat:prop.site.roles_length: + ${prop.site.roles[${1}]}, } ], - "controlPoints": [${repeat:prop.controlpoints_length: - ${prop.controlpoints[${1}]}, + "controlPoints": [${repeat:prop.site.controlpoints_length: + ${prop.site.controlpoints[${1}]}, } ], - "description": ${description} + "contact":{ + "emails":[${repeat:prop.site.email_length: + ${prop.site.email[${1}]}, + } + ] + } } ] } - - |