aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-04-19 00:23:45 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-19 00:23:45 +0000
commit69d2ea12a8d84f5bf52aabd27d409924c2ca85a0 (patch)
tree9d6b7bd6833819c2d3fcb8e14014bb38267bdc65 /platform-logic/generic-resource-api
parentd6eb58e69f24d6b621725b0b10d9353ad2909799 (diff)
parentc2f97b72a85356884d48195c7fcf20d779bce507 (diff)
Merge "SDWAN Device vf create not handled for invalid vnf id"
Former-commit-id: c22029820429abd26f334140f98e81d76ba5a87b
Diffstat (limited to 'platform-logic/generic-resource-api')
-rw-r--r--platform-logic/generic-resource-api/src/main/json/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.json723
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml140
2 files changed, 565 insertions, 298 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.json b/platform-logic/generic-resource-api/src/main/json/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.json
index f258de41..4760d35a 100644
--- a/platform-logic/generic-resource-api/src/main/json/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.json
+++ b/platform-logic/generic-resource-api/src/main/json/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.json
@@ -1,22 +1,22 @@
[
{
- "id": "5c12f35e.e1cabc",
+ "id": "ad9a9168.e57ff",
"type": "switchNode",
"name": "switch this vnf-id == input vnf-id",
"xml": "<switch test=\"`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`\"> \n",
"comments": "",
"outputs": 1,
- "x": 887.3294982910156,
- "y": 250.16278743743896,
- "z": "67d8f5f.109b30c",
+ "x": 956.03125,
+ "y": 159.13152408599854,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "fc9a82de.84ce"
+ "e7246404.3ab3d8"
]
]
},
{
- "id": "b009e5d5.1d5ff8",
+ "id": "6ad25904.845b18",
"type": "service-logic",
"name": "GENERIC-RESOURCE-API ${project.version}",
"module": "GENERIC-RESOURCE-API",
@@ -24,521 +24,722 @@
"comments": "",
"xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>",
"outputs": 1,
- "x": 177,
- "y": 143.99999141693115,
- "z": "67d8f5f.109b30c",
+ "x": 228.7017364501953,
+ "y": 186.96871662139893,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "9b496cef.08cf1"
+ "f16fce6c.5d5ba"
]
]
},
{
- "id": "9b496cef.08cf1",
+ "id": "f16fce6c.5d5ba",
"type": "method",
"name": "sdwan-vf-operation-device-create",
"xml": "<method rpc='sdwan-vf-operation-device-create' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 176,
- "y": 243.99999141693115,
- "z": "67d8f5f.109b30c",
+ "x": 227.7017364501953,
+ "y": 286.9687166213989,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "a4608885.5f82c8"
+ "c112bcf.84b4e4"
]
]
},
{
- "id": "7da866ae.544bb8",
+ "id": "1a36f303.fc1c1d",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 98.50000381469727,
- "y": 39,
- "z": "67d8f5f.109b30c",
+ "x": 114.20173835754395,
+ "y": 79.96872520446777,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "b009e5d5.1d5ff8"
+ "6ad25904.845b18"
]
]
},
{
- "id": "a4608885.5f82c8",
+ "id": "c112bcf.84b4e4",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 334.99998474121094,
- "y": 360,
- "z": "67d8f5f.109b30c",
+ "x": 386.70172119140625,
+ "y": 402.9687252044678,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "4e77e130.304fb",
- "802c77ca.22e778",
- "9922275a.527928",
- "e01d2f82.7429f",
- "a8f9e83.8a6e918",
- "c8a186f7.659098",
- "b9b958fd.141f08",
- "f27c9cac.ebc18",
- "35a34bb1.948374",
- "178a7bac.307b74",
- "7fbeb541.aa905c",
- "4845313f.7a00d",
- "e8cf2ce.61834d",
- "d9a88b51.5c3ff8"
+ "abed0b7b.e9c438",
+ "724392ca.bd7b5c",
+ "2b72757.931558a",
+ "a49a2243.bbcb2",
+ "c992605b.552a5",
+ "40876e67.4cc8d",
+ "86ee3fd8.45a8b",
+ "414cae1d.205f6",
+ "7ba39512.c516ac",
+ "3a2a0968.648d36",
+ "7024b9ac.3160d8",
+ "fdab20c0.e8295",
+ "d3c28e8a.2aecc",
+ "b7d7095a.45e048"
]
]
},
{
- "id": "4e77e130.304fb",
+ "id": "abed0b7b.e9c438",
"type": "for",
"name": "for each vnf",
"xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
"comments": "",
"outputs": 1,
- "x": 635.3294067382812,
- "y": 251.49612426757812,
- "z": "67d8f5f.109b30c",
+ "x": 704.0311584472656,
+ "y": 160.4648609161377,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "5c12f35e.e1cabc"
+ "ad9a9168.e57ff"
]
]
},
{
- "id": "ddad9e6f.97581",
+ "id": "4ed9f1d2.fc2b7",
"type": "set",
"name": "set vnf-index",
"xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
"comments": "",
- "x": 1258.9959869384766,
- "y": 252.1627902984619,
- "z": "67d8f5f.109b30c",
+ "x": 1327.697738647461,
+ "y": 161.13152694702148,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "fc9a82de.84ce",
+ "id": "e7246404.3ab3d8",
"type": "outcomeTrue",
"name": "true",
"xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
- "x": 1105.6628150939941,
- "y": 252.16276931762695,
- "z": "67d8f5f.109b30c",
+ "x": 1174.3645668029785,
+ "y": 161.13150596618652,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "ddad9e6f.97581"
+ "4ed9f1d2.fc2b7"
]
]
},
{
- "id": "e01d2f82.7429f",
+ "id": "2b72757.931558a",
"type": "for",
"name": "for loop idx - VF input parameters",
"xml": "<for index=\"idx\" start=\"0\" end=\"`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`\">\n\n",
"comments": "",
"outputs": 1,
- "x": 709.2501907348633,
- "y": 473.66665744781494,
- "z": "67d8f5f.109b30c",
+ "x": 784.9518966674805,
+ "y": 561.6354055404663,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "7ea0d8c4.d056e8"
+ "1cf539f3.af1b96"
]
]
},
{
- "id": "7ea0d8c4.d056e8",
+ "id": "1cf539f3.af1b96",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 924.0285339355469,
- "y": 471.22224140167236,
- "z": "67d8f5f.109b30c",
+ "x": 999.7302398681641,
+ "y": 559.1909894943237,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "c6b87ab0.44cce8",
- "f6199a92.b6bb08"
+ "1a9f780a.a03398",
+ "dcb3e18.352e72"
]
]
},
{
- "id": "c6b87ab0.44cce8",
+ "id": "1a9f780a.a03398",
"type": "execute",
"name": "execute split parameterName",
"xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
"comments": "",
"outputs": 1,
- "x": 1120.2847366333008,
- "y": 448.97037982940674,
- "z": "67d8f5f.109b30c",
+ "x": 1195.986442565918,
+ "y": 536.9391279220581,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[]
]
},
{
- "id": "f6199a92.b6bb08",
+ "id": "dcb3e18.352e72",
"type": "set",
"name": "set parameterName",
"xml": "<set>\n<parameter name=\"`vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n",
"comments": "",
- "x": 1089.7291641235352,
- "y": 485.97049617767334,
- "z": "67d8f5f.109b30c",
+ "x": 1165.4308700561523,
+ "y": 573.9392442703247,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "92e456fa.39e618",
- "type": "comment",
- "name": "Take the parameter names by removing prefix",
- "info": "",
- "comments": "",
- "x": 1093.2503929138184,
- "y": 408.3333258628845,
- "z": "67d8f5f.109b30c",
- "wires": []
- },
- {
- "id": "802c77ca.22e778",
+ "id": "724392ca.bd7b5c",
"type": "switchNode",
"name": "switch vnf_length",
"xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
"comments": "",
"outputs": 1,
- "x": 649.75,
- "y": 206.99999332427979,
- "z": "67d8f5f.109b30c",
+ "x": 718.4517517089844,
+ "y": 115.96872997283936,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "b9775757.c586e8"
+ "b66cc394.12346"
]
]
},
{
- "id": "b9775757.c586e8",
+ "id": "b66cc394.12346",
"type": "other",
"name": "NULL",
"xml": "<outcome value=''>\n",
"comments": "",
"outputs": 1,
- "x": 836.4166793823242,
- "y": 206.33329105377197,
- "z": "67d8f5f.109b30c",
+ "x": 905.1184310913086,
+ "y": 115.30202770233154,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "8ca0a76c.6a9638"
+ "c5ad3c03.3e718"
]
]
},
{
- "id": "8ca0a76c.6a9638",
+ "id": "c5ad3c03.3e718",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n",
"comments": "",
- "x": 1018.0833053588867,
- "y": 206.33329105377197,
- "z": "67d8f5f.109b30c",
+ "x": 1086.785057067871,
+ "y": 115.30202770233154,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "9922275a.527928",
- "type": "switchNode",
- "name": "switch vf-modules.vf-module_length",
- "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
+ "id": "40876e67.4cc8d",
+ "type": "set",
+ "name": "copy input data to service data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.vf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.sdnc-request-header.' value='`$vf-module-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.request-information.' value='`$vf-module-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.service-information.' value='`$vf-module-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vnf-information.' value='`$vf-module-topology-operation-input.vnf-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-information.' value='`$vf-module-topology-operation-input.vf-module-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />\n\n\n",
+ "comments": "",
+ "x": 769.5548782348633,
+ "y": 728.4649872779846,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "a49a2243.bbcb2",
+ "type": "set",
+ "name": "set vf-module-request-input.",
+ "xml": "<set>\n<parameter name='vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />\n",
+ "comments": "",
+ "x": 775.8880348205566,
+ "y": 624.1229696273804,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "c992605b.552a5",
+ "type": "call",
+ "name": "call sdwan-get-vf-module-device-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-vf-module-device-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 801.8884124755859,
+ "y": 680.1232032775879,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "86ee3fd8.45a8b",
+ "type": "set",
+ "name": "set vf-module-object-path",
+ "xml": "<set>\n<parameter name='vf-module-id' value='`$prop.vf-id`'/> \n<parameter name='vf-module-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $prop.vf-id\n + '/vf-module-data/vf-module-topology/'`\"/>\n<parameter name='vnf-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vnf-topology/'`\"/>\n<parameter name='service-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n",
+ "comments": "",
+ "x": 764.7017707824707,
+ "y": 778.9688324928284,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "414cae1d.205f6",
+ "type": "set",
+ "name": "set vf-module-level-oper-status",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-rpc-action' value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n",
+ "comments": "",
+ "x": 772.2018737792969,
+ "y": 826.9687967300415,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "c8a9b81e.4dea68",
+ "type": "save",
+ "name": "save sdwan vpn resource in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.device-id = $prop.vf-id' >\n<parameter name='device-id' value='`$prop.vf-id`' />\n<parameter name='esn' value='`$prop.device.esn`' />\n<parameter name='device-name' value='`$prop.device.name`' />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<!--parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' /-->\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vf-id + '/vf-module-data/'` \" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1206.701789855957,
+ "y": 852.4687442779541,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3a2a0968.648d36",
+ "type": "save",
+ "name": "save service relationship in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list' \n key='generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $prop.vf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.device-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vf-id`\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 775.7016677856445,
+ "y": 920.4687957763672,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7ba39512.c516ac",
+ "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": 724.4241981506348,
+ "y": 966.6426386833191,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "faa86376.49175",
+ "type": "execute",
+ "name": "execute generate-vf-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vf-id\"/>\n",
"comments": "",
"outputs": 1,
- "x": 690.9999895095825,
- "y": 326.9999942779541,
- "z": "67d8f5f.109b30c",
+ "x": 1251.8685150146484,
+ "y": 240.30206966400146,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "491e4f90.e2d44",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1004.8680419921875,
+ "y": 254.95347213745117,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "c5166da1.64b87",
- "f58b3753.891bc8"
+ "faa86376.49175",
+ "1889b968.9cafa7",
+ "c8eb51dd.8bc9f"
]
]
},
{
- "id": "c5166da1.64b87",
+ "id": "74ee118f.3bdb3",
+ "type": "set",
+ "name": "set prop.vf-id",
+ "xml": "<set>\n<parameter name='prop.vf-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n",
+ "comments": "",
+ "x": 1210.3999099731445,
+ "y": 457.985107421875,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "dfbd61c4.ba851",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1004.3995361328125,
+ "y": 410.9848394393921,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "74ee118f.3bdb3",
+ "1889b968.9cafa7",
+ "f58396e4.0282e8"
+ ]
+ ]
+ },
+ {
+ "id": "1889b968.9cafa7",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1239.8996353149414,
+ "y": 334.98486328125,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "ecce0898.ef26d8",
+ "e6c1d3e3.fb47b"
+ ]
+ ]
+ },
+ {
+ "id": "e28abe4b.99802",
"type": "other",
- "name": "Null",
+ "name": "NULL",
"xml": "<outcome value=''>\n",
"comments": "",
"outputs": 1,
- "x": 922,
- "y": 302.99999141693115,
- "z": "67d8f5f.109b30c",
+ "x": 1701.6139278411865,
+ "y": 254.12758922576904,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "4d85b0fa.e45f4"
+ "4d6a716f.84ac8"
]
]
},
{
- "id": "f58b3753.891bc8",
+ "id": "4d6a716f.84ac8",
+ "type": "set",
+ "name": "set vf-index=0",
+ "xml": "<set>\n<parameter name='vf-index' value='0' />\n",
+ "comments": "",
+ "x": 1849.8995761871338,
+ "y": 251.12764358520508,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "ad9a94b.6789668",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 922,
- "y": 342.99999141693115,
- "z": "67d8f5f.109b30c",
+ "x": 1705.0424251556396,
+ "y": 299.41338062286377,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "3cc5230a.5b2c3c"
+ "aa7a0bdb.e96638"
]
]
},
{
- "id": "4d85b0fa.e45f4",
+ "id": "aa7a0bdb.e96638",
"type": "set",
- "name": "set vf-index",
- "xml": "<set>\n<parameter name='vf-index' value='0' />\n",
+ "name": "set vf-index = vf_length",
+ "xml": "<set>\n<parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n",
"comments": "",
- "x": 1064.5,
- "y": 302.99999141693115,
- "z": "67d8f5f.109b30c",
+ "x": 1888.90016746521,
+ "y": 299.6991491317749,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "3cc5230a.5b2c3c",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
+ "id": "ecce0898.ef26d8",
+ "type": "set",
+ "name": "set new vF_length",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />\n",
+ "comments": "",
+ "x": 1417.8996391296387,
+ "y": 363.984827041626,
+ "z": "46bf2b6e.2c0e64",
+ "wires": []
+ },
+ {
+ "id": "b86e63fd.fc195",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
- "x": 1066.3570442199707,
- "y": 342.93650341033936,
- "z": "67d8f5f.109b30c",
+ "x": 1654.471076965332,
+ "y": 394.1277618408203,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "1560cc74.e1f714",
- "105e52c3.2d94dd"
+ "5a9cb21d.1f494c"
]
]
},
{
- "id": "105e52c3.2d94dd",
- "type": "set",
- "name": "set vf-index",
- "xml": "<set>\n<parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n\n\n",
+ "id": "5a9cb21d.1f494c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n",
"comments": "",
- "x": 1219.055519104004,
- "y": 312.5556021030061,
- "z": "67d8f5f.109b30c",
+ "x": 1793.0424346923828,
+ "y": 394.12772274017334,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "1560cc74.e1f714",
- "type": "for",
- "name": "for each existing vf-index",
- "xml": "<for index='idx' start='0' end='`$vf-index`' >\n",
+ "id": "2f10259c.95f9fa",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 853.3991165161133,
+ "y": 378.9847173690796,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "dfbd61c4.ba851"
+ ]
+ ]
+ },
+ {
+ "id": "c5868d60.4eb9c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
"comments": "",
"outputs": 1,
- "x": 1275.4840240478516,
- "y": 365.7777318954468,
- "z": "67d8f5f.109b30c",
+ "x": 856.8679389953613,
+ "y": 318.9534797668457,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "e9396ecf.61386"
+ "491e4f90.e2d44"
]
]
},
{
- "id": "9bfcdd3d.e8854",
+ "id": "585f0966.3b4ab8",
"type": "comment",
- "name": "make sure this network doesn't exist already",
+ "name": "if SO provide vf-id use that else create new",
"info": "",
"comments": "",
- "x": 1499.1347541809082,
- "y": 324.0317893028259,
- "z": "67d8f5f.109b30c",
+ "x": 1554.3991317749023,
+ "y": 214.98472118377686,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "e9396ecf.61386",
+ "id": "fdab20c0.e8295",
"type": "switchNode",
- "name": "switch vf-module-id found",
- "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`\">\n",
+ "name": "switch vf-id",
+ "xml": "<switch test=\"`$vf-module-topology-operation-input.vf-module-information.vf-module-id`\">\n",
"comments": "",
"outputs": 1,
- "x": 1550.7697448730469,
- "y": 365.34923458099365,
- "z": "67d8f5f.109b30c",
+ "x": 715.8679351806641,
+ "y": 343.95348834991455,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "7c76b41d.ea06ac"
+ "c5868d60.4eb9c",
+ "2f10259c.95f9fa"
]
]
},
{
- "id": "7c76b41d.ea06ac",
- "type": "outcomeTrue",
- "name": "true",
- "xml": "<outcome value='true'>\n",
+ "id": "7024b9ac.3160d8",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
"comments": "",
"outputs": 1,
- "x": 1451.499942779541,
- "y": 423.9206657409668,
- "z": "67d8f5f.109b30c",
+ "x": 715.7330017089844,
+ "y": 208.99999523162842,
+ "z": "46bf2b6e.2c0e64",
"wires": [
[
- "91b09a0a.6c6428"
+ "a1384c59.cdef8"
]
]
},
{
- "id": "91b09a0a.6c6428",
- "type": "returnFailure",
- "name": "return failure",
- "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id already found in service-data\" />\n",
+ "id": "a1384c59.cdef8",
+ "type": "other",
+ "name": "Null",
+ "xml": "<outcome value=''>\n",
"comments": "",
- "x": 1599.2500457763672,
- "y": 423.7778578097932,
- "z": "67d8f5f.109b30c",
- "wires": []
+ "outputs": 1,
+ "x": 877.7330474853516,
+ "y": 207.9999942779541,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "b60890ce.7212a"
+ ]
+ ]
},
{
- "id": "35a34bb1.948374",
- "type": "set",
- "name": "copy input data to service data",
- "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.device-vf-index`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.sdnc-request-header.' value='`$vf-module-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.request-information.' value='`$vf-module-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.service-information.' value='`$vf-module-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vnf-information.' value='`$vf-module-topology-operation-input.vnf-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-information.' value='`$vf-module-topology-operation-input.vf-module-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />\n\n<!--parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-topology.' value='`$tmp.vf-module-topology.`' /-->\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index+1`' />\n\n",
+ "id": "b60890ce.7212a",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf id not found in service-data\" />\n",
"comments": "",
- "x": 702.8531951904297,
- "y": 753.496214389801,
- "z": "67d8f5f.109b30c",
+ "x": 1026.983139038086,
+ "y": 205.7778720855713,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "f27c9cac.ebc18",
- "type": "execute",
- "name": "execute generate-vf-module-index",
- "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.device-vf-index\"/>\n",
+ "id": "e6c1d3e3.fb47b",
+ "type": "switchNode",
+ "name": "switch vf-modules.vf-module_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
"comments": "",
"outputs": 1,
- "x": 711.1866912841797,
- "y": 700.162947177887,
- "z": "67d8f5f.109b30c",
+ "x": 1479.7329788208008,
+ "y": 280.0000104904175,
+ "z": "46bf2b6e.2c0e64",
"wires": [
- []
+ [
+ "e28abe4b.99802",
+ "ad9a94b.6789668"
+ ]
]
},
{
- "id": "b9b958fd.141f08",
- "type": "set",
- "name": "set new vf-module_length",
- "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />",
- "comments": "",
- "x": 685.1866683959961,
- "y": 646.1628408432007,
- "z": "67d8f5f.109b30c",
- "wires": []
- },
- {
- "id": "a8f9e83.8a6e918",
- "type": "set",
- "name": "set vf-module-request-input.",
- "xml": "<set>\n<parameter name='vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />\n",
+ "id": "62be0465.8c201c",
+ "type": "switchNode",
+ "name": "switch vf-module-id found",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`\">\n",
"comments": "",
- "x": 700.1863288879395,
- "y": 536.154221534729,
- "z": "67d8f5f.109b30c",
- "wires": []
+ "outputs": 1,
+ "x": 1471.7329788208008,
+ "y": 402.49998474121094,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "b86e63fd.fc195"
+ ]
+ ]
},
{
- "id": "c8a186f7.659098",
- "type": "call",
- "name": "call sdwan-get-vf-module-device-param",
- "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-vf-module-device-param' mode='sync' >\n",
+ "id": "f58396e4.0282e8",
+ "type": "for",
+ "name": "for each existing vf-index",
+ "xml": "<for index='idx' start='0' end='`$vf-index`' >\n",
"comments": "",
"outputs": 1,
- "x": 726.1867065429688,
- "y": 592.1544551849365,
- "z": "67d8f5f.109b30c",
+ "x": 1235.7329788208008,
+ "y": 406.49998474121094,
+ "z": "46bf2b6e.2c0e64",
"wires": [
- []
+ [
+ "62be0465.8c201c"
+ ]
]
},
{
- "id": "178a7bac.307b74",
+ "id": "d3c28e8a.2aecc",
"type": "set",
- "name": "set vf-module-object-path",
- "xml": "<set>\n<parameter name='vf-module-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $prop.device-vf-index\n + '/vf-module-data/vf-module-topology/'`\"/>\n<parameter name='vnf-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vnf-topology/'`\"/>\n<parameter name='service-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vf-module-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n",
+ "name": "set prop.sdncCreate=false",
+ "xml": "<set>\n<parameter name='prop.sdncCreate' value='false' />\n",
"comments": "",
- "x": 698.0000877380371,
- "y": 804.0000596046448,
- "z": "67d8f5f.109b30c",
+ "x": 746.2329788208008,
+ "y": 71.99999809265137,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "7fbeb541.aa905c",
+ "id": "c8eb51dd.8bc9f",
"type": "set",
- "name": "set vf-module-level-oper-status",
- "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-rpc-action' value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n",
+ "name": "set prop.sdncCreate=true",
+ "xml": "<set>\n<parameter name='prop.sdncCreate' value='true' />\n",
"comments": "",
- "x": 705.5001907348633,
- "y": 852.0000238418579,
- "z": "67d8f5f.109b30c",
+ "x": 1265.2329864501953,
+ "y": 202.99999713897705,
+ "z": "46bf2b6e.2c0e64",
"wires": []
},
{
- "id": "e8cf2ce.61834d",
- "type": "save",
- "name": "save sdwan vpn resource in AAI",
- "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.device-id = $prop.device-vf-index' >\n<parameter name='device-id' value='`$prop.device-vf-index`' />\n<parameter name='esn' value='`$prop.device.esn`' />\n<parameter name='device-name' value='`$prop.device.name`' />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.device-vf-index + '/vf-module-data/'` \" />\n",
+ "id": "b7d7095a.45e048",
+ "type": "switchNode",
+ "name": "switch prop.sdncCreate",
+ "xml": "<switch test='`$prop.sdncCreate`'>\n",
"comments": "",
"outputs": 1,
- "x": 713.0001373291016,
- "y": 910.4999666213989,
- "z": "67d8f5f.109b30c",
+ "x": 754.2330436706543,
+ "y": 876.0000257492065,
+ "z": "46bf2b6e.2c0e64",
"wires": [
- []
+ [
+ "bb597028.866e9",
+ "18aecad0.0cad25"
+ ]
]
},
{
- "id": "d9a88b51.5c3ff8",
- "type": "save",
- "name": "save service relationship in AAI",
- "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list' \n key='generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $prop.device-vf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.device-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.device-vf-index`\" />\n\n",
+ "id": "18aecad0.0cad25",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
"comments": "",
"outputs": 1,
- "x": 708.9999847412109,
- "y": 945.5000228881836,
- "z": "67d8f5f.109b30c",
+ "x": 969.2330417633057,
+ "y": 887.0000257492065,
+ "z": "46bf2b6e.2c0e64",
"wires": [
- []
+ [
+ "8ea3c05b.19b31"
+ ]
]
},
{
- "id": "4845313f.7a00d",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "id": "bb597028.866e9",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
"comments": "",
- "x": 657.7225151062012,
- "y": 991.6738657951355,
- "z": "67d8f5f.109b30c",
- "wires": []
+ "outputs": 1,
+ "x": 972.2330417633057,
+ "y": 848.9999942779541,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ [
+ "c8a9b81e.4dea68"
+ ]
+ ]
},
{
- "id": "b5bea2af.4d20d",
- "type": "comment",
- "name": "TODO: if SO passes vnf-id, need to update prop.sdncCreate as true",
- "info": "if SO passes vnf-id, need to update prop.sdncCreate as true",
+ "id": "8ea3c05b.19b31",
+ "type": "save",
+ "name": "update sdwan vpn resource in AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.device-id = $prop.vf-id' >\n<parameter name='device-id' value='`$prop.vf-id`' />\n<parameter name='esn' value='`$prop.device.esn`' />\n<parameter name='device-name' value='`$prop.device.name`' />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vf-id + '/vf-module-data/'` \" />\n",
"comments": "",
- "x": 806.6974792480469,
- "y": 141.0160083770752,
- "z": "67d8f5f.109b30c",
- "wires": []
+ "outputs": 1,
+ "x": 1203.2329864501953,
+ "y": 892.999997138977,
+ "z": "46bf2b6e.2c0e64",
+ "wires": [
+ []
+ ]
}
] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
index 9b3109d3..80df2aad 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
@@ -3,6 +3,9 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
<method rpc='sdwan-vf-operation-device-create' mode='sync'>
<block atomic="true">
+ <set>
+ <parameter name='prop.sdncCreate' value='false' />
+ </set>
<switch test='`$service-data.vnfs.vnf_length`'>
<outcome value=''>
<return status='failure'>
@@ -21,28 +24,77 @@
</outcome>
</switch>
</for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <switch test='`$vnf-index`'>
<outcome value=''>
- <set>
- <parameter name='vf-index' value='0' />
- </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf id not found in service-data" />
+ </return>
</outcome>
- <outcome value='Other'>
- <block>
+ </switch>
+ <switch test="`$vf-module-topology-operation-input.vf-module-information.vf-module-id`">
+ <outcome value=''>
+ <block atomic="true">
<set>
- <parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ <parameter name='prop.sdncCreate' value='true' />
</set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.vf-id"/>
+ </execute>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />
+ </set>
+ </block>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />
+ </set>
+ </block>
<for index='idx' start='0' end='`$vf-index`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
<outcome value='true'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id already found in service-data" />
+ <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
+ + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`" />
</return>
</outcome>
</switch>
</for>
+ <set>
+ <parameter name='prop.vf-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ </set>
</block>
</outcome>
</switch>
@@ -63,29 +115,22 @@
</set>
<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-vf-module-device-param' mode='sync' ></call>
<set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
- <parameter name="ctx-destination" value="prop.device-vf-index"/>
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.device-vf-index`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.vf-id`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.sdnc-request-header.' value='`$vf-module-topology-operation-input.sdnc-request-header.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.request-information.' value='`$vf-module-topology-operation-input.request-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.service-information.' value='`$vf-module-topology-operation-input.service-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vnf-information.' value='`$vf-module-topology-operation-input.vnf-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-information.' value='`$vf-module-topology-operation-input.vf-module-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />
- <!--parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-topology.' value='`$tmp.vf-module-topology.`' /-->
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index+1`' />
</set>
<set>
+ <parameter name='vf-module-id' value='`$prop.vf-id`'/>
<parameter name='vf-module-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
+ '/vnf-data/vf-modules/vf-module/'
- + $prop.device-vf-index
+ + $prop.vf-id
+ '/vf-module-data/vf-module-topology/'`"/>
<parameter name='vnf-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
@@ -103,30 +148,51 @@
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-rpc-action' value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
- key='device.device-id = $prop.device-vf-index' >
- <parameter name='device-id' value='`$prop.device-vf-index`' />
- <parameter name='esn' value='`$prop.device.esn`' />
- <parameter name='device-name' value='`$prop.device.name`' />
- <parameter name='description' value='`$prop.device.description`' />
- <parameter name='vendor' value='`$prop.device.vendor`' />
- <parameter name='class' value='`$prop.device.class`' />
- <parameter name='type' value='`$prop.device.deviceModel`' />
- <parameter name='version' value='`$prop.device.version`' />
- <parameter name='system-ip' value='`$prop.device.systemIp`' />
- <parameter name='operational-status' value='Created' />
- <parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
- <parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
- <parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
- <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.device-vf-index + '/vf-module-data/'` " />
- </save>
+ <switch test='`$prop.sdncCreate`'>
+ <outcome value='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.device-id = $prop.vf-id' >
+ <parameter name='device-id' value='`$prop.vf-id`' />
+ <parameter name='esn' value='`$prop.device.esn`' />
+ <parameter name='device-name' value='`$prop.device.name`' />
+ <parameter name='description' value='`$prop.device.description`' />
+ <parameter name='vendor' value='`$prop.device.vendor`' />
+ <parameter name='class' value='`$prop.device.class`' />
+ <parameter name='type' value='`$prop.device.deviceModel`' />
+ <parameter name='version' value='`$prop.device.version`' />
+ <parameter name='system-ip' value='`$prop.device.systemIp`' />
+ <parameter name='operational-status' value='Created' />
+ <!--parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' /><parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' /><parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' /-->
+ <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vf-id + '/vf-module-data/'` " />
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device'
+ key='device.device-id = $prop.vf-id' >
+ <parameter name='device-id' value='`$prop.vf-id`' />
+ <parameter name='esn' value='`$prop.device.esn`' />
+ <parameter name='device-name' value='`$prop.device.name`' />
+ <parameter name='description' value='`$prop.device.description`' />
+ <parameter name='vendor' value='`$prop.device.vendor`' />
+ <parameter name='class' value='`$prop.device.class`' />
+ <parameter name='type' value='`$prop.device.deviceModel`' />
+ <parameter name='version' value='`$prop.device.version`' />
+ <parameter name='system-ip' value='`$prop.device.systemIp`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
+ <parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
+ <parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
+ <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vf-id + '/vf-module-data/'` " />
+ </update>
+ </outcome>
+ </switch>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
key='generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id'
force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[0].related-to" value="device" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/devices/device/' + $prop.device-vf-index`" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/devices/device/' + $prop.vf-id`" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="device.device-id" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.device-vf-index`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vf-id`" />
</save>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />