diff options
author | gaurav <gaurav.agrawal@huawei.com> | 2018-07-19 18:58:37 +0530 |
---|---|---|
committer | gaurav <gaurav.agrawal@huawei.com> | 2018-07-19 18:58:37 +0530 |
commit | 0c86b92ccd3c103e72d08388c4c8afcecbbb25e8 (patch) | |
tree | 9b51d7da8ebb2724403cf4124ba4384e41f828f5 /platform-logic/generic-resource-api/src/main | |
parent | 0941e45b7a5b986f74704fe964d051bd0c733c5c (diff) |
Adding SOTN Connectivity Resource DG.
Added create/activate/deactivate & delete DGs for SOTN connectivity
resource.
Change-Id: I2760418b16ed411737cf38313fb1b9e051c8985a
Issue-ID: SDNC-356
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: 60b9c632414c96166064e9a8850017fc968b6749
Diffstat (limited to 'platform-logic/generic-resource-api/src/main')
11 files changed, 3616 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.json new file mode 100644 index 00000000..8fa5b0f0 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.json @@ -0,0 +1,203 @@ +[ + { + "id": "c91e9b10.259838", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 96, + "y": 42.99996852874756, + "z": "ea913b4d.eb8638", + "wires": [ + [ + "38533cf9.2a1214" + ] + ] + }, + { + "id": "38533cf9.2a1214", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT", + "module": "GENERIC-RESOURCE-API", + "version": "1.2.1-SNAPSHOT", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>", + "outputs": 1, + "x": 282.00000381469727, + "y": 114.99998569488525, + "z": "ea913b4d.eb8638", + "wires": [ + [ + "39d16e55.9c1d22" + ] + ] + }, + { + "id": "39d16e55.9c1d22", + "type": "method", + "name": "method sotn-network-topology-operation-activate", + "xml": "<method rpc='sotn-network-topology-operation-activate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 270.0001220703125, + "y": 202.99996852874756, + "z": "ea913b4d.eb8638", + "wires": [ + [ + "4519115b.490c9" + ] + ] + }, + { + "id": "4519115b.490c9", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 444.00001525878906, + "y": 311.0000276565552, + "z": "ea913b4d.eb8638", + "wires": [ + [ + "dfb7f2ca.a1635", + "d89e17e8.bd1698", + "d5e8e338.ac641", + "604990bf.defe7", + "b18a2025.dcb34", + "9bb8612f.5c571", + "c3e1900f.1a37e", + "18e80a8f.69f565" + ] + ] + }, + { + "id": "dfb7f2ca.a1635", + "type": "call", + "name": "call GENERIC-RESOURCE-API:validate-sotn-network-input-parameters", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sotn-network-input-parameters' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 902.3889007568359, + "y": 59.99996852874756, + "z": "ea913b4d.eb8638", + "wires": [ + [ + + ] + ] + }, + { + "id": "d89e17e8.bd1698", + "type": "record", + "name": "record", + "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sotn-network-topology-operation-activate\"/>\n<parameter name=\"field3\" value=\"SOTN-Activate\"/>\n", + "comments": "", + "outputs": 1, + "x": 702.5555992126465, + "y": 113.77782154083252, + "z": "ea913b4d.eb8638", + "wires": [ + [ + + ] + ] + }, + { + "id": "d5e8e338.ac641", + "type": "set", + "name": "set networkId and network-object-path", + "xml": "<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name=\"network-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id + '/network-data/'` \" />", + "comments": "", + "x": 793.5556488037109, + "y": 302.3132629394531, + "z": "ea913b4d.eb8638", + "wires": [ + + ] + }, + { + "id": "604990bf.defe7", + "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": 715.3334503173828, + "y": 491.8686828613281, + "z": "ea913b4d.eb8638", + "wires": [ + + ] + }, + { + "id": "b18a2025.dcb34", + "type": "set", + "name": "set network-level-oper-status", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />", + "comments": "", + "x": 760.4445648193359, + "y": 363.53543758392334, + "z": "ea913b4d.eb8638", + "wires": [ + + ] + }, + { + "id": "9bb8612f.5c571", + "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": 734.8577041625977, + "y": 166.77785778045654, + "z": "ea913b4d.eb8638", + "wires": [ + [ + + ] + ] + }, + { + "id": "c3e1900f.1a37e", + "type": "update", + "name": "update SOTN Connectivity status to AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='configuration' \n key='configuration.configuration-id = $network-topology-operation-input.network-information.network-id' >\n<parameter name='configuration-id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='operational-status' value='Active' />", + "comments": "", + "outputs": 1, + "x": 794.6631469726562, + "y": 423.23862648010254, + "z": "ea913b4d.eb8638", + "wires": [ + [ + + ] + ] + }, + { + "id": "18e80a8f.69f565", + "type": "set", + "name": "set network in service-data", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />", + "comments": "", + "x": 757.0001220703125, + "y": 234.09102249145508, + "z": "ea913b4d.eb8638", + "wires": [ + + ] + }, + { + "id": "bd8b5b43.6b8768", + "type": "comment", + "name": "TODO MP2MP", + "info": "Current implementation is for P2P connectivity\nFor MP2MP connectivity in future DG needs to be modified", + "comments": "", + "x": 982.03125, + "y": 157.03124904632568, + "z": "ea913b4d.eb8638", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.json new file mode 100644 index 00000000..9559f36f --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.json @@ -0,0 +1,1188 @@ +[ + { + "id": "11760114.ffa53f", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 109, + "y": 68.88888743473217, + "z": "f3682574.cde048", + "wires": [ + [ + "387ea19.1ea525e" + ] + ] + }, + { + "id": "387ea19.1ea525e", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT", + "module": "GENERIC-RESOURCE-API", + "version": "1.2.1-SNAPSHOT", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>", + "outputs": 1, + "x": 363.5, + "y": 68.88888743473217, + "z": "f3682574.cde048", + "wires": [ + [ + "acc8b788.ec53d8" + ] + ] + }, + { + "id": "acc8b788.ec53d8", + "type": "method", + "name": "sotn-network-topology-operation-create", + "xml": "<method rpc='sotn-network-topology-operation-create' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 362.5, + "y": 168.88888743473217, + "z": "f3682574.cde048", + "wires": [ + [ + "34953ba0.309594" + ] + ] + }, + { + "id": "34953ba0.309594", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 502.5, + "y": 268.88888743473217, + "z": "f3682574.cde048", + "wires": [ + [ + "7388dbd6.e4b144", + "eb46e056.51069", + "27c87a61.1820b6", + "1c8ab342.be0a1d", + "f72cb383.b1b6", + "a36220a4.22926", + "a70fe000.5399c", + "47a1000.3ac09", + "edce49a.1c028b8", + "1f8a7b8b.e596a4", + "68c583ec.0ea75c", + "1522718b.801dfe", + "e184926f.0ad08" + ] + ] + }, + { + "id": "7388dbd6.e4b144", + "type": "call", + "name": "call GENERIC-RESOURCE-API:validate-sotn-network-input-parameters", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sotn-network-input-parameters' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 932.5000114440918, + "y": 86.66663935733959, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "eb46e056.51069", + "type": "record", + "name": "record", + "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sotn-network-topology-operation-create\"/>\n<parameter name=\"field3\" value=\"SOTN-Config\"/>\n", + "comments": "", + "outputs": 1, + "x": 726.0556564331055, + "y": 264.11109924316406, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "27c87a61.1820b6", + "type": "execute", + "name": "execute generate-sotn-vpn-network-id", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.sotn.network-id\"/>\n", + "comments": "", + "outputs": 1, + "x": 826.5000114440918, + "y": 126.66663935733959, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "1c8ab342.be0a1d", + "type": "switchNode", + "name": "switch service-data.networks_length", + "xml": "<switch test='`$service-data.networks.network_length`'>\n", + "comments": "", + "outputs": 1, + "x": 817.0556564331055, + "y": 224.11109924316406, + "z": "f3682574.cde048", + "wires": [ + [ + "c1b6935.5afba7", + "33b11f83.270c2" + ] + ] + }, + { + "id": "c1b6935.5afba7", + "type": "other", + "name": "Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1046.0556564331055, + "y": 204.11109924316406, + "z": "f3682574.cde048", + "wires": [ + [ + "50a80e72.5fa1f" + ] + ] + }, + { + "id": "33b11f83.270c2", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1046.0556564331055, + "y": 244.11109924316406, + "z": "f3682574.cde048", + "wires": [ + [ + "683104fc.0cc2bc" + ] + ] + }, + { + "id": "50a80e72.5fa1f", + "type": "set", + "name": "set nidx", + "xml": "<set>\n<parameter name='nidx' value='0' />\n", + "comments": "", + "x": 1188.5556564331055, + "y": 204.11109924316406, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "4bd2e74.8492e18", + "type": "set", + "name": "set nidx", + "xml": "<set>\n<parameter name='nidx' value='`$service-data.networks.network_length`' />\n", + "comments": "", + "x": 1322.1111755371094, + "y": 205.66670894622803, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "f72cb383.b1b6", + "type": "set", + "name": "set network in service-data", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-id' value='`$prop.sotn.network-id`' />\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n<parameter name='service-data.networks.network_length' value='`$nidx+1`' />\n\n", + "comments": "", + "x": 787.5556564331055, + "y": 304.11109924316406, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "a36220a4.22926", + "type": "set", + "name": "set networkId and network-object-path", + "xml": "<set>\n<parameter name='networkId' value='`$prop.sotn.network-id`' />\n<parameter name=\"network-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` \" />", + "comments": "", + "x": 823.0556564331055, + "y": 344.11109924316406, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "a70fe000.5399c", + "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": 749.7224502563477, + "y": 596.7778205871582, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "47a1000.3ac09", + "type": "set", + "name": "set network-level-oper-status", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />", + "comments": "", + "x": 794.5556564331055, + "y": 384.11109924316406, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "edce49a.1c028b8", + "type": "save", + "name": "save SOTN connectivity resource in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='configuration' \n key='configuration.configuration-id = $prop.sotn.network-id' >\n<parameter name='configuration-id' value='`$prop.sotn.network-id`' />\n<parameter name='configuration-name' value='`$prop.sotn.client-svc-name`' />\n<parameter name='configuration-type' value='`$prop.sotn.client-svc-descr`' />\n<parameter name='configuration-sub-type' value='`$prop.sotn.tenantId`' />\n<parameter name='orchestration-status' value='`$prop.sotn.vpnType`' />\n<parameter name='management-option' value='`$prop.sotn.cir`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n<parameter name='configuration-selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` \" />", + "comments": "", + "outputs": 1, + "x": 827.0556564331055, + "y": 430.77778816223145, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "1f8a7b8b.e596a4", + "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.networks.network[$nidx].network-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"configuration\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/configurations/configuration/' + $prop.sotn.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"configuration.configuration-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.sotn.network-id`\" />", + "comments": "", + "outputs": 1, + "x": 802.0556678771973, + "y": 468.55554008483887, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "b85378f.1752188", + "type": "for", + "name": "for each existing network", + "xml": "<for index='idx' start='0' end='`$nidx`' >\n", + "comments": "", + "outputs": 1, + "x": 1191.5397186279297, + "y": 348.8888511364348, + "z": "f3682574.cde048", + "wires": [ + [ + "ad3781e0.62cbe" + ] + ] + }, + { + "id": "683104fc.0cc2bc", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1190.4127006530762, + "y": 244.04761123657227, + "z": "f3682574.cde048", + "wires": [ + [ + "b85378f.1752188", + "4bd2e74.8492e18" + ] + ] + }, + { + "id": "ad3781e0.62cbe", + "type": "switchNode", + "name": "switch networkid found", + "xml": "<switch test=\"`$service-data.networks.network[$idx].network-id == $network-topology-operation-input.network-information.network-id`\">\n", + "comments": "", + "outputs": 1, + "x": 1466.825439453125, + "y": 348.4603538219817, + "z": "f3682574.cde048", + "wires": [ + [ + "30f1f431.08877c" + ] + ] + }, + { + "id": "30f1f431.08877c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1367.5556373596191, + "y": 407.03178498195484, + "z": "f3682574.cde048", + "wires": [ + [ + "1df899ae.3b8026" + ] + ] + }, + { + "id": "3a07954a.fda22a", + "type": "comment", + "name": "make sure this network doesn't exist already", + "info": "", + "comments": "", + "x": 1415.1904487609863, + "y": 307.142908543814, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "1df899ae.3b8026", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id already found in service-data\" />\n", + "comments": "", + "x": 1515.3057403564453, + "y": 406.88897705078125, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "1eccb58d.49bd0a", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1481.957233428955, + "y": 176.6666965484619, + "z": "f3682574.cde048", + "wires": [ + [ + "39c25585.35095a", + "f63e13ae.1ca36", + "b990d7b7.d50db8", + "84319a02.cc83c8", + "fd903008.4e1c6", + "64b1c8e5.3ad178", + "c55257d1.2dce08", + "70e3ab9b.3b6ef4", + "f11487f.1a2d778", + "f273d999.226da8", + "e251bd6c.23dfe", + "f51170c3.6db7", + "ba516d92.f632", + "fe52bad5.770908", + "b3759567.fa1fc8", + "a9128726.ee25b8" + ] + ] + }, + { + "id": "39c25585.35095a", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1740.1789779663086, + "y": 34, + "z": "f3682574.cde048", + "wires": [ + [ + "be03b2cc.d65d1" + ] + ] + }, + { + "id": "be03b2cc.d65d1", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1927.1789779663086, + "y": 30, + "z": "f3682574.cde048", + "wires": [ + [ + "904307f9.4f4248" + ] + ] + }, + { + "id": "904307f9.4f4248", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.sotn.etht-svc-name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2077.1791076660156, + "y": 28.600006580352783, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "f63e13ae.1ca36", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 1751.0186386108398, + "y": 73.99999809265137, + "z": "f3682574.cde048", + "wires": [ + [ + "2d5d0686.3b5eba" + ] + ] + }, + { + "id": "2d5d0686.3b5eba", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1921.0186386108398, + "y": 69.99999809265137, + "z": "f3682574.cde048", + "wires": [ + [ + "8eefd68e.fffed8" + ] + ] + }, + { + "id": "8eefd68e.fffed8", + "type": "set", + "name": "set etht-svc-descr", + "xml": "<set>\n<parameter name='prop.sotn.etht-svc-descr' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2108.3520793914795, + "y": 68.46115493774414, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "68c583ec.0ea75c", + "type": "for", + "name": "for loop i - Network input parameters", + "xml": "<for index=\"idx\" start=\"0\" end=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">\n", + "comments": "", + "outputs": 1, + "x": 819.7343978881836, + "y": 174.44442749023438, + "z": "f3682574.cde048", + "wires": [ + [ + "1eccb58d.49bd0a" + ] + ] + }, + { + "id": "b990d7b7.d50db8", + "type": "switchNode", + "name": "switch tenantId", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'tenantId'`\">\n", + "comments": "", + "outputs": 1, + "x": 1741.4010200500488, + "y": 117.33332538604736, + "z": "f3682574.cde048", + "wires": [ + [ + "d96e6910.7c5ce8" + ] + ] + }, + { + "id": "d96e6910.7c5ce8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1928.4010200500488, + "y": 113.33332538604736, + "z": "f3682574.cde048", + "wires": [ + [ + "5b48eb71.3d5864" + ] + ] + }, + { + "id": "5b48eb71.3d5864", + "type": "set", + "name": "set tenantId", + "xml": "<set>\n<parameter name='prop.sotn.tenantId' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2096.401020050049, + "y": 113.93333148956299, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "84319a02.cc83c8", + "type": "switchNode", + "name": "switch CIR", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'CIR'`\">\n", + "comments": "", + "outputs": 1, + "x": 1723.2406768798828, + "y": 207.33338356018066, + "z": "f3682574.cde048", + "wires": [ + [ + "c1cdced0.80842" + ] + ] + }, + { + "id": "c1cdced0.80842", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1931.2407455444336, + "y": 203.3333969116211, + "z": "f3682574.cde048", + "wires": [ + [ + "bcbc8704.d57d08" + ] + ] + }, + { + "id": "bcbc8704.d57d08", + "type": "set", + "name": "set cir", + "xml": "<set>\n<parameter name='prop.sotn.cir' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2080.5740661621094, + "y": 201.7945442199707, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "fd903008.4e1c6", + "type": "switchNode", + "name": "switch vpnType", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'vpnType'`\">\n", + "comments": "", + "outputs": 1, + "x": 1742.5491485595703, + "y": 161.11110258102417, + "z": "f3682574.cde048", + "wires": [ + [ + "25a34a38.dcc406" + ] + ] + }, + { + "id": "25a34a38.dcc406", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1929.5491485595703, + "y": 157.11110258102417, + "z": "f3682574.cde048", + "wires": [ + [ + "fc6be9bd.f8dd28" + ] + ] + }, + { + "id": "fc6be9bd.f8dd28", + "type": "set", + "name": "set vpnType", + "xml": "<set>\n<parameter name='prop.sotn.vpnType' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2098.882781982422, + "y": 154.57226753234863, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "64b1c8e5.3ad178", + "type": "switchNode", + "name": "switch access-provider-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-provider-id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1764.0307846069336, + "y": 483.55562114715576, + "z": "f3682574.cde048", + "wires": [ + [ + "d7282d61.ab2dc" + ] + ] + }, + { + "id": "c55257d1.2dce08", + "type": "switchNode", + "name": "switch access-client-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-client-id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1756.5862655639648, + "y": 528.8889503479004, + "z": "f3682574.cde048", + "wires": [ + [ + "3e5c147b.b1e80c" + ] + ] + }, + { + "id": "70e3ab9b.3b6ef4", + "type": "switchNode", + "name": "switch access-topology-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-topology-id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1761.0307235717773, + "y": 567.7778358459473, + "z": "f3682574.cde048", + "wires": [ + [ + "733a89f7.791ab8" + ] + ] + }, + { + "id": "d7282d61.ab2dc", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1948.0307846069336, + "y": 482.5556364059448, + "z": "f3682574.cde048", + "wires": [ + [ + "bf6a3d1f.8cbc" + ] + ] + }, + { + "id": "3e5c147b.b1e80c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1943.5862655639648, + "y": 524.8889503479004, + "z": "f3682574.cde048", + "wires": [ + [ + "eae17cc1.2b92b" + ] + ] + }, + { + "id": "733a89f7.791ab8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1948.0307235717773, + "y": 563.7778358459473, + "z": "f3682574.cde048", + "wires": [ + [ + "bf2ad720.26e6f8" + ] + ] + }, + { + "id": "bf6a3d1f.8cbc", + "type": "set", + "name": "set access-provider-id", + "xml": "<set>\n<parameter name='prop.sotn.access-provider-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2131.253143310547, + "y": 481.66682052612305, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "eae17cc1.2b92b", + "type": "set", + "name": "set access-client-id", + "xml": "<set>\n<parameter name='prop.sotn.access-client-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2120.1421813964844, + "y": 522.8994269371033, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "bf2ad720.26e6f8", + "type": "set", + "name": "set access-topology-id", + "xml": "<set>\n<parameter name='prop.sotn.access-topology-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2130.0310974121094, + "y": 561.7882833480835, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "f11487f.1a2d778", + "type": "switchNode", + "name": "switch access-node-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-node-id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1761.8454818725586, + "y": 614.4444794654846, + "z": "f3682574.cde048", + "wires": [ + [ + "3f7939dd.f6bad6" + ] + ] + }, + { + "id": "3f7939dd.f6bad6", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1948.8454818725586, + "y": 610.4444794654846, + "z": "f3682574.cde048", + "wires": [ + [ + "36806cf5.900574" + ] + ] + }, + { + "id": "f273d999.226da8", + "type": "switchNode", + "name": "switch access-ltp-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-ltp-id'`\">\n", + "comments": "", + "outputs": 1, + "x": 1758.6232528686523, + "y": 656.8889560699463, + "z": "f3682574.cde048", + "wires": [ + [ + "dd2b85b9.e6ec48" + ] + ] + }, + { + "id": "dd2b85b9.e6ec48", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1945.6232528686523, + "y": 652.8889560699463, + "z": "f3682574.cde048", + "wires": [ + [ + "7e4475d7.79ec8c" + ] + ] + }, + { + "id": "36806cf5.900574", + "type": "set", + "name": "set access-node-id", + "xml": "<set>\n<parameter name='prop.sotn.access-node-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2120.8457946777344, + "y": 609.1216135025024, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "7e4475d7.79ec8c", + "type": "set", + "name": "set access-ltp-id", + "xml": "<set>\n<parameter name='prop.sotn.access-ltp-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2111.2899475097656, + "y": 651.8993854522705, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "1522718b.801dfe", + "type": "save", + "name": "save srcLTP relationship in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='configuration:relationship-list' \n key='configuration.configuration-id = $prop.sotn.network-id' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"logical-link\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/logical-links/logical-link/' + $unique-src-ltpId`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"logical-link.link-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$unique-src-ltpId`\" />", + "comments": "", + "outputs": 1, + "x": 800.1047744750977, + "y": 553.5184006690979, + "z": "f3682574.cde048", + "wires": [ + [ + + ] + ] + }, + { + "id": "e184926f.0ad08", + "type": "set", + "name": "set unique-src-ltpId", + "xml": "<set>\n<parameter name='unique-src-ltpId' value=\"`'nodeId-' + $prop.sotn.src-access-node-id + '-ltpId-' + $prop.sotn.src-access-ltp-id`\" />", + "comments": "", + "x": 764.6603622436523, + "y": 515.9999980926514, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "e251bd6c.23dfe", + "type": "switchNode", + "name": "switch EIR", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'EIR'`\">\n", + "comments": "", + "outputs": 1, + "x": 1724.5311279296875, + "y": 250.03125, + "z": "f3682574.cde048", + "wires": [ + [ + "8810ee0c.a4e38" + ] + ] + }, + { + "id": "8810ee0c.a4e38", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1926.5310897827148, + "y": 245.03127002716064, + "z": "f3682574.cde048", + "wires": [ + [ + "1e197aec.8afff5" + ] + ] + }, + { + "id": "1e197aec.8afff5", + "type": "set", + "name": "set eir", + "xml": "<set>\n<parameter name='prop.sotn.eir' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2082.8645935058594, + "y": 244.49240589141846, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "f51170c3.6db7", + "type": "switchNode", + "name": "switch CBS", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'CBS'`\">\n", + "comments": "", + "outputs": 1, + "x": 1724.5311279296875, + "y": 299.03125, + "z": "f3682574.cde048", + "wires": [ + [ + "49df64ea.07087c" + ] + ] + }, + { + "id": "49df64ea.07087c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1923.5310897827148, + "y": 295.0312566757202, + "z": "f3682574.cde048", + "wires": [ + [ + "386c9243.097e5e" + ] + ] + }, + { + "id": "386c9243.097e5e", + "type": "set", + "name": "set cbs", + "xml": "<set>\n<parameter name='prop.sotn.cbs' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2081.8646545410156, + "y": 293.49241638183594, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "ba516d92.f632", + "type": "switchNode", + "name": "switch PBS", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'PBS'`\">\n", + "comments": "", + "outputs": 1, + "x": 1724.5311279296875, + "y": 344.03125, + "z": "f3682574.cde048", + "wires": [ + [ + "9ac50dab.4fbde" + ] + ] + }, + { + "id": "9ac50dab.4fbde", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1923.5310897827148, + "y": 337.03125762939453, + "z": "f3682574.cde048", + "wires": [ + [ + "fcfbd737.d83c58" + ] + ] + }, + { + "id": "fcfbd737.d83c58", + "type": "set", + "name": "set pbs", + "xml": "<set>\n<parameter name='prop.sotn.pbs' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2084.8646545410156, + "y": 338.49241638183594, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "fe52bad5.770908", + "type": "switchNode", + "name": "switch color-aware", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'color-aware'`\">\n", + "comments": "", + "outputs": 1, + "x": 1746.5312118530273, + "y": 391.0312671661377, + "z": "f3682574.cde048", + "wires": [ + [ + "bccb8e92.0b5c7" + ] + ] + }, + { + "id": "bccb8e92.0b5c7", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1924.5312156677246, + "y": 385.03125953674316, + "z": "f3682574.cde048", + "wires": [ + [ + "e228c0d1.eaf54" + ] + ] + }, + { + "id": "e228c0d1.eaf54", + "type": "set", + "name": "set colorAware", + "xml": "<set>\n<parameter name='prop.sotn.colorAware' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2105.8645935058594, + "y": 384.49241828918457, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "b3759567.fa1fc8", + "type": "switchNode", + "name": "switch coupling-flag", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'coupling-flag'`\">\n", + "comments": "", + "outputs": 1, + "x": 1746.5312194824219, + "y": 437.0312919616699, + "z": "f3682574.cde048", + "wires": [ + [ + "a4cdcb3.5f83638" + ] + ] + }, + { + "id": "a4cdcb3.5f83638", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1924.5312118530273, + "y": 429.0312604904175, + "z": "f3682574.cde048", + "wires": [ + [ + "6e47434b.16603c" + ] + ] + }, + { + "id": "6e47434b.16603c", + "type": "set", + "name": "set couplingFlag", + "xml": "<set>\n<parameter name='prop.sotn.couplingFlag' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2109.8645935058594, + "y": 429.4924430847168, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "a9128726.ee25b8", + "type": "switchNode", + "name": "switch cVLAN", + "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'cVLAN'`\">\n", + "comments": "", + "outputs": 1, + "x": 1737.5311584472656, + "y": 702.0312995910645, + "z": "f3682574.cde048", + "wires": [ + [ + "1ad6eb3c.320b35" + ] + ] + }, + { + "id": "1ad6eb3c.320b35", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1942.5311279296875, + "y": 703.03125, + "z": "f3682574.cde048", + "wires": [ + [ + "9dd46589.0d0a48" + ] + ] + }, + { + "id": "9dd46589.0d0a48", + "type": "set", + "name": "set cVLAN", + "xml": "<set>\n<parameter name='prop.sotn.cVLAN' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 2096.197967529297, + "y": 702.0417213439941, + "z": "f3682574.cde048", + "wires": [ + + ] + }, + { + "id": "b152e598.bced08", + "type": "comment", + "name": "TODO: Recheck AAI schemas", + "info": "", + "comments": "", + "x": 791.0312805175781, + "y": 33.03132629394531, + "z": "f3682574.cde048", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-deactivate.json new file mode 100644 index 00000000..4751238e --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-deactivate.json @@ -0,0 +1,203 @@ +[ + { + "id": "e417c255.55168", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 97, + "y": 58.666653633117676, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + "7ab6ef86.3029d" + ] + ] + }, + { + "id": "7ab6ef86.3029d", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT", + "module": "GENERIC-RESOURCE-API", + "version": "1.2.1-SNAPSHOT", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>", + "outputs": 1, + "x": 253.00000381469727, + "y": 149.66667556762695, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + "2feb52d2.f795ee" + ] + ] + }, + { + "id": "2feb52d2.f795ee", + "type": "method", + "name": "method sotn-network-topology-operation-deactivate", + "xml": "<method rpc='sotn-network-topology-operation-deactivate' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 241.0001220703125, + "y": 237.66665840148926, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + "3f213c21.d34564" + ] + ] + }, + { + "id": "3f213c21.d34564", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 464.0000762939453, + "y": 309.6667318344116, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + "9aa8fa45.2b1e08", + "f32a24c6.dffed8", + "27480d76.5a34a2", + "ca91a3af.46939", + "616e31bd.918fb", + "5b600577.38704c", + "37e02aa8.77f506", + "ef74970a.886bc8" + ] + ] + }, + { + "id": "9aa8fa45.2b1e08", + "type": "call", + "name": "call GENERIC-RESOURCE-API:validate-sotn-network-input-parameters", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sotn-network-input-parameters' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 895.6111450195312, + "y": 57.99999713897705, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + + ] + ] + }, + { + "id": "f32a24c6.dffed8", + "type": "record", + "name": "record", + "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sotn-network-topology-operation-activate\"/>\n<parameter name=\"field3\" value=\"SOTN-Deactivate\"/>\n", + "comments": "", + "outputs": 1, + "x": 700.03125, + "y": 101.03125, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + + ] + ] + }, + { + "id": "616e31bd.918fb", + "type": "set", + "name": "set networkId and network-object-path", + "xml": "<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name=\"network-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id + '/network-data/'` \" />", + "comments": "", + "x": 791.0312995910645, + "y": 289.5666913986206, + "z": "a60e1b2.0e00ee8", + "wires": [ + + ] + }, + { + "id": "ef74970a.886bc8", + "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": 712.8091011047363, + "y": 479.1221113204956, + "z": "a60e1b2.0e00ee8", + "wires": [ + + ] + }, + { + "id": "5b600577.38704c", + "type": "set", + "name": "set network-level-oper-status", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />", + "comments": "", + "x": 757.9202156066895, + "y": 350.7888660430908, + "z": "a60e1b2.0e00ee8", + "wires": [ + + ] + }, + { + "id": "27480d76.5a34a2", + "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": 732.3333549499512, + "y": 154.03128623962402, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + + ] + ] + }, + { + "id": "37e02aa8.77f506", + "type": "update", + "name": "update SOTN Connectivity status to AAI", + "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='configuration' \n key='configuration.configuration-id = $network-topology-operation-input.network-information.network-id' >\n<parameter name='configuration-id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='operational-status' value='PendingDelete' />", + "comments": "", + "outputs": 1, + "x": 792.1387977600098, + "y": 410.49205493927, + "z": "a60e1b2.0e00ee8", + "wires": [ + [ + + ] + ] + }, + { + "id": "ca91a3af.46939", + "type": "set", + "name": "set network in service-data", + "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />", + "comments": "", + "x": 754.475772857666, + "y": 221.34445095062256, + "z": "a60e1b2.0e00ee8", + "wires": [ + + ] + }, + { + "id": "80bfe5ee.a7ea98", + "type": "comment", + "name": "TODO MP2MP", + "info": "Current implementation is for P2P connectivity\nFor MP2MP connectivity in future DG needs to be modified", + "comments": "", + "x": 979.5069007873535, + "y": 144.28467750549316, + "z": "a60e1b2.0e00ee8", + "wires": [ + + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.json new file mode 100644 index 00000000..8b953708 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.json @@ -0,0 +1,173 @@ +[ + { + "id": "6fceaf50.2ca8a", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 97.03125762939453, + "y": 60.531246185302734, + "z": "4279d5d.f45972c", + "wires": [ + [ + "cff1a431.d9d948" + ] + ] + }, + { + "id": "cff1a431.d9d948", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT", + "module": "GENERIC-RESOURCE-API", + "version": "1.2.1-SNAPSHOT", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>", + "outputs": 1, + "x": 309.0312614440918, + "y": 132.53126335144043, + "z": "4279d5d.f45972c", + "wires": [ + [ + "f4a2f725.1d7778" + ] + ] + }, + { + "id": "f4a2f725.1d7778", + "type": "method", + "name": "method sotn-network-topology-operation-delete", + "xml": "<method rpc='sotn-network-topology-operation-delete' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 297.03137969970703, + "y": 220.53124618530273, + "z": "4279d5d.f45972c", + "wires": [ + [ + "977562d1.fa7af" + ] + ] + }, + { + "id": "977562d1.fa7af", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 467.47571182250977, + "y": 282.9757022857666, + "z": "4279d5d.f45972c", + "wires": [ + [ + "6af1abf.a866354", + "18eeced4.574d91", + "406c5f6.7e479a", + "10a58dd4.391ce2", + "60c54ca0.bb3fb4", + "47c1a26c.4cd8ec", + "a482b966.7af068" + ] + ] + }, + { + "id": "6af1abf.a866354", + "type": "call", + "name": "call GENERIC-RESOURCE-API:validate-sotn-network-input-parameters", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sotn-network-input-parameters' mode='sync' >\n", + "comments": "", + "outputs": 1, + "x": 929.4201583862305, + "y": 77.53124618530273, + "z": "4279d5d.f45972c", + "wires": [ + [ + + ] + ] + }, + { + "id": "18eeced4.574d91", + "type": "record", + "name": "record", + "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sotn-network-topology-operation-delete\"/>\n<parameter name=\"field3\" value=\"SOTN-Delete\"/>\n", + "comments": "", + "outputs": 1, + "x": 742.8089828491211, + "y": 143.8646183013916, + "z": "4279d5d.f45972c", + "wires": [ + [ + + ] + ] + }, + { + "id": "406c5f6.7e479a", + "type": "set", + "name": "set networkId and network-object-path", + "xml": "<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />", + "comments": "", + "x": 827.4756660461426, + "y": 391.9555377960205, + "z": "4279d5d.f45972c", + "wires": [ + + ] + }, + { + "id": "10a58dd4.391ce2", + "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": 756.5869140625, + "y": 455.5109257698059, + "z": "4279d5d.f45972c", + "wires": [ + + ] + }, + { + "id": "47c1a26c.4cd8ec", + "type": "set", + "name": "set new network length", + "xml": "<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\n\t\n", + "comments": "", + "x": 786.1083374023438, + "y": 269.42644786834717, + "z": "4279d5d.f45972c", + "wires": [ + + ] + }, + { + "id": "60c54ca0.bb3fb4", + "type": "set", + "name": "Remove networks from ServiceData", + "xml": "<set>\n\t<parameter name=\"service-data.networks.network[$nidx].\" value=\"\"/>\n\n", + "comments": "", + "x": 826.732494354248, + "y": 317.394389629364, + "z": "4279d5d.f45972c", + "wires": [ + + ] + }, + { + "id": "a482b966.7af068", + "type": "delete", + "name": "delete SOTN VPNInstance configuration in AAI", + "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='configuration' \n key='configuration.configuration-id = $network-topology-operation-input.network-information.network-id'>\n", + "comments": "", + "outputs": 1, + "x": 864.6638374328613, + "y": 210.53753185272217, + "z": "4279d5d.f45972c", + "wires": [ + [ + + ] + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.json new file mode 100644 index 00000000..7ba8a8fa --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.json @@ -0,0 +1,1227 @@ +[ + { + "id": "f341527b.50b3", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 100.03125, + "y": 50.3333295583725, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "73a43f3f.5366a" + ] + ] + }, + { + "id": "73a43f3f.5366a", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT", + "module": "GENERIC-RESOURCE-API", + "version": "1.2.1-SNAPSHOT", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>", + "outputs": 1, + "x": 345.3169631958008, + "y": 49.57140862941742, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "51c30458.248f6c" + ] + ] + }, + { + "id": "51c30458.248f6c", + "type": "method", + "name": "validate-sotn-network-input-parameters", + "xml": "<method rpc='validate-sotn-network-input-parameters' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 302.94793701171875, + "y": 124.5863469839096, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "2614ca2e.5555e6" + ] + ] + }, + { + "id": "2614ca2e.5555e6", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 586.9479446411133, + "y": 112.58637177944183, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "7d98662d.87c938", + "db93dd27.961fc" + ] + ] + }, + { + "id": "7d98662d.87c938", + "type": "switchNode", + "name": "switch svc-action", + "xml": "<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n", + "comments": "", + "outputs": 1, + "x": 867.9479446411133, + "y": 107.58635747432709, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "ed1074da.968838" + ] + ] + }, + { + "id": "ed1074da.968838", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 1058.6622467041016, + "y": 108.5863584280014, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "1f50e65c.41f41a" + ] + ] + }, + { + "id": "1f50e65c.41f41a", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n", + "comments": "", + "x": 1233.0907974243164, + "y": 107.58635079860687, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "db93dd27.961fc", + "type": "switchNode", + "name": "switch svc-action", + "xml": "<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n", + "comments": "", + "outputs": 1, + "x": 168.94789123535156, + "y": 383.58637177944183, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "b3bdbe0b.cad91", + "26d5914b.21d37e", + "3f8d5428.3f490c", + "2e6ac3e2.42bc2c", + "8ba722c1.4dbdb" + ] + ] + }, + { + "id": "b3bdbe0b.cad91", + "type": "outcome", + "name": "create", + "xml": "<outcome value='create'>\n", + "comments": "", + "outputs": 1, + "x": 377.53126525878906, + "y": 212.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "898ae9b8.952238" + ] + ] + }, + { + "id": "898ae9b8.952238", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 538.5312652587891, + "y": 212.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "29c233ae.14280c" + ] + ] + }, + { + "id": "26d5914b.21d37e", + "type": "outcome", + "name": "deactivate", + "xml": "<outcome value='deactivate'>\n", + "comments": "", + "outputs": 1, + "x": 350.52325439453125, + "y": 821.7618678808212, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "5f3074f8.76c69c" + ] + ] + }, + { + "id": "3f8d5428.3f490c", + "type": "outcome", + "name": "delete", + "xml": "<outcome value='delete'>\n", + "comments": "", + "outputs": 1, + "x": 354.2376365661621, + "y": 992.4764255285263, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "b3fb014d.8c7af" + ] + ] + }, + { + "id": "2e6ac3e2.42bc2c", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 353.99952697753906, + "y": 1165.9047111272812, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "bc54858d.9ca818" + ] + ] + }, + { + "id": "bc54858d.9ca818", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n", + "comments": "", + "x": 537.5710601806641, + "y": 1166.5238517522812, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "29c233ae.14280c", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$network-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 762.0312652587891, + "y": 212.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "45f9882d.888fa8", + "c9fe1e81.e4448" + ] + ] + }, + { + "id": "45f9882d.888fa8", + "type": "other", + "name": "Other", + "xml": "<outcome value='Other'>", + "comments": "", + "outputs": 1, + "x": 937.5312652587891, + "y": 232.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "a900b306.d7c45" + ] + ] + }, + { + "id": "a900b306.d7c45", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be SOTN CreateVPNNetworkInstance for svc-action=create\" />\n", + "comments": "", + "x": 1075.031265258789, + "y": 232.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "6b8a3092.36d36", + "type": "other", + "name": "DeleteSOTNConnectivityIntance", + "xml": "<outcome value='DeleteSOTNConnectivityIntance'>", + "comments": "", + "outputs": 1, + "x": 776.0946769714355, + "y": 993.0316957235336, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "77908b22.05afb4" + ] + ] + }, + { + "id": "8144887f.4926d8", + "type": "other", + "name": "Other", + "xml": "<outcome value='Other'>", + "comments": "", + "outputs": 1, + "x": 711.6502227783203, + "y": 1065.2539647817612, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "8b6a3319.1c2db" + ] + ] + }, + { + "id": "8b6a3319.1c2db", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be SOTN DeleteVPNNetworkInstance for svc-action=delete\" />\n", + "comments": "", + "x": 871.983642578125, + "y": 1067.365102171898, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "77908b22.05afb4", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1019.9835510253906, + "y": 995.2539476156235, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "174db933.229107", + "c5c30480.3e58d8", + "57a9e8ca.5b6ba8", + "5d3a1919.83ff78" + ] + ] + }, + { + "id": "8ba722c1.4dbdb", + "type": "outcome", + "name": "activate", + "xml": "<outcome value='activate'>\n", + "comments": "", + "outputs": 1, + "x": 371.4598197937012, + "y": 476.04764211177826, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "c50ae05a.b3f78" + ] + ] + }, + { + "id": "c50ae05a.b3f78", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$network-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 554.3169860839844, + "y": 473.19049203395844, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "3a3dfff9.f5159", + "e69e7919.c1d848" + ] + ] + }, + { + "id": "3a3dfff9.f5159", + "type": "other", + "name": "ActivateSOTNConnectivityIntance", + "xml": "<outcome value='ActivateSOTNConnectivityIntance'>", + "comments": "", + "outputs": 1, + "x": 807.5312652587891, + "y": 452.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "c446e4e6.e8ac48" + ] + ] + }, + { + "id": "e69e7919.c1d848", + "type": "other", + "name": "Other", + "xml": "<outcome value='Other'>", + "comments": "", + "outputs": 1, + "x": 737.5312652587891, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "f911f3da.ef74b" + ] + ] + }, + { + "id": "f911f3da.ef74b", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be SOTN ActivateVPNNetworkInstance for svc-action=activate\" />\n", + "comments": "", + "x": 895.0312652587891, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "c446e4e6.e8ac48", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1038.531265258789, + "y": 452.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "57a9e8ca.5b6ba8", + "174db933.229107", + "c5c30480.3e58d8", + "ca8482b0.138b7" + ] + ] + }, + { + "id": "d4ecf814.c6a798", + "type": "other", + "name": "DeactivateSOTNConnectivityIntance", + "xml": "<outcome value='DeactivateSOTNConnectivityIntance'>", + "comments": "", + "outputs": 1, + "x": 793.9518814086914, + "y": 823.4762614965439, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "3dd1f9de.bc71e6" + ] + ] + }, + { + "id": "5b749a1a.8a0654", + "type": "other", + "name": "Other", + "xml": "<outcome value='Other'>", + "comments": "", + "outputs": 1, + "x": 708.9518737792969, + "y": 892.4762691259384, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "47507d7d.fc2bb4" + ] + ] + }, + { + "id": "47507d7d.fc2bb4", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be SOTN DeactivateVPNNetworkInstance for svc-action=deactivate\" />\n", + "comments": "", + "x": 889.9518890380859, + "y": 893.4762691259384, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "5f3074f8.76c69c", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$network-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 530.8089370727539, + "y": 823.9520953893661, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "d4ecf814.c6a798", + "5b749a1a.8a0654" + ] + ] + }, + { + "id": "b3fb014d.8c7af", + "type": "switchNode", + "name": "switch request-action", + "xml": "<switch test='`$network-topology-operation-input.request-information.request-action`'>\n", + "comments": "", + "outputs": 1, + "x": 534.5867385864258, + "y": 992.2856494188309, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "6b8a3092.36d36", + "8144887f.4926d8" + ] + ] + }, + { + "id": "3dd1f9de.bc71e6", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1053.9200286865234, + "y": 826.2856563329697, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "174db933.229107", + "c5c30480.3e58d8", + "57a9e8ca.5b6ba8", + "dee8bd53.56b7b" + ] + ] + }, + { + "id": "c9fe1e81.e4448", + "type": "other", + "name": "CreateSOTNConnectivityIntance", + "xml": "<outcome value='CreateSOTNConnectivityIntance'>", + "comments": "", + "outputs": 1, + "x": 1003.5312652587891, + "y": 192.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "f41339c3.f110b8" + ] + ] + }, + { + "id": "f41339c3.f110b8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1218.531265258789, + "y": 192.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "78324d1c.b05904" + ] + ] + }, + { + "id": "78324d1c.b05904", + "type": "for", + "name": "for loop i - Network input parameters", + "xml": "<for index=\"i\" start=\"0\" end=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">\n", + "comments": "", + "outputs": 1, + "x": 1469.031265258789, + "y": 192.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "6af6c64a.163a28" + ] + ] + }, + { + "id": "6af6c64a.163a28", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1697.531265258789, + "y": 192.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "9cb7bf55.5070b", + "46cd63b4.17fedc", + "8ab4804d.8981" + ] + ] + }, + { + "id": "9cb7bf55.5070b", + "type": "set", + "name": "clear tmp-data", + "xml": "<set>\n<parameter name='tmp.name' value='' />\n<parameter name='tmp.value' value='' />\n", + "comments": "", + "x": 1880.531265258789, + "y": 152.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "46cd63b4.17fedc", + "type": "set", + "name": "set tmp-data", + "xml": "<set>\n<parameter name='tmp.name' value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$i].name`\"/>\n<parameter name='tmp.value' value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$i].value`\"/>\n", + "comments": "", + "x": 1875.031265258789, + "y": 192.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "8ab4804d.8981", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$tmp.name`\">\n", + "comments": "", + "outputs": 1, + "x": 1875.031265258789, + "y": 232.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "9592d9e2.7991f8", + "97143bfc.87f758", + "d423ac2f.9c51f" + ] + ] + }, + { + "id": "7c1a345e.318e8c", + "type": "switchNode", + "name": "switch value", + "xml": "<switch test=\"`$tmp.value`\">\n", + "comments": "", + "outputs": 1, + "x": 2335.0314331054688, + "y": 185.00002002716064, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "71892760.797d58" + ] + ] + }, + { + "id": "d423ac2f.9c51f", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 2094.5316009521484, + "y": 251.00000762939453, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "f8a3cfb8.ff88b" + ] + ] + }, + { + "id": "f8a3cfb8.ff88b", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'network-topology-operation-input.network-request-input.network-input-parameters.param[' + $i + ']' + '.name is a required input'`\" />\n", + "comments": "", + "x": 2269.5316047668457, + "y": 250.00000762939453, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "9592d9e2.7991f8", + "type": "other", + "name": "name", + "xml": "<outcome value='name'>", + "comments": "", + "outputs": 1, + "x": 2094.5316009521484, + "y": 135.00000190734863, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "7c1a345e.318e8c" + ] + ] + }, + { + "id": "97143bfc.87f758", + "type": "other", + "name": "description", + "xml": "<outcome value='description'>", + "comments": "", + "outputs": 1, + "x": 2106.5313568115234, + "y": 188.66666412353516, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "7c1a345e.318e8c" + ] + ] + }, + { + "id": "71892760.797d58", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 2478.5314331054688, + "y": 185.00002002716064, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "51159df7.8f7f34" + ] + ] + }, + { + "id": "51159df7.8f7f34", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'`\" />\n", + "comments": "", + "x": 2636.5314331054688, + "y": 185.00002002716064, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "57a9e8ca.5b6ba8", + "type": "switchNode", + "name": "switch service-data.networks.network_length", + "xml": "<switch test='`$service-data.networks.network_length`'>\n", + "comments": "", + "outputs": 1, + "x": 1343.4201278686523, + "y": 496.3333123922348, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "c975a187.53f03", + "c343c1d6.32b89" + ] + ] + }, + { + "id": "c975a187.53f03", + "type": "other", + "name": "outcome Null", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 1597.031265258789, + "y": 472.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "7bf63be7.236304" + ] + ] + }, + { + "id": "7bf63be7.236304", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n", + "comments": "", + "x": 1775.031265258789, + "y": 472.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "c343c1d6.32b89", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1577.531265258789, + "y": 512.9999994039536, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "8b3c7b72.8416d8" + ] + ] + }, + { + "id": "8b3c7b72.8416d8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1738.531265258789, + "y": 512.9999994039536, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "ea8be443.435208", + "f4cb0140.f19dc" + ] + ] + }, + { + "id": "ea8be443.435208", + "type": "for", + "name": "for nidx..service-data.networks.network[]", + "xml": "<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n", + "comments": "", + "outputs": 1, + "x": 2001.031265258789, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "1c69986e.121d38" + ] + ] + }, + { + "id": "1c69986e.121d38", + "type": "switchNode", + "name": "switch networkid found", + "xml": "<switch test=\"`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`\">\n\n", + "comments": "", + "outputs": 1, + "x": 2287.031265258789, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "835d02de.19c93" + ] + ] + }, + { + "id": "835d02de.19c93", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 2457.531265258789, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "a4620b88.fbb918" + ] + ] + }, + { + "id": "a4620b88.fbb918", + "type": "set", + "name": "set tmp.nidx and ctx.network-data", + "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].network-data.`' />\n", + "comments": "", + "x": 2680.531265258789, + "y": 492.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "2c706feb.2be3b", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n", + "comments": "", + "x": 2215.031265258789, + "y": 532.9999994039536, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "c1c7826b.646b7", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>\n", + "comments": "", + "outputs": 1, + "x": 2077.531265258789, + "y": 532.9999994039536, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "2c706feb.2be3b" + ] + ] + }, + { + "id": "f4cb0140.f19dc", + "type": "switchNode", + "name": "switch tmp.nidx ", + "xml": "<switch test=\"`$tmp.nidx`\">\n\n", + "comments": "", + "outputs": 1, + "x": 1923.531265258789, + "y": 532.9999994039536, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "c1c7826b.646b7" + ] + ] + }, + { + "id": "ca8482b0.138b7", + "type": "switchNode", + "name": "switch network-level-oper-status", + "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n", + "comments": "", + "outputs": 1, + "x": 1302.6979522705078, + "y": 571.8888772726059, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "ac1c944.a70cf68", + "64f9182f.832d98" + ] + ] + }, + { + "id": "ac1c944.a70cf68", + "type": "outcome", + "name": "outcome Created", + "xml": "<outcome value='Created'>\n", + "comments": "", + "outputs": 1, + "x": 1599.5313682556152, + "y": 571.8888753652573, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "dd869d4d.7e624" + ] + ] + }, + { + "id": "64f9182f.832d98", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1567.5313682556152, + "y": 611.8888753652573, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "52f7cab.128ad34" + ] + ] + }, + { + "id": "52f7cab.128ad34", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />", + "comments": "", + "x": 1725.0313682556152, + "y": 611.8888753652573, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "c5c30480.3e58d8", + "type": "switchNode", + "name": "switch network-id", + "xml": "<switch test=\"`$network-topology-operation-input.network-information.network-id`\">\n", + "comments": "", + "outputs": 1, + "x": 1249.531265258789, + "y": 432.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "edcc0678.bb4db8" + ] + ] + }, + { + "id": "edcc0678.bb4db8", + "type": "outcome", + "name": "NULL", + "xml": "<outcome value=''>", + "comments": "", + "outputs": 1, + "x": 1477.531265258789, + "y": 432.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "df1eaa9a.c904b8" + ] + ] + }, + { + "id": "df1eaa9a.c904b8", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-request-input.network-input-parameters.name is a required input\" />\n", + "comments": "", + "x": 1615.031265258789, + "y": 432.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "174db933.229107", + "type": "execute", + "name": "execute requiredParameters", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"network-topology-operation-input.network-information.network-id\" value=\"$network-topology-operation-input.network-information.network-id\"/>\n\n", + "comments": "", + "outputs": 1, + "x": 1284.031265258789, + "y": 392.99999940395355, + "z": "612a8bcd.555ff4", + "wires": [ + [ + + ] + ] + }, + { + "id": "dee8bd53.56b7b", + "type": "switchNode", + "name": "switch network-level-oper-status", + "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n", + "comments": "", + "outputs": 1, + "x": 1330.864517211914, + "y": 821.8888543844223, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "5a840e5a.dfcfb", + "1e04803d.2175e" + ] + ] + }, + { + "id": "5a840e5a.dfcfb", + "type": "outcome", + "name": "outcome Active", + "xml": "<outcome value='Active'>\n", + "comments": "", + "outputs": 1, + "x": 1604.1978912353516, + "y": 796.3333123922348, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "1bb2b0bd.7522ff" + ] + ] + }, + { + "id": "1e04803d.2175e", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1574.1978912353516, + "y": 836.3333123922348, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "f180da96.e20aa8" + ] + ] + }, + { + "id": "f180da96.e20aa8", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />", + "comments": "", + "x": 1740.1978912353516, + "y": 838.3333123922348, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "5d3a1919.83ff78", + "type": "switchNode", + "name": "switch network-level-oper-status", + "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n", + "comments": "", + "outputs": 1, + "x": 1319.753433227539, + "y": 992.9999383687973, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "c0abb2c6.46f4e", + "d275091d.1d6858" + ] + ] + }, + { + "id": "c0abb2c6.46f4e", + "type": "outcome", + "name": "outcome PendingDelete", + "xml": "<outcome value='PendingDelete'>\n", + "comments": "", + "outputs": 1, + "x": 1619.7534942626953, + "y": 960.7777341604233, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "77485a8b.427a64" + ] + ] + }, + { + "id": "d275091d.1d6858", + "type": "other", + "name": "other", + "xml": "<outcome value='Other'>\n", + "comments": "", + "outputs": 1, + "x": 1563.0868072509766, + "y": 1007.4443963766098, + "z": "612a8bcd.555ff4", + "wires": [ + [ + "1df75e1e.6ce5d2" + ] + ] + }, + { + "id": "1df75e1e.6ce5d2", + "type": "returnFailure", + "name": "return failure", + "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Network is not in appropriate state for delete. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />", + "comments": "", + "x": 1729.0868072509766, + "y": 1009.4443963766098, + "z": "612a8bcd.555ff4", + "wires": [ + + ] + }, + { + "id": "dd869d4d.7e624", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1787.5312461853027, + "y": 572.9999593496323, + "z": "612a8bcd.555ff4", + "wires": [ + [ + + ] + ] + }, + { + "id": "1bb2b0bd.7522ff", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1804.197769165039, + "y": 794.4814447164536, + "z": "612a8bcd.555ff4", + "wires": [ + [ + + ] + ] + }, + { + "id": "77485a8b.427a64", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1835.3089752197266, + "y": 961.148070693016, + "z": "612a8bcd.555ff4", + "wires": [ + [ + + ] + ] + } +] diff --git a/platform-logic/generic-resource-api/src/main/resources/graph.versions b/platform-logic/generic-resource-api/src/main/resources/graph.versions index c5d3c594..73e4f7c1 100644 --- a/platform-logic/generic-resource-api/src/main/resources/graph.versions +++ b/platform-logic/generic-resource-api/src/main/resources/graph.versions @@ -76,3 +76,8 @@ GENERIC-RESOURCE-API vnf-topology-operation-unassign ${project.version} sync GENERIC-RESOURCE-API vnf-topology-operation ${project.version} sync SUBNET-API managed-network-notification ${project.version} sync SUBNET-API subnet-allocated-notification ${project.version} sync +GENERIC-RESOURCE-API sotn-network-topology-operation-create ${project.version} sync +GENERIC-RESOURCE-API sotn-network-topology-operation-delete ${project.version} sync +GENERIC-RESOURCE-API sotn-network-topology-operation-activate ${project.version} sync +GENERIC-RESOURCE-API sotn-network-topology-operation-deactivate ${project.version} sync +GENERIC-RESOURCE-API validate-sotn-network-input-parameters ${project.version} sync
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.xml new file mode 100644 index 00000000..5a7aa88d --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-activate.xml @@ -0,0 +1,41 @@ +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="1.2.1-SNAPSHOT">
+ <method rpc="sotn-network-topology-operation-activate" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-sotn-network-input-parameters" mode="sync" />
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="sotn-network-topology-operation-activate" />
+ <parameter name="field3" value="SOTN-Activate" />
+ </record>
+ <execute plugin="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" method="readProperties">
+ <parameter name="fileName" value="%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties" />
+ <parameter name="contextPrefix" value="prop" />
+ </execute>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.service-information." value="`$network-topology-operation-input.service-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-information." value="`$network-topology-operation-input.network-information.`" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id + '/network-data/'` " />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status" value="Active" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $network-topology-operation-input.network-information.network-id">
+ <parameter name="configuration-id" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="operational-status" value="Active" />
+ </update>
+ <return status="success">
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml new file mode 100644 index 00000000..e5d9268c --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="1.2.1-SNAPSHOT">
+ <method rpc="sotn-network-topology-operation-create" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-sotn-network-input-parameters" mode="sync" />
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="prop.sotn.network-id" />
+ </execute>
+ <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.etht-svc-name" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'description'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.etht-svc-descr" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'tenantId'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.tenantId" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'vpnType'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.vpnType" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'CIR'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.cir" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'EIR'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.eir" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'CBS'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.cbs" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'PBS'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.pbs" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'color-aware'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.colorAware" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'coupling-flag'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.couplingFlag" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-provider-id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.access-provider-id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-client-id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.access-client-id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-topology-id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.access-topology-id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-node-id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.access-node-id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-ltp-id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.access-ltp-id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'cVLAN'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.sotn.cVLAN" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <set>
+ <parameter name="nidx" value="0" />
+ </set>
+ </outcome>
+ <outcome value="Other">
+ <block>
+ <set>
+ <parameter name="nidx" value="`$service-data.networks.network_length`" />
+ </set>
+ <for index="idx" start="0" end="`$nidx`">
+ <switch test="`$service-data.networks.network[$idx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id already found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="sotn-network-topology-operation-create" />
+ <parameter name="field3" value="SOTN-Config" />
+ </record>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-id" value="`$prop.sotn.network-id`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.service-information." value="`$network-topology-operation-input.service-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-information." value="`$network-topology-operation-input.network-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-request-input." value="`$network-topology-operation-input.network-request-input.`" />
+ <parameter name="service-data.networks.network_length" value="`$nidx+1`" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$prop.sotn.network-id`" />
+ <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status" value="Created" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $prop.sotn.network-id">
+ <parameter name="configuration-id" value="`$prop.sotn.network-id`" />
+ <parameter name="configuration-name" value="`$prop.sotn.client-svc-name`" />
+ <parameter name="configuration-type" value="`$prop.sotn.client-svc-descr`" />
+ <parameter name="configuration-sub-type" value="`$prop.sotn.tenantId`" />
+ <parameter name="orchestration-status" value="`$prop.sotn.vpnType`" />
+ <parameter name="management-option" value="`$prop.sotn.cir`" />
+ <parameter name="operational-status" value="Created" />
+ <parameter name="model-customization-id" value="`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`" />
+ <parameter name="model-invariant-id" value="`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id" value="`$network-topology-operation-input.network-information.onap-model-information.model-uuid`" />
+ <parameter name="configuration-selflink" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-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.networks.network[$nidx].network-data.service-information.global-customer-id AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="configuration" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/configurations/configuration/' + $prop.sotn.network-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="configuration.configuration-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />
+ </save>
+ <set>
+ <parameter name="unique-src-ltpId" value="`'nodeId-' + $prop.sotn.src-access-node-id + '-ltpId-' + $prop.sotn.src-access-ltp-id`" />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration:relationship-list" key="configuration.configuration-id = $prop.sotn.network-id" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="logical-link" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/logical-links/logical-link/' + $unique-src-ltpId`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="logical-link.link-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-src-ltpId`" />
+ </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_sotn-network-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-deactivate.xml new file mode 100644 index 00000000..33c69ce9 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-deactivate.xml @@ -0,0 +1,41 @@ +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="1.2.1-SNAPSHOT">
+ <method rpc="sotn-network-topology-operation-deactivate" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-sotn-network-input-parameters" mode="sync" />
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="sotn-network-topology-operation-activate" />
+ <parameter name="field3" value="SOTN-Deactivate" />
+ </record>
+ <execute plugin="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" method="readProperties">
+ <parameter name="fileName" value="%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties" />
+ <parameter name="contextPrefix" value="prop" />
+ </execute>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.service-information." value="`$network-topology-operation-input.service-information.`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-information." value="`$network-topology-operation-input.network-information.`" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id + '/network-data/'` " />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status" value="PendingDelete" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $network-topology-operation-input.network-information.network-id">
+ <parameter name="configuration-id" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="operational-status" value="PendingDelete" />
+ </update>
+ <return status="success">
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.xml new file mode 100644 index 00000000..b9ad46c5 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-network-topology-operation-delete.xml @@ -0,0 +1,29 @@ +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="1.2.1-SNAPSHOT">
+ <method rpc="sotn-network-topology-operation-delete" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-sotn-network-input-parameters" mode="sync" />
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="sotn-network-topology-operation-delete" />
+ <parameter name="field3" value="SOTN-Delete" />
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $network-topology-operation-input.network-information.network-id" />
+ <set>
+ <parameter name="service-data.networks.network_length" value="`$service-data.networks.network_length - 1`" />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx]." value="" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="service-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/service-topology/'` " />
+ </set>
+ <return status="success">
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.xml new file mode 100644 index 00000000..7d4e5feb --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-sotn-network-input-parameters.xml @@ -0,0 +1,297 @@ +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="1.2.1-SNAPSHOT">
+ <method rpc="validate-sotn-network-input-parameters" mode="sync">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="create">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="CreateSOTNConnectivityIntance">
+ <block atomic="true">
+ <for index="i" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <set>
+ <parameter name="tmp.name" value="" />
+ <parameter name="tmp.value" value="" />
+ </set>
+ <set>
+ <parameter name="tmp.name" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$i].name`" />
+ <parameter name="tmp.value" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$i].value`" />
+ </set>
+ <switch test="`$tmp.name`">
+ <outcome value="name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'`" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="description">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'`" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-topology-operation-input.network-request-input.network-input-parameters.param[' + $i + ']' + '.name is a required input'`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </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="request-information.request-action is required to be SOTN CreateVPNNetworkInstance for svc-action=create" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="activate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="ActivateSOTNConnectivityIntance">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="requiredParameters">
+ <parameter name="network-topology-operation-input.network-information.network-id" value="$network-topology-operation-input.network-information.network-id" />
+ </execute>
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$service-data.networks.network_length`">
+ <switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.nidx" value="`$nidx`" />
+ <parameter name="ctx.network-data." value="`$service-data.networks.network[$nidx].network-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="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="Created">
+ <block atomic="true" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be SOTN ActivateVPNNetworkInstance for svc-action=activate" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="deactivate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeactivateSOTNConnectivityIntance">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="requiredParameters">
+ <parameter name="network-topology-operation-input.network-information.network-id" value="$network-topology-operation-input.network-information.network-id" />
+ </execute>
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$service-data.networks.network_length`">
+ <switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.nidx" value="`$nidx`" />
+ <parameter name="ctx.network-data." value="`$service-data.networks.network[$nidx].network-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="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="Active">
+ <block atomic="true" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be SOTN DeactivateVPNNetworkInstance for svc-action=deactivate" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="delete">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeleteSOTNConnectivityIntance">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="requiredParameters">
+ <parameter name="network-topology-operation-input.network-information.network-id" value="$network-topology-operation-input.network-information.network-id" />
+ </execute>
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$service-data.networks.network_length`">
+ <switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.nidx" value="`$nidx`" />
+ <parameter name="ctx.network-data." value="`$service-data.networks.network[$nidx].network-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="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="PendingDelete">
+ <block atomic="true" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for delete. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be SOTN DeleteVPNNetworkInstance for svc-action=delete" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
|