diff options
Diffstat (limited to 'platform-logic/generic-resource-api/src/main')
8 files changed, 2356 insertions, 2525 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-site-param.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-site-param.json new file mode 100644 index 00000000..26456855 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sdwan-get-site-param.json @@ -0,0 +1,733 @@ +[ + { + "id": "c9ac4983.326288", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 259.03125, + "y": 199.03125, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "a919b1fb.cf167" + ] + ] + }, + { + "id": "a919b1fb.cf167", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API ${project.version}", + "module": "GENERIC-RESOURCE-API", + "version": "${project.version}", + "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>", + "outputs": 1, + "x": 471.03125381469727, + "y": 271.0312671661377, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "20189583.354efa" + ] + ] + }, + { + "id": "20189583.354efa", + "type": "method", + "name": "sdwan-get-site-param", + "xml": "<method rpc='sdwan-get-site-param' mode='sync'>\n", + "comments": "", + "outputs": 1, + "x": 459.0313720703125, + "y": 359.03125, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "c2456569.00bd88" + ] + ] + }, + { + "id": "c2456569.00bd88", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 466.03126525878906, + "y": 445.0313081741333, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "4e2d26a4.4c1808" + ] + ] + }, + { + "id": "4e2d26a4.4c1808", + "type": "for", + "name": "for each sdwan-get-request-input-param", + "xml": "<for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >\n\n", + "comments": "", + "outputs": 1, + "x": 502.6980285644531, + "y": 527.697904586792, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "e3603253.51629" + ] + ] + }, + { + "id": "e3603253.51629", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 789.5315780639648, + "y": 445.03135204315186, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "4fbcc568.ce097c", + "9e4fbe84.7d2fb", + "ed14265a.99d948", + "773d0e91.45e91", + "a690711f.67d26", + "f96e2736.deb9e8", + "5bc913df.9a308c", + "8619f18f.0dd93", + "1ee73b7b.ea9285", + "5cd558f4.7f3258", + "dbf73ee2.461c2", + "bbcb741c.0eb968", + "cd952f17.46c77" + ] + ] + }, + { + "id": "4fbcc568.ce097c", + "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": 993.0323181152344, + "y": 814.032012462616, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "9e4fbe84.7d2fb", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1009.0312881469727, + "y": 241.031325340271, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "3261cfb2.83caf" + ] + ] + }, + { + "id": "3261cfb2.83caf", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1151.0312881469727, + "y": 242.031325340271, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "e4e6bc65.0ec81" + ] + ] + }, + { + "id": "e4e6bc65.0ec81", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.device.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1285.0312881469727, + "y": 242.63133144378662, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "ed14265a.99d948", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1005.0313949584961, + "y": 332.0312833786011, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "81ce8f79.a82a1" + ] + ] + }, + { + "id": "81ce8f79.a82a1", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1183.0314083099365, + "y": 335.0312833786011, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "6599a894.64adf8" + ] + ] + }, + { + "id": "6599a894.64adf8", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1330.0314178466797, + "y": 334.6312789916992, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "5cd558f4.7f3258", + "type": "switchNode", + "name": "switch type", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "comments": "", + "outputs": 1, + "x": 983.9270668029785, + "y": 630.0047330856323, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "48783360.87fe7c" + ] + ] + }, + { + "id": "48783360.87fe7c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1162.9269104003906, + "y": 631.0046529769897, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "b59fb35a.098b9" + ] + ] + }, + { + "id": "b59fb35a.098b9", + "type": "set", + "name": "set type", + "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value='true' />", + "comments": "", + "x": 1312.9269218444824, + "y": 632.6046676635742, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "dbf73ee2.461c2", + "type": "switchNode", + "name": "switch role", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "comments": "", + "outputs": 1, + "x": 984.9267425537109, + "y": 674.0047731399536, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "8ceba6c3.5c88c8" + ] + ] + }, + { + "id": "8ceba6c3.5c88c8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1154.9267501831055, + "y": 684.0047359466553, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "832f2789.d30da8" + ] + ] + }, + { + "id": "773d0e91.45e91", + "type": "switchNode", + "name": "switch location-name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", + "comments": "", + "outputs": 1, + "x": 1027.9265823364258, + "y": 374.0045919418335, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "85468ea4.c68d2" + ] + ] + }, + { + "id": "85468ea4.c68d2", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1191.9267539978027, + "y": 374.0045928955078, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "bc94b24c.9dce8" + ] + ] + }, + { + "id": "bc94b24c.9dce8", + "type": "set", + "name": "set location-name", + "xml": "<set>\n<parameter name='prop.site.location-name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1353.9267654418945, + "y": 373.6046495437622, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "a690711f.67d26", + "type": "switchNode", + "name": "switch address", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", + "comments": "", + "outputs": 1, + "x": 1010.9265823364258, + "y": 410.00459575653076, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "5c1e569f.3488e8" + ] + ] + }, + { + "id": "5c1e569f.3488e8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1180.9264297485352, + "y": 418.00459480285645, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "b976d806.368f48" + ] + ] + }, + { + "id": "b976d806.368f48", + "type": "set", + "name": "set location-address", + "xml": "<set>\n<parameter name='prop.site.location-address' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1368.9266052246094, + "y": 413.60457038879395, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "f96e2736.deb9e8", + "type": "switchNode", + "name": "switch postcode", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", + "comments": "", + "outputs": 1, + "x": 1011.9265823364258, + "y": 452.0045566558838, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "e2c2334c.42179" + ] + ] + }, + { + "id": "e2c2334c.42179", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1176.9267539978027, + "y": 451.0045566558838, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "8da40933.edfaf8" + ] + ] + }, + { + "id": "8da40933.edfaf8", + "type": "set", + "name": "set location-postcode", + "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1363.9266052246094, + "y": 452.6045732498169, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "bbcb741c.0eb968", + "type": "switchNode", + "name": "switch controlPoint", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoint'`\">\n", + "comments": "", + "outputs": 1, + "x": 1003.8099670410156, + "y": 734.0315742492676, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "6a2baa92.dd77f4" + ] + ] + }, + { + "id": "6a2baa92.dd77f4", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1165.8098907470703, + "y": 730.0315971374512, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "fd4f1adb.5ec4b8" + ] + ] + }, + { + "id": "9ab3bfdb.b8822", + "type": "set", + "name": "set role", + "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", + "comments": "", + "x": 1526.8100395202637, + "y": 660.0315113067627, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "44d73030.0da8d", + "type": "set", + "name": "set controlPoint", + "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", + "comments": "", + "x": 1550.8099174499512, + "y": 750.0315952301025, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "a9190ca.3c93df", + "type": "execute", + "name": "execute split roles", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", + "comments": "", + "outputs": 1, + "x": 1565.4762649536133, + "y": 707.0314292907715, + "z": "33fa79d5.e5dbd6", + "wires": [ + [] + ] + }, + { + "id": "832f2789.d30da8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1312.4764022827148, + "y": 687.0314292907715, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "9ab3bfdb.b8822", + "a9190ca.3c93df" + ] + ] + }, + { + "id": "fd4f1adb.5ec4b8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1324.4762382507324, + "y": 734.0313529968262, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "44d73030.0da8d", + "2ecea48f.cefbcc" + ] + ] + }, + { + "id": "2ecea48f.cefbcc", + "type": "execute", + "name": "execute split control points", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", + "comments": "", + "outputs": 1, + "x": 1575.4763946533203, + "y": 802.031455039978, + "z": "33fa79d5.e5dbd6", + "wires": [ + [] + ] + }, + { + "id": "5bc913df.9a308c", + "type": "switchNode", + "name": "switch latitude", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", + "comments": "", + "outputs": 1, + "x": 1002.1428909301758, + "y": 496.03133392333984, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "408fca65.ceeb84" + ] + ] + }, + { + "id": "408fca65.ceeb84", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1178.1427383422852, + "y": 491.03129291534424, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "fff4ca4.988db38" + ] + ] + }, + { + "id": "fff4ca4.988db38", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1352.1427459716797, + "y": 489.63130950927734, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "8619f18f.0dd93", + "type": "switchNode", + "name": "switch longitude", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", + "comments": "", + "outputs": 1, + "x": 1005.1428909301758, + "y": 536.0313768386841, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "f2c6dced.9082e" + ] + ] + }, + { + "id": "f2c6dced.9082e", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1177.1428985595703, + "y": 531.031418800354, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "dc9fd2db.e7bb7" + ] + ] + }, + { + "id": "dc9fd2db.e7bb7", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1359.1427536010742, + "y": 534.6312704086304, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "95b5a3d.f7b926", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1168.1428985595703, + "y": 581.031421661377, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "9b797058.27cec" + ] + ] + }, + { + "id": "e75918af.752508", + "type": "set", + "name": "set emails", + "xml": "<set>\n<parameter name='prop.site.emails' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1526.142593383789, + "y": 549.6312737464905, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "1ee73b7b.ea9285", + "type": "switchNode", + "name": "switch emails", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", + "comments": "", + "outputs": 1, + "x": 995.1429672241211, + "y": 581.031421661377, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "95b5a3d.f7b926" + ] + ] + }, + { + "id": "931cb5f.e240e48", + "type": "execute", + "name": "execute split emails", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", + "comments": "", + "outputs": 1, + "x": 1551.808937072754, + "y": 596.0311765670776, + "z": "33fa79d5.e5dbd6", + "wires": [ + [] + ] + }, + { + "id": "9b797058.27cec", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", + "outputs": 1, + "x": 1330.1429061889648, + "y": 582.0313391685486, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "e75918af.752508", + "931cb5f.e240e48" + ] + ] + }, + { + "id": "cd952f17.46c77", + "type": "switchNode", + "name": "switch description", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", + "comments": "", + "outputs": 1, + "x": 1010.03125, + "y": 286.03125, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "e92216b6.4260b8" + ] + ] + }, + { + "id": "e92216b6.4260b8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", + "comments": "", + "outputs": 1, + "x": 1152.03125, + "y": 287.03125, + "z": "33fa79d5.e5dbd6", + "wires": [ + [ + "adffc0ee.7e0ff" + ] + ] + }, + { + "id": "adffc0ee.7e0ff", + "type": "set", + "name": "set description", + "xml": "<set>\n<parameter name='prop.device.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1286.03125, + "y": 287.6312561035156, + "z": "33fa79d5.e5dbd6", + "wires": [] + } +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json index dabcc4f1..b750acf2 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json @@ -1,20 +1,20 @@ [ { - "id": "fe5a38bb.bd0078", + "id": "c9dff872.319c28", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 108, - "y": 187.0103931427002, - "z": "e876afdc.6a24f", + "x": 182.03125, + "y": 193.0103907585144, + "z": "8546294e.bbf628", "wires": [ [ - "8fa75912.54ed58" + "f599176a.0162d8" ] ] }, { - "id": "8fa75912.54ed58", + "id": "f599176a.0162d8", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,1407 +22,1218 @@ "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": 183.28570556640625, - "y": 227.24850463867188, - "z": "e876afdc.6a24f", + "x": 257.31695556640625, + "y": 233.24850225448608, + "z": "8546294e.bbf628", "wires": [ [ - "a48c87a9.a55028" + "6ef8717d.0a89a" ] ] }, { - "id": "a48c87a9.a55028", + "id": "6ef8717d.0a89a", "type": "method", "name": "method site-vnf-topology-operation-activate", "xml": "<method rpc='site-vnf-topology-operation-activate' mode='sync'>\n", "comments": "", "outputs": 1, - "x": 204.42861938476562, - "y": 317.0103931427002, - "z": "e876afdc.6a24f", + "x": 278.4598693847656, + "y": 323.0103907585144, + "z": "8546294e.bbf628", "wires": [ [ - "38f14e2f.c24e22" + "e4c81f6e.49ef7" ] ] }, { - "id": "38f14e2f.c24e22", + "id": "e4c81f6e.49ef7", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 192.66673278808594, - "y": 506.6771717071533, - "z": "e876afdc.6a24f", + "x": 266.69798278808594, + "y": 512.6771693229675, + "z": "8546294e.bbf628", "wires": [ [ - "44a8ff3e.e9b76", - "79a45953.cb4488", - "6e5a67bd.c2ddb8", - "dc5b8c85.92a84", - "3adc7192.5bf7fe", - "1ddd800f.cc627", - "708f2def.d37784", - "73349d78.1f3074", - "6ab44a9b.48e9b4", - "3f3b503b.d5da4", - "99fac312.5a742" + "cd35c02d.85245", + "cbc96af.e7a6b98", + "f380f867.7d6998", + "be9b1521.3244d8", + "8699a911.00b498", + "640f5d20.cfa064", + "e28c053e.d4c358", + "c2b356f7.cb66f8", + "cfdaefb3.97c88", + "de98d30f.d2fa5" ] ] }, { - "id": "dc5b8c85.92a84", - "type": "for", - "name": "for loop i - VNF input parameters", - "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", - "comments": "", - "outputs": 1, - "x": 649.1047821044922, - "y": 325.078284740448, - "z": "e876afdc.6a24f", - "wires": [ - [ - "b5990ea7.a9c72" - ] - ] - }, - { - "id": "44a8ff3e.e9b76", + "id": "cd35c02d.85245", "type": "switchNode", "name": "switch service-data.vnfs.vnf_length", "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", "comments": "", "outputs": 1, - "x": 631.9896621704102, - "y": 135.99998807907104, - "z": "e876afdc.6a24f", + "x": 706.0209121704102, + "y": 141.99998569488525, + "z": "8546294e.bbf628", "wires": [ [ - "def084ef.6fe5a8", - "6c59b52d.4816dc", - "fe5f06d4.6ce418" + "e72f24a3.7e9cf8", + "56a6c4e8.1f860c", + "7ce3d5f2.723dec" ] ] }, { - "id": "def084ef.6fe5a8", + "id": "e72f24a3.7e9cf8", "type": "other", "name": "Null", "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 862.9896392822266, - "y": 138.0000514984131, - "z": "e876afdc.6a24f", + "x": 937.0208892822266, + "y": 144.0000491142273, + "z": "8546294e.bbf628", "wires": [ [ - "a40915eb.62f7c8" + "edb6abe2.7bba78" ] ] }, { - "id": "a40915eb.62f7c8", + "id": "edb6abe2.7bba78", "type": "returnFailure", "name": "return failure", "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n", "comments": "", - "x": 1020.7671546936035, - "y": 118.88899993896484, - "z": "e876afdc.6a24f", + "x": 1094.7984046936035, + "y": 124.88899755477905, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "6c59b52d.4816dc", + "id": "56a6c4e8.1f860c", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 854.9900665283203, - "y": 173.00007343292236, - "z": "e876afdc.6a24f", + "x": 929.0213165283203, + "y": 179.00007104873657, + "z": "8546294e.bbf628", "wires": [ [ - "7b4738a3.9186a8" + "28abc688.86ccda" ] ] }, { - "id": "7b4738a3.9186a8", + "id": "28abc688.86ccda", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1021.2595367431641, - "y": 164.55460691452026, - "z": "e876afdc.6a24f", + "x": 1095.290786743164, + "y": 170.55460453033447, + "z": "8546294e.bbf628", "wires": [ [ - "39aaaddb.c527a2", - "80c14f8c.d4c2", - "fb9527f.4513dd8" + "13d47e80.4e6022", + "5d523d19.4e3534", + "63f3d384.29d3ac" ] ] }, { - "id": "39aaaddb.c527a2", + "id": "13d47e80.4e6022", "type": "for", "name": "for vidx..service-data.vnfs.vnf_length[]", "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", "comments": "", "outputs": 1, - "x": 1291.2756271362305, - "y": 108.42860794067383, - "z": "e876afdc.6a24f", + "x": 1365.3068771362305, + "y": 114.42860555648804, + "z": "8546294e.bbf628", "wires": [ [ - "792cd7fe.bce288" + "9845da61.98a1c8" ] ] }, { - "id": "80c14f8c.d4c2", + "id": "5d523d19.4e3534", "type": "switchNode", "name": "switch tmp.vidx ", "xml": "<switch test=\"`$tmp.vidx`\">\n\n", "comments": "", "outputs": 1, - "x": 1227.5769805908203, - "y": 159.41179656982422, - "z": "e876afdc.6a24f", + "x": 1301.6082305908203, + "y": 165.41179418563843, + "z": "8546294e.bbf628", "wires": [ [ - "767a61a0.371db" + "26cec9c2.9bd426" ] ] }, { - "id": "767a61a0.371db", + "id": "26cec9c2.9bd426", "type": "outcome", "name": "NULL", "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 1379.0057830810547, - "y": 159.98322677612305, - "z": "e876afdc.6a24f", + "x": 1453.0370330810547, + "y": 165.98322439193726, + "z": "8546294e.bbf628", "wires": [ [ - "10547f9b.2e5b4" + "a0a7bb4c.608bd8" ] ] }, { - "id": "506c3f6d.abfb3", + "id": "90e8fa4e.9e0b88", "type": "switchNode", "name": "switch vnfid found", "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n", "comments": "", "outputs": 1, - "x": 1688.7043685913086, - "y": 68.67873001098633, - "z": "e876afdc.6a24f", + "x": 1762.7356185913086, + "y": 74.67872762680054, + "z": "8546294e.bbf628", "wires": [ [ - "970983d7.84ecd" + "b847bf38.a4e72" ] ] }, { - "id": "10547f9b.2e5b4", + "id": "a0a7bb4c.608bd8", "type": "returnFailure", "name": "return failure", "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n", "comments": "", - "x": 1517.434181213379, - "y": 161.12604904174805, - "z": "e876afdc.6a24f", + "x": 1591.465431213379, + "y": 167.12604665756226, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "970983d7.84ecd", + "id": "b847bf38.a4e72", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1862.6568489074707, - "y": 68.57145023345947, - "z": "e876afdc.6a24f", + "x": 1936.6880989074707, + "y": 74.57144784927368, + "z": "8546294e.bbf628", "wires": [ [ - "13efb35.8a5a24d" + "fe37a50e.9b06e8" ] ] }, { - "id": "13efb35.8a5a24d", - "type": "set", - "name": "set tmp.vidx and ctx.vnf-data", - "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n", - "comments": "", - "x": 2058.1885986328125, - "y": 68.32144069671631, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "fe5f06d4.6ce418", + "id": "7ce3d5f2.723dec", "type": "outcome", "name": "0", "xml": "<outcome value='0'>\n", "comments": "", "outputs": 1, - "x": 860.9584503173828, - "y": 100.96874046325684, - "z": "e876afdc.6a24f", + "x": 934.9897003173828, + "y": 106.96873807907104, + "z": "8546294e.bbf628", "wires": [ [ - "a40915eb.62f7c8" + "edb6abe2.7bba78" ] ] }, { - "id": "3adc7192.5bf7fe", + "id": "be9b1521.3244d8", "type": "returnSuccess", "name": "return success", "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n", "comments": "", - "x": 576.3336982727051, - "y": 689.3441772460938, - "z": "e876afdc.6a24f", + "x": 650.3649482727051, + "y": 695.344174861908, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "6ab44a9b.48e9b4", + "id": "c2b356f7.cb66f8", "type": "set", "name": "set vnf-level-oper-status to Active", "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n", "comments": "", - "x": 638.8138885498047, - "y": 523.6816167831421, - "z": "e876afdc.6a24f", + "x": 712.8451385498047, + "y": 529.6816143989563, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "73349d78.1f3074", + "id": "e28c053e.d4c358", "type": "set", "name": "set vnf-index and vnf-object-path", "xml": "<set>\n<parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$tmp.vidx].vnf-id + '/vnf-data/'` \" />", "comments": "", - "x": 638.50048828125, - "y": 480.3441514968872, - "z": "e876afdc.6a24f", + "x": 712.53173828125, + "y": 486.3441491127014, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "aaa950b9.3f56b", + "id": "5369a88f.c265a8", "type": "success", "name": "success", "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1565.500316619873, - "y": 818.0003184080124, - "z": "e876afdc.6a24f", + "x": 1570.531826019287, + "y": 431.00039863586426, + "z": "8546294e.bbf628", "wires": [ [ - "88dbfad5.81b4c8" + "e11a3e97.9a4cf" ] ] }, { - "id": "88dbfad5.81b4c8", + "id": "e11a3e97.9a4cf", "type": "set", "name": "set controller data", "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n", "comments": "", - "x": 1754.0004119873047, - "y": 812.0003280639648, - "z": "e876afdc.6a24f", + "x": 1759.0319213867188, + "y": 425.0004082918167, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "1c9cd1a7.9cc68e", + "id": "a5222a28.6f55b8", "type": "not-found", "name": "not-found", "xml": "<outcome value='not-found'>\n", "comments": "", "outputs": 1, - "x": 1568.991283416748, - "y": 865.5743540525436, - "z": "e876afdc.6a24f", + "x": 1574.022792816162, + "y": 478.5744342803955, + "z": "8546294e.bbf628", "wires": [ [ - "55bc7178.25cc8" + "ea233a49.a94538" ] ] }, { - "id": "55bc7178.25cc8", + "id": "ea233a49.a94538", "type": "returnFailure", "name": "return failure", "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", "comments": "", - "x": 1742.5626945495605, - "y": 853.860090136528, - "z": "e876afdc.6a24f", + "x": 1747.5942039489746, + "y": 466.8601703643799, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "98e7b2b4.03262", + "id": "42b5e401.e14b8c", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 1561.324291229248, - "y": 906.9076670408249, - "z": "e876afdc.6a24f", + "x": 1566.355800628662, + "y": 519.9077472686768, + "z": "8546294e.bbf628", "wires": [ [ - "201a39ec.7051b6" + "28e9f15e.a3f2ce" ] ] }, { - "id": "201a39ec.7051b6", + "id": "28e9f15e.a3f2ce", "type": "returnFailure", "name": "return failure", "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", "comments": "", - "x": 1749.0968475341797, - "y": 902.3468598127365, - "z": "e876afdc.6a24f", + "x": 1754.1283569335938, + "y": 515.3469400405884, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "fccf6b1b.062f88", + "id": "e43f8602.8d7af8", "type": "get-resource", "name": "get-resource esr-thirdparty-sdnc", - "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n", + "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n", "comments": "", "outputs": 1, - "x": 1298.500228881836, - "y": 866.0003242492676, - "z": "e876afdc.6a24f", + "x": 1303.53173828125, + "y": 479.00040447711945, + "z": "8546294e.bbf628", "wires": [ [ - "aaa950b9.3f56b", - "1c9cd1a7.9cc68e", - "98e7b2b4.03262" + "5369a88f.c265a8", + "a5222a28.6f55b8", + "42b5e401.e14b8c" ] ] }, { - "id": "9d503875.591ee8", + "id": "d2ea4d7a.0f7bc", "type": "execute", "name": "execute RestApiCallNode Create SDWAN site", "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />", "comments": "", "outputs": 1, - "x": 1352.0003204345703, - "y": 1023.0002918243408, - "z": "e876afdc.6a24f", + "x": 1326.031852722168, + "y": 636.0003986358643, + "z": "8546294e.bbf628", "wires": [ [ - "caf01e6b.3d325" + "f57bd183.9204c" ] ] }, { - "id": "e7caa58d.8c0ca8", + "id": "b5c8e88e.b71a98", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "comments": "", "outputs": 1, - "x": 1820.6667022705078, - "y": 1037.8891677856445, - "z": "e876afdc.6a24f", + "x": 1746.6983757019043, + "y": 637.8892993927002, + "z": "8546294e.bbf628", "wires": [ [] ] }, { - "id": "67309670.5d6238", + "id": "db67aff2.ce7ea", "type": "returnFailure", "name": "return failure", "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n", "comments": "", - "x": 1796.111343383789, - "y": 1099.4445505142212, - "z": "e876afdc.6a24f", + "x": 1732.1429595947266, + "y": 697.4446468353271, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "e2a202c3.ab071", + "id": "8e3552db.71c4c", "type": "failure", "name": "failure", "xml": "<outcome value='failure'>\n", "comments": "", "outputs": 1, - "x": 1651.111343383789, - "y": 1096.4445505142212, - "z": "e876afdc.6a24f", + "x": 1587.1429500579834, + "y": 694.4446449279785, + "z": "8546294e.bbf628", "wires": [ [ - "67309670.5d6238" + "db67aff2.ce7ea" ] ] }, { - "id": "caf01e6b.3d325", + "id": "f57bd183.9204c", "type": "success", "name": "success", "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1647.5557174682617, - "y": 1038.1113357543945, - "z": "e876afdc.6a24f", + "x": 1587.587287902832, + "y": 638.1114530563354, + "z": "8546294e.bbf628", "wires": [ [ - "e7caa58d.8c0ca8" + "b5c8e88e.b71a98" ] ] }, { - "id": "3f3b503b.d5da4", + "id": "cfdaefb3.97c88", "type": "set", "name": "copy input data to service data", "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />", "comments": "", - "x": 627.0004348754883, - "y": 566.0005855560303, - "z": "e876afdc.6a24f", + "x": 701.0316848754883, + "y": 572.0005831718445, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "93347dcc.a6583", + "id": "b24b0990.f29818", "type": "execute", "name": "execute RestApiCallNode Get token", "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>", "comments": "", "outputs": 1, - "x": 1299.7543258666992, - "y": 959.0043849945068, - "z": "e876afdc.6a24f", + "x": 1304.7858352661133, + "y": 572.0044652223587, + "z": "8546294e.bbf628", "wires": [ [ - "c5378ae6.053748", - "cfecc2b7.775a9" + "289de783.f62c58", + "794b6e1c.8d635" ] ] }, { - "id": "c5378ae6.053748", + "id": "289de783.f62c58", "type": "success", "name": "success", "xml": "<outcome value='success'>\n", "comments": "", "outputs": 1, - "x": 1564.754207611084, - "y": 944.004280090332, - "z": "e876afdc.6a24f", + "x": 1569.785717010498, + "y": 557.0043603181839, + "z": "8546294e.bbf628", "wires": [ [ - "574fb0f8.2705b" + "9a259234.042bd" ] ] }, { - "id": "cfecc2b7.775a9", + "id": "794b6e1c.8d635", "type": "failure", "name": "failure", "xml": "<outcome value='failure'>\n", "comments": "", "outputs": 1, - "x": 1557.004207611084, - "y": 985.6471633911133, - "z": "e876afdc.6a24f", + "x": 1562.035717010498, + "y": 598.6472436189651, + "z": "8546294e.bbf628", "wires": [ [ - "a43bfc8d.c3ede" + "abdc5f44.099" ] ] }, { - "id": "a43bfc8d.c3ede", + "id": "abdc5f44.099", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 1683.087703704834, - "y": 985.893196105957, - "z": "e876afdc.6a24f", + "x": 1688.119213104248, + "y": 598.8932763338089, + "z": "8546294e.bbf628", "wires": [ [] ] }, { - "id": "574fb0f8.2705b", + "id": "9a259234.042bd", "type": "set", "name": "set token-id", "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", "comments": "", - "x": 1701.754207611084, - "y": 944.004280090332, - "z": "e876afdc.6a24f", + "x": 1706.785717010498, + "y": 557.0043603181839, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "bbce2e16.d72aa", + "id": "6db7dcff.bc7ce4", "type": "comment", "name": "tmp.thirdparty-sdnc-id is hardcoded value?", "info": "", "comments": "", - "x": 1295.0041198730469, - "y": 833.0042457580566, - "z": "e876afdc.6a24f", + "x": 1352.0356369018555, + "y": 433.004376411438, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "708f2def.d37784", + "id": "640f5d20.cfa064", "type": "set", "name": "set vnf-index to service data", - "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].name' value='siteId' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].value' value='`$site-result[0].id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n", + "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value='siteId' />\n<!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$site-result[0].id`' /-->\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n", "comments": "", - "x": 628.0042037963867, - "y": 442.00424671173096, - "z": "e876afdc.6a24f", + "x": 702.0354537963867, + "y": 448.00424432754517, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "c2a60a1e.d3e7f8", + "id": "3d75d87b.d2ff28", "type": "switchNode", "name": "switch ActivateSDWANDeviceInstance", "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`\">\n\n \n \n\n", "comments": "", "outputs": 1, - "x": 1756.2543411254883, - "y": 138.00390720367432, - "z": "e876afdc.6a24f", + "x": 1830.2855911254883, + "y": 144.00390481948853, + "z": "8546294e.bbf628", "wires": [ [ - "3b24cc2e.de2954" + "628cbd2.1a1aa44" ] ] }, { - "id": "3b24cc2e.de2954", + "id": "628cbd2.1a1aa44", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1983.2541961669922, - "y": 137.00390625, - "z": "e876afdc.6a24f", + "x": 2057.285446166992, + "y": 143.0039038658142, + "z": "8546294e.bbf628", "wires": [ [ - "68cbbed8.08fd8" + "b1822ffa.bc97b" ] ] }, { - "id": "792cd7fe.bce288", + "id": "9845da61.98a1c8", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 1526.254165649414, - "y": 109.00389289855957, - "z": "e876afdc.6a24f", + "x": 1600.285415649414, + "y": 115.00389051437378, + "z": "8546294e.bbf628", "wires": [ [ - "c2a60a1e.d3e7f8", - "506c3f6d.abfb3" + "3d75d87b.d2ff28", + "90e8fa4e.9e0b88" ] ] }, { - "id": "460c13d8.2f2f3c", + "id": "fab4e8d5.eaaa38", "type": "comment", "name": "Get devices", "info": "", "comments": "", - "x": 1790.0043563842773, - "y": 158.75392246246338, - "z": "e876afdc.6a24f", + "x": 1864.0356063842773, + "y": 164.7539200782776, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "79a45953.cb4488", + "id": "cbc96af.e7a6b98", "type": "set", "name": "set prop.site.sdwan false", "xml": "<set>\n<parameter name='prop.site.sdwan' value=\"false\" />\n\n", "comments": "", - "x": 618, - "y": 229.0000123977661, - "z": "e876afdc.6a24f", + "x": 685.0312652587891, + "y": 83.0000352859497, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "1ddd800f.cc627", + "id": "8699a911.00b498", "type": "switchNode", "name": "switch prop.site.sdwan", "xml": "<switch test=\"`$prop.site.sdwan`\">\n", "comments": "", "outputs": 1, - "x": 607.0001220703125, - "y": 384.6666269302368, - "z": "e876afdc.6a24f", + "x": 681.0313720703125, + "y": 390.666624546051, + "z": "8546294e.bbf628", "wires": [ [ - "7c42fbb6.c14864" + "ace66bf6.fc6f18" ] ] }, { - "id": "7c42fbb6.c14864", + "id": "ace66bf6.fc6f18", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 786.000171661377, - "y": 381.6666269302368, - "z": "e876afdc.6a24f", + "x": 860.031421661377, + "y": 387.666624546051, + "z": "8546294e.bbf628", "wires": [ [ - "9d5e017e.9579d" + "70ebd8ae.1dd798" ] ] }, { - "id": "9d5e017e.9579d", + "id": "70ebd8ae.1dd798", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 960.000244140625, - "y": 908.6668318510056, - "z": "e876afdc.6a24f", + "x": 1016.0316467285156, + "y": 384.6669464111328, + "z": "8546294e.bbf628", "wires": [ [ - "93347dcc.a6583", - "9d503875.591ee8", - "69c072d6.f6ae7c", - "fccf6b1b.062f88" + "2f462de2.0453e2", + "2f8e9052.03ea2", + "d2ea4d7a.0f7bc", + "e43f8602.8d7af8", + "b24b0990.f29818" ] ] }, { - "id": "68cbbed8.08fd8", + "id": "b1822ffa.bc97b", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1921.6669616699219, - "y": 248.00000762939453, - "z": "e876afdc.6a24f", + "x": 2010.6982822418213, + "y": 212.00003480911255, + "z": "8546294e.bbf628", "wires": [ [ - "7e0b70dd.7568" + "f8a73d95.16c95" ] ] }, { - "id": "7e0b70dd.7568", + "id": "f8a73d95.16c95", "type": "for", "name": "for loop deviceidx - Get deviceId from servicedata", "xml": "<for index=\"deviceidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">", "comments": "", "outputs": 1, - "x": 2205.0007934570312, - "y": 251.00003814697266, - "z": "e876afdc.6a24f", + "x": 2294.0321140289307, + "y": 215.00006532669067, + "z": "8546294e.bbf628", "wires": [ [ - "bb46e6b5.934b78" + "f4aaaa9b.0e63e8" ] ] }, { - "id": "bb46e6b5.934b78", + "id": "f4aaaa9b.0e63e8", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 2135.00057220459, - "y": 334.0002021789551, - "z": "e876afdc.6a24f", + "x": 2410.031898498535, + "y": 266.0002508163452, + "z": "8546294e.bbf628", "wires": [ [ - "68a7dd5e.b34a34" + "560efc8.407e904" ] ] }, { - "id": "68a7dd5e.b34a34", + "id": "560efc8.407e904", "type": "switchNode", "name": "switch deviceId", "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`\">\n", "comments": "", "outputs": 1, - "x": 2295.0008277893066, - "y": 336.00005531311035, - "z": "e876afdc.6a24f", + "x": 2570.032154083252, + "y": 268.0001039505005, + "z": "8546294e.bbf628", "wires": [ [ - "eb058687.6ea298" + "364ea14b.4737ce" ] ] }, { - "id": "eb058687.6ea298", + "id": "364ea14b.4737ce", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 2447.0009994506836, - "y": 335.00005531311035, - "z": "e876afdc.6a24f", + "x": 2722.032325744629, + "y": 267.0001039505005, + "z": "8546294e.bbf628", "wires": [ [ - "468bec8a.569b34" + "57bae08d.5682f" ] ] }, { - "id": "468bec8a.569b34", + "id": "57bae08d.5682f", "type": "set", "name": "set deviceId", "xml": "<set>\n<parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />\n<parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' />\n", "comments": "", - "x": 2587.001003265381, - "y": 334.6000099182129, - "z": "e876afdc.6a24f", + "x": 2862.032329559326, + "y": 266.600058555603, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "fb9527f.4513dd8", + "id": "63f3d384.29d3ac", "type": "set", "name": "set prop.site.deviceId_length", "xml": "<set>\n<parameter name='prop.site.deviceId_length' value='0' />\n", "comments": "", - "x": 1264.000072479248, - "y": 64, - "z": "e876afdc.6a24f", + "x": 1338.031322479248, + "y": 69.99999761581421, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "b5990ea7.a9c72", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 1026.0003089904785, - "y": 424.00009059906006, - "z": "e876afdc.6a24f", - "wires": [ - [ - "982966d0.a9a8e8", - "f41887bb.544248", - "4ca7692.19f0f98", - "e068ac07.3a75f", - "caf25c5.4962fa", - "a0b5938f.d00a8", - "a3f45232.9e1a1", - "b56118e.cb3ebe8", - "6dc0a862.fb8db8", - "beea925c.34a3c" - ] - ] - }, - { - "id": "beea925c.34a3c", - "type": "switchNode", - "name": "switch name", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n\n", + "id": "de98d30f.d2fa5", + "type": "save", + "name": "update siteInstance configuration in AAI", + "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='generated-site-id' value='`$site-result[0].site-id`' /> \n<parameter name='operational-status' value='Active' />\n", "comments": "", "outputs": 1, - "x": 1260.2222442626953, - "y": 283.000036239624, - "z": "e876afdc.6a24f", + "x": 731.0313720703125, + "y": 633.0000977516174, + "z": "8546294e.bbf628", "wires": [ - [ - "86ab3afd.9888f8" - ] + [] ] }, { - "id": "86ab3afd.9888f8", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "f380f867.7d6998", + "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": 1438.2222576141357, - "y": 286.000036239624, - "z": "e876afdc.6a24f", + "x": 677.0312881469727, + "y": 279.99999952316284, + "z": "8546294e.bbf628", "wires": [ - [ - "daf4941f.5f7e68" - ] + [] ] }, { - "id": "daf4941f.5f7e68", + "id": "2f462de2.0453e2", "type": "set", - "name": "set name", - "xml": "<set>\n<parameter name='prop.site.name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "name": "set siteId", + "xml": "<set>\n<parameter name='prop.site.siteId' value=\"\" />\n\n", "comments": "", - "x": 1585.222267150879, - "y": 285.60003185272217, - "z": "e876afdc.6a24f", + "x": 1225.0315856933594, + "y": 375.0001050233841, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "982966d0.a9a8e8", - "type": "switchNode", - "name": "switch type", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", + "id": "e43a0564.6e85b8", + "type": "comment", + "name": "should be null in request", + "info": "", "comments": "", - "outputs": 1, - "x": 1239.1179161071777, - "y": 580.9734859466553, - "z": "e876afdc.6a24f", - "wires": [ - [ - "bbc62e0b.50f11" - ] - ] + "x": 1234.031509399414, + "y": 346.0000592470169, + "z": "8546294e.bbf628", + "wires": [] }, { - "id": "bbc62e0b.50f11", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", + "id": "fe37a50e.9b06e8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1418.1177597045898, - "y": 581.9734058380127, - "z": "e876afdc.6a24f", + "x": 2107.031394958496, + "y": 78.65758323669434, + "z": "8546294e.bbf628", "wires": [ [ - "91550639.119c38" + "4bd89f7e.9676d", + "9ff83ab.3d923c8", + "523d9c1d.3e7a14", + "471b0999.b03818" ] ] }, { - "id": "91550639.119c38", + "id": "9ff83ab.3d923c8", "type": "set", - "name": "set type", - "xml": "<set>\n<parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />", + "name": "set vnf-request-input.", + "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n", "comments": "", - "x": 1568.1177711486816, - "y": 583.5734205245972, - "z": "e876afdc.6a24f", + "x": 2359.364402770996, + "y": 95.65763854980469, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "f41887bb.544248", - "type": "switchNode", - "name": "switch role", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "id": "4bd89f7e.9676d", + "type": "set", + "name": "set tmp.vidx and ctx.vnf-data", + "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n", "comments": "", - "outputs": 1, - "x": 1240.1175918579102, - "y": 624.9735260009766, - "z": "e876afdc.6a24f", - "wires": [ - [ - "2facef98.25444" - ] - ] + "x": 2386.918113708496, + "y": 49.00000286102295, + "z": "8546294e.bbf628", + "wires": [] }, { - "id": "2facef98.25444", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "523d9c1d.3e7a14", + "type": "call", + "name": "call sdwan-get-site-param", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n", "comments": "", "outputs": 1, - "x": 1410.1175994873047, - "y": 634.9734888076782, - "z": "e876afdc.6a24f", + "x": 2358.005081176758, + "y": 131.10712242126465, + "z": "8546294e.bbf628", "wires": [ - [ - "2de9cb05.be1da4" - ] + [] ] }, { - "id": "6dc0a862.fb8db8", - "type": "switchNode", - "name": "switch location-name", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", + "id": "2f8e9052.03ea2", + "type": "for", + "name": "for cpidx..prop.site.controlpoints", + "xml": "<for index='cpidx' start='0' end='`$prop.site.controlpoints_length`' >\n\t\t\t\t\t\t\t\t\t\n", "comments": "", "outputs": 1, - "x": 1283.117431640625, - "y": 324.97334480285645, - "z": "e876afdc.6a24f", + "x": 1285.0318603515625, + "y": 276.0313186645508, + "z": "8546294e.bbf628", "wires": [ [ - "bd2efb08.1c1158" + "5d6d521c.a38a7c" ] ] }, { - "id": "bd2efb08.1c1158", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", + "id": "5d6d521c.a38a7c", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1447.117603302002, - "y": 324.97334575653076, - "z": "e876afdc.6a24f", + "x": 1528.0313720703125, + "y": 274.03125762939453, + "z": "8546294e.bbf628", "wires": [ [ - "4ee2193.b3e14e8" + "a5905cec.9f577" ] ] }, { - "id": "4ee2193.b3e14e8", - "type": "set", - "name": "set location-name", - "xml": "<set>\n<parameter name='prop.site.location-name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1609.1176147460938, - "y": 324.57340240478516, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "b56118e.cb3ebe8", - "type": "switchNode", - "name": "switch address", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", + "id": "a5905cec.9f577", + "type": "for", + "name": "for cpvidx..service-data.vnfs.vnf_length[]", + "xml": "<for index='cpvidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", "comments": "", "outputs": 1, - "x": 1266.117431640625, - "y": 360.9733486175537, - "z": "e876afdc.6a24f", + "x": 1777.0313720703125, + "y": 272.031289100647, + "z": "8546294e.bbf628", "wires": [ [ - "86891afb.54bc78" + "c5914904.7dd248" ] ] }, { - "id": "86891afb.54bc78", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "c5914904.7dd248", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 1436.1172790527344, - "y": 368.9733476638794, - "z": "e876afdc.6a24f", + "x": 1630.531322479248, + "y": 338.03128933906555, + "z": "8546294e.bbf628", "wires": [ [ - "4e393c27.e3c2c4" + "81562a69.669098" ] ] }, { - "id": "4e393c27.e3c2c4", - "type": "set", - "name": "set location-address", - "xml": "<set>\n<parameter name='prop.site.location-address' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1624.1174545288086, - "y": 364.5733232498169, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "a3f45232.9e1a1", + "id": "81562a69.669098", "type": "switchNode", - "name": "switch postcode", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", + "name": "switch ActivateSiteInstance", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSiteInstance'`\">\n\n \n \n\n", "comments": "", "outputs": 1, - "x": 1267.117431640625, - "y": 402.97330951690674, - "z": "e876afdc.6a24f", + "x": 1826.5317573547363, + "y": 337.0312900543213, + "z": "8546294e.bbf628", "wires": [ [ - "8476b452.fd9df8" + "4dd0f132.ac22d" ] ] }, { - "id": "8476b452.fd9df8", + "id": "4dd0f132.ac22d", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1432.117603302002, - "y": 401.97330951690674, - "z": "e876afdc.6a24f", + "x": 2015.5316467285156, + "y": 336.031259059906, + "z": "8546294e.bbf628", "wires": [ [ - "44bf054e.3e0bdc" + "c19716c9.bf16e8" ] ] }, { - "id": "44bf054e.3e0bdc", - "type": "set", - "name": "set location-postcode", - "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1619.1174545288086, - "y": 403.57332611083984, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "4ca7692.19f0f98", - "type": "switchNode", - "name": "switch controlPoints", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`\">\n", - "comments": "", + "id": "c19716c9.bf16e8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1261.0007247924805, - "y": 670.0002679824829, - "z": "e876afdc.6a24f", + "x": 2169.874858856201, + "y": 352.1174783706665, + "z": "8546294e.bbf628", "wires": [ [ - "6d9c8ede.093ce" + "b380d74e.7f6938" ] ] }, { - "id": "6d9c8ede.093ce", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "b380d74e.7f6938", + "type": "for", + "name": "for loop sidx - Get siteId from servicedata", + "xml": "<for index=\"sidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">", "comments": "", "outputs": 1, - "x": 1421.0007400512695, - "y": 681.0003499984741, - "z": "e876afdc.6a24f", + "x": 2415.5315895080566, + "y": 354.0313606262207, + "z": "8546294e.bbf628", "wires": [ [ - "473f9a91.4991c4" + "586aef3f.c2594" ] ] }, { - "id": "6c8e946.594c76c", - "type": "set", - "name": "set role", - "xml": "<set>\n<parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n", - "comments": "", - "x": 1764.0007648468018, - "y": 602.0002603530884, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "c48a4f4.5838eb", - "type": "set", - "name": "set controlPoint", - "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", - "comments": "", - "x": 1806.0007667541504, - "y": 701.0003480911255, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "99fac312.5a742", - "type": "save", - "name": "update siteInstance configuration in AAI", - "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='generated-site-id' value='`$site-result[0].site-id`' /> \n<parameter name='operational-status' value='Active' />\n", - "comments": "", - "outputs": 1, - "x": 657.0001220703125, - "y": 627.0001001358032, - "z": "e876afdc.6a24f", - "wires": [ - [] - ] - }, - { - "id": "6e5a67bd.c2ddb8", - "type": "execute", - "name": "execute Properties", - "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n", - "comments": "", - "outputs": 1, - "x": 603.0000381469727, - "y": 274.00000190734863, - "z": "e876afdc.6a24f", - "wires": [ - [] - ] - }, - { - "id": "239b469c.39b6fa", - "type": "execute", - "name": "execute split roles", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", - "comments": "", - "outputs": 1, - "x": 1820.6671142578125, - "y": 658.0001821517944, - "z": "e876afdc.6a24f", - "wires": [ - [] - ] - }, - { - "id": "2de9cb05.be1da4", + "id": "586aef3f.c2594", "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", "outputs": 1, - "x": 1567.667251586914, - "y": 638.0001821517944, - "z": "e876afdc.6a24f", + "x": 2141.531894683838, + "y": 451.0313949584961, + "z": "8546294e.bbf628", "wires": [ [ - "6c8e946.594c76c", - "239b469c.39b6fa" + "6ca3ced4.b496f" ] ] }, { - "id": "473f9a91.4991c4", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "id": "6ca3ced4.b496f", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].name == 'name'`\">\n", + "comments": "", "outputs": 1, - "x": 1579.6670875549316, - "y": 685.0001058578491, - "z": "e876afdc.6a24f", + "x": 2301.5321502685547, + "y": 453.03124809265137, + "z": "8546294e.bbf628", "wires": [ [ - "c48a4f4.5838eb", - "363cf22d.62d78e" + "e4e196a3.719d08" ] ] }, { - "id": "363cf22d.62d78e", - "type": "execute", - "name": "execute split control points", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", + "id": "e4e196a3.719d08", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1848.667106628418, - "y": 762.0001888275146, - "z": "e876afdc.6a24f", + "x": 2453.5323219299316, + "y": 452.03124809265137, + "z": "8546294e.bbf628", "wires": [ - [] + [ + "79a83f73.ae9af" + ] ] }, { - "id": "a0b5938f.d00a8", + "id": "9f3ec9f2.b22258", "type": "switchNode", - "name": "switch latitude", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", + "name": "switch name match with controlPoint", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].value == $prop.site.controlpoints[$cpidx]`\">\n", "comments": "", "outputs": 1, - "x": 1257.333740234375, - "y": 447.0000867843628, - "z": "e876afdc.6a24f", + "x": 2690.0319023132324, + "y": 462.031436920166, + "z": "8546294e.bbf628", "wires": [ [ - "b21592f4.5618f" + "2d878bd7.4ff264" ] ] }, { - "id": "b21592f4.5618f", + "id": "2d878bd7.4ff264", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1433.3335876464844, - "y": 442.0000457763672, - "z": "e876afdc.6a24f", + "x": 2899.031665802002, + "y": 455.03130531311035, + "z": "8546294e.bbf628", "wires": [ [ - "29af6eef.bf06b2" + "3590859d.52442a" ] ] }, { - "id": "29af6eef.bf06b2", - "type": "set", - "name": "set location-latitude", - "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1607.333595275879, - "y": 440.6000623703003, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "caf25c5.4962fa", - "type": "switchNode", - "name": "switch longitude", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", + "id": "95b453fd.ee43a", + "type": "for", + "name": "for loop lidx - Get siteId from servicedata", + "xml": "<for index=\"lidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">", "comments": "", "outputs": 1, - "x": 1260.333740234375, - "y": 487.00012969970703, - "z": "e876afdc.6a24f", + "x": 2483.0317192077637, + "y": 566.0313177108765, + "z": "8546294e.bbf628", "wires": [ [ - "7df2c337.3c1b4c" + "29fb7e8d.917742" ] ] }, { - "id": "7df2c337.3c1b4c", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "29fb7e8d.917742", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 1432.3337478637695, - "y": 482.00017166137695, - "z": "e876afdc.6a24f", + "x": 2273.0313606262207, + "y": 640.0315551757812, + "z": "8546294e.bbf628", "wires": [ [ - "86c3a1c7.6636a" + "43fe6c1f.7a83e4" ] ] }, { - "id": "86c3a1c7.6636a", - "type": "set", - "name": "set location-latitude", - "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "id": "43fe6c1f.7a83e4", + "type": "switchNode", + "name": "switch siteId", + "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].name == 'siteId'`\">\n", "comments": "", - "x": 1614.3336029052734, - "y": 485.6000232696533, - "z": "e876afdc.6a24f", - "wires": [] + "outputs": 1, + "x": 2419.0316047668457, + "y": 643.0313415527344, + "z": "8546294e.bbf628", + "wires": [ + [ + "48abb19b.d8fe" + ] + ] }, { - "id": "4e291944.287288", + "id": "48abb19b.d8fe", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1423.3337478637695, - "y": 532.0001745223999, - "z": "e876afdc.6a24f", + "x": 2566.031913757324, + "y": 641.0313110351562, + "z": "8546294e.bbf628", "wires": [ [ - "f818ecd2.ba80f" + "2780c7bb.98f1c8" ] ] }, { - "id": "2bbb97af.762cc8", + "id": "2780c7bb.98f1c8", "type": "set", - "name": "set emails", - "xml": "<set>\n<parameter name='prop.site.emails' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "name": "set siteId in control point", + "xml": "<set>\n<parameter name='prop.site.controlpoints[$cpidx]' value='`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].value`' />\n\n", "comments": "", - "x": 1781.3334426879883, - "y": 500.6000266075134, - "z": "e876afdc.6a24f", + "x": 2745.0322227478027, + "y": 643.631411075592, + "z": "8546294e.bbf628", "wires": [] }, { - "id": "e068ac07.3a75f", - "type": "switchNode", - "name": "switch emails", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", - "comments": "", + "id": "3590859d.52442a", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1250.3338165283203, - "y": 532.0001745223999, - "z": "e876afdc.6a24f", + "x": 2227.0316123962402, + "y": 566.0313024520874, + "z": "8546294e.bbf628", "wires": [ [ - "4e291944.287288" + "95b453fd.ee43a" ] ] }, { - "id": "3f69ab6a.936704", - "type": "execute", - "name": "execute split emails", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", + "id": "471b0999.b03818", + "type": "record", + "name": "record", + "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sdwan-site-activateeeee-delete\"/>\n<parameter name=\"field3\" value='`$prop.site.sdwan`'/>\n", "comments": "", "outputs": 1, - "x": 1806.9997863769531, - "y": 546.9999294281006, - "z": "e876afdc.6a24f", + "x": 2300.0313873291016, + "y": 177.03126049041748, + "z": "8546294e.bbf628", "wires": [ [] ] }, { - "id": "f818ecd2.ba80f", + "id": "79a83f73.ae9af", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1585.333755493164, - "y": 533.0000920295715, - "z": "e876afdc.6a24f", + "x": 2720.5314903259277, + "y": 401.031286239624, + "z": "8546294e.bbf628", "wires": [ [ - "2bbb97af.762cc8", - "3f69ab6a.936704" + "9f3ec9f2.b22258" ] ] - }, - { - "id": "69c072d6.f6ae7c", - "type": "set", - "name": "set siteId", - "xml": "<set>\n<parameter name='prop.site.siteId' value=\"\" />\n\n", - "comments": "", - "x": 1220.0000762939453, - "y": 762.0000247955322, - "z": "e876afdc.6a24f", - "wires": [] - }, - { - "id": "c77bd4e4.651878", - "type": "comment", - "name": "should be null in request", - "info": "", - "comments": "", - "x": 1229, - "y": 732.999979019165, - "z": "e876afdc.6a24f", - "wires": [] } -]
\ No newline at end of file +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json index 761c6ebb..131c2ed0 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json @@ -1,20 +1,20 @@ [ { - "id": "3fa6c370.2c61bc", + "id": "1fe30678.9b6c5a", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 168, - "y": 73, - "z": "6855f1c0.cd5d9", + "x": 122.03125, + "y": 82.03125, + "z": "c632d855.425948", "wires": [ [ - "ac645450.910698" + "6f581451.d6d46c" ] ] }, { - "id": "ac645450.910698", + "id": "6f581451.d6d46c", "type": "service-logic", "name": "GENERIC-RESOURCE-API ${project.version}", "module": "GENERIC-RESOURCE-API", @@ -22,925 +22,419 @@ "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": 267.2856979370117, - "y": 147.23810789268464, - "z": "6855f1c0.cd5d9", + "x": 221.31694793701172, + "y": 156.26935789268464, + "z": "c632d855.425948", "wires": [ [ - "5fcc8bf6.3fd144" + "ffdaf6e4.8fe2a8" ] ] }, { - "id": "5fcc8bf6.3fd144", + "id": "ffdaf6e4.8fe2a8", "type": "method", "name": "method site-vnf-topology-operation-create", "xml": "<method rpc='site-vnf-topology-operation-create' mode='sync'>\n", "comments": "", "outputs": 1, - "x": 288.4286117553711, - "y": 236.99999639671296, - "z": "6855f1c0.cd5d9", + "x": 242.4598617553711, + "y": 246.03124639671296, + "z": "c632d855.425948", "wires": [ [ - "47608ee1.25de2" + "4928aa8e.b25464" ] ] }, { - "id": "47608ee1.25de2", + "id": "4928aa8e.b25464", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 268.6666564941406, - "y": 408.66666814964265, - "z": "6855f1c0.cd5d9", + "x": 222.69790649414062, + "y": 417.69791814964265, + "z": "c632d855.425948", "wires": [ [ - "4ce2c94.4697a38", - "fa21f7d4.da1878", - "9f3ac02c.307b8", - "fd3d2238.2c1fe", - "e2f2310b.40c4e", - "5ac01571.a9444c", - "8b6a96f4.ee9ed8", - "e97be576.bbc408", - "ec41d40.2a2183", - "7988a83e.fa96c8", - "5922b71f.a74538" + "290eb35e.b9e26c", + "2113cd25.2b0aa2", + "1e868a78.080646", + "63b1d38d.89ffcc", + "c8bfa3ce.63b66", + "81b868ec.b075e8", + "8129d44e.2d4828", + "66b4b0a.218e25", + "f33cfcda.f0c5d", + "87aab9f9.450f38", + "c3c6696a.6ae368", + "b6127d24.eca33", + "82b5aeb7.909dc" ] ] }, { - "id": "fa21f7d4.da1878", + "id": "2113cd25.2b0aa2", "type": "set", "name": "set vnf-level-oper-status to Created", "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n", "comments": "", - "x": 686.8133697509766, - "y": 649.6705284118652, - "z": "6855f1c0.cd5d9", + "x": 650.8446578979492, + "y": 836.7018160820007, + "z": "c632d855.425948", "wires": [] }, { - "id": "4ce2c94.4697a38", + "id": "290eb35e.b9e26c", "type": "set", "name": "copy input data to service data", "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-index`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n", "comments": "", - "x": 673.6665191650391, - "y": 547.6667442321777, - "z": "6855f1c0.cd5d9", + "x": 637.6978073120117, + "y": 734.6980319023132, + "z": "c632d855.425948", "wires": [] }, { - "id": "8b6a96f4.ee9ed8", + "id": "81b868ec.b075e8", "type": "execute", "name": "execute generate-vnf-index", "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n", "comments": "", "outputs": 1, - "x": 666.0000152587891, - "y": 486.33337020874023, - "z": "6855f1c0.cd5d9", + "x": 622.0313415527344, + "y": 661.3647031784058, + "z": "c632d855.425948", "wires": [ [] ] }, { - "id": "9f3ac02c.307b8", + "id": "1e868a78.080646", "type": "set", "name": "set vnf-index to service data", "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-index`' />\n", "comments": "", - "x": 664.0000152587891, - "y": 603.3333702087402, - "z": "6855f1c0.cd5d9", + "x": 628.0313034057617, + "y": 790.3646578788757, + "z": "c632d855.425948", "wires": [] }, { - "id": "fd3d2238.2c1fe", + "id": "63b1d38d.89ffcc", "type": "switchNode", "name": "switch service-data.vnfs.vnf_length", "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", "comments": "", "outputs": 1, - "x": 697.9999771118164, - "y": 287.33335971832275, - "z": "6855f1c0.cd5d9", + "x": 652.0312271118164, + "y": 296.36460971832275, + "z": "c632d855.425948", "wires": [ [ - "af77c768.729e28", - "9f82c38a.b1c5e" + "65a65f43.d7119", + "e1777473.61ad38" ] ] }, { - "id": "af77c768.729e28", + "id": "65a65f43.d7119", "type": "other", "name": "NULL", "xml": "<outcome value=''>\n", "comments": "", "outputs": 1, - "x": 932.7143630981445, - "y": 282.4761800765991, - "z": "6855f1c0.cd5d9", + "x": 886.7456130981445, + "y": 291.5074300765991, + "z": "c632d855.425948", "wires": [ [ - "7f22439b.b7e59c" + "1145bf21.5d5e11" ] ] }, { - "id": "7f22439b.b7e59c", + "id": "1145bf21.5d5e11", "type": "set", "name": "set vnf-index=0", "xml": "<set>\n<parameter name='vnf-index' value='0' />\n", "comments": "", - "x": 1093.0000686645508, - "y": 282.4762716293335, - "z": "6855f1c0.cd5d9", + "x": 1047.0313186645508, + "y": 291.5075216293335, + "z": "c632d855.425948", "wires": [] }, { - "id": "9f82c38a.b1c5e", + "id": "e1777473.61ad38", "type": "other", "name": "other", "xml": "<outcome value='Other'>\n", "comments": "", "outputs": 1, - "x": 929.1429023742676, - "y": 315.76201152801514, - "z": "6855f1c0.cd5d9", + "x": 883.1741523742676, + "y": 324.79326152801514, + "z": "c632d855.425948", "wires": [ [ - "f21508e6.2fefd8" + "43f60e81.7293" ] ] }, { - "id": "d3b6023e.8241", + "id": "3c64116d.221f3e", "type": "set", "name": "set vnf-index = vnf_length", "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n", "comments": "", - "x": 1322.000144958496, - "y": 294.04773712158203, - "z": "6855f1c0.cd5d9", + "x": 1276.031394958496, + "y": 303.07898712158203, + "z": "c632d855.425948", "wires": [] }, { - "id": "386f3e01.1a8bf2", + "id": "2bf3f4e0.d3268c", "type": "for", "name": "for each existing VNF", "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", "comments": "", "outputs": 1, - "x": 1310.4287643432617, - "y": 329.0477089881897, - "z": "6855f1c0.cd5d9", + "x": 1264.4600143432617, + "y": 338.0789589881897, + "z": "c632d855.425948", "wires": [ [ - "29eb3ce3.eefee4" + "8fa582ed.781d1" ] ] }, { - "id": "f21508e6.2fefd8", + "id": "43f60e81.7293", "type": "block", "name": "block", "xml": "<block>\n", "atomic": "false", "comments": "", "outputs": 1, - "x": 1063.8571853637695, - "y": 317.761981010437, - "z": "6855f1c0.cd5d9", + "x": 1017.8884353637695, + "y": 326.793231010437, + "z": "c632d855.425948", "wires": [ [ - "d3b6023e.8241", - "386f3e01.1a8bf2" + "3c64116d.221f3e", + "2bf3f4e0.d3268c" ] ] }, { - "id": "29eb3ce3.eefee4", + "id": "8fa582ed.781d1", "type": "switchNode", "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id", "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n", "comments": "", "outputs": 1, - "x": 1703.714500427246, - "y": 329.6191930770874, - "z": "6855f1c0.cd5d9", + "x": 1657.745750427246, + "y": 338.6504430770874, + "z": "c632d855.425948", "wires": [ [ - "f4656079.b7339" + "d1ebb0ef.628be" ] ] }, { - "id": "f4656079.b7339", + "id": "d1ebb0ef.628be", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1985.000202178955, - "y": 328.190598487854, - "z": "6855f1c0.cd5d9", + "x": 1939.031452178955, + "y": 337.221848487854, + "z": "c632d855.425948", "wires": [ [ - "a7f60449.092558" + "43f17df2.e71f94" ] ] }, { - "id": "a7f60449.092558", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n", - "comments": "", - "x": 2113.5715713500977, - "y": 379.19061279296875, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "ea3b233.535f1e", + "id": "25d81b97.ed5734", "type": "comment", "name": "make sure this vnf-id doesn't exist already", "info": "", "comments": "", - "x": 1672.8571166992188, - "y": 293.1905851364136, - "z": "6855f1c0.cd5d9", + "x": 1626.8883666992188, + "y": 302.2218351364136, + "z": "c632d855.425948", "wires": [] }, { - "id": "e2f2310b.40c4e", + "id": "c8bfa3ce.63b66", "type": "set", "name": "set new vnf_length", "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n", "comments": "", - "x": 640.0000152587891, - "y": 441.33337020874023, - "z": "6855f1c0.cd5d9", + "x": 604.0313034057617, + "y": 628.3646578788757, + "z": "c632d855.425948", "wires": [] }, { - "id": "5ac01571.a9444c", - "type": "for", - "name": "for loop i - VNF input parameters", - "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n", - "comments": "", - "outputs": 1, - "x": 679.1047325134277, - "y": 370.0678906440735, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "93e1cbb7.57ce48" - ] - ] - }, - { - "id": "7988a83e.fa96c8", + "id": "f33cfcda.f0c5d", "type": "returnSuccess", "name": "return success", "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n", "comments": "", - "x": 642.0000419616699, - "y": 872.5969972610474, - "z": "6855f1c0.cd5d9", + "x": 606.0313301086426, + "y": 1059.6282849311829, + "z": "c632d855.425948", "wires": [] }, { - "id": "e97be576.bbc408", + "id": "8129d44e.2d4828", "type": "save", "name": "save siteInstance configuration in AAI", "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $prop.vnf-index' >\n<parameter name='id' value='`$prop.vnf-index`' /> \n<parameter name='name' value='`$prop.site.name`' />\n<parameter name='description' value='`$prop.site.description`' />\n<parameter name='type' value='prop.site.type' />\n<parameter name='role' value='prop.site.role' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-index + '/vnf-data/'` \" />\n", "comments": "", "outputs": 1, - "x": 690.6667861938477, - "y": 744.819028377533, - "z": "6855f1c0.cd5d9", + "x": 654.6980743408203, + "y": 931.8503160476685, + "z": "c632d855.425948", "wires": [ [] ] }, { - "id": "ec41d40.2a2183", + "id": "66b4b0a.218e25", "type": "save", "name": "save service relationship in AAI", "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"site-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/site-resources/site-resource/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"site-resource.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />", "comments": "", "outputs": 1, - "x": 679.6667900085449, - "y": 807.5969109535217, - "z": "6855f1c0.cd5d9", + "x": 643.6980781555176, + "y": 994.6281986236572, + "z": "c632d855.425948", "wires": [ [] ] }, { - "id": "5922b71f.a74538", + "id": "87aab9f9.450f38", "type": "set", "name": "set vnf-index and vnf-object-path", "xml": "<set>\n<parameter name='vnfId' value='`$prop.vnf-index`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-index + '/vnf-data/'` \" />", "comments": "", - "x": 681.0000381469727, - "y": 693.5967993736267, - "z": "6855f1c0.cd5d9", + "x": 645.0313262939453, + "y": 880.6280870437622, + "z": "c632d855.425948", "wires": [] }, { - "id": "93e1cbb7.57ce48", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 1033.0001964569092, - "y": 637.3333625793457, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "b62a8412.3c1788", - "a29c24e2.c2b698", - "185872ae.4cf93d", - "a2c31dc7.abd3", - "518b2b7f.cf5094", - "83798f0c.55ca3", - "558728b4.014198", - "960e77d0.8444e8", - "8079e916.7357a8", - "27a90ae1.17e976", - "e0bb5acb.0941c8", - "4078d1f3.66f1c" - ] - ] - }, - { - "id": "518b2b7f.cf5094", - "type": "switchNode", - "name": "switch name", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", - "comments": "", - "outputs": 1, - "x": 1302.2220001220703, - "y": 503.3333148956299, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "a8e94b67.c81878" - ] - ] - }, - { - "id": "a8e94b67.c81878", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1480.2220134735107, - "y": 506.3333148956299, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "72cf7d47.6ab0e4" - ] - ] - }, - { - "id": "72cf7d47.6ab0e4", - "type": "set", - "name": "set name", - "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1627.222023010254, - "y": 505.933310508728, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "b62a8412.3c1788", - "type": "switchNode", - "name": "switch type", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", - "comments": "", - "outputs": 1, - "x": 1281.1176719665527, - "y": 801.3067646026611, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "61dfbdbd.9f7ea4" - ] - ] - }, - { - "id": "61dfbdbd.9f7ea4", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1460.1175155639648, - "y": 802.3066844940186, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "10f1f531.8f5fbb" - ] - ] - }, - { - "id": "10f1f531.8f5fbb", - "type": "set", - "name": "set type", - "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />", - "comments": "", - "x": 1610.1175270080566, - "y": 803.906699180603, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "a29c24e2.c2b698", - "type": "switchNode", - "name": "switch role", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", - "comments": "", - "outputs": 1, - "x": 1282.1173477172852, - "y": 845.3068046569824, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "5bd37c75.4f37f4" - ] - ] - }, - { - "id": "5bd37c75.4f37f4", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1452.1173553466797, - "y": 855.3067674636841, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "1ce2a35f.a33a2d" - ] - ] - }, - { - "id": "83798f0c.55ca3", - "type": "switchNode", - "name": "switch location-name", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", - "comments": "", - "outputs": 1, - "x": 1325.1171875, - "y": 545.3066234588623, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "a3698113.22606" - ] - ] - }, - { - "id": "a3698113.22606", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1489.117359161377, - "y": 545.3066244125366, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "30c433ef.1afe7c" - ] - ] - }, - { - "id": "30c433ef.1afe7c", - "type": "set", - "name": "set location-name", - "xml": "<set>\n<parameter name='prop.site.location-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1651.1173706054688, - "y": 544.906681060791, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "558728b4.014198", - "type": "switchNode", - "name": "switch address", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", - "comments": "", - "outputs": 1, - "x": 1308.1171875, - "y": 581.3066272735596, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "461f7e3d.fc2b6" - ] - ] - }, - { - "id": "461f7e3d.fc2b6", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1478.1170349121094, - "y": 589.3066263198853, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "95768555.59f738" - ] - ] - }, - { - "id": "95768555.59f738", - "type": "set", - "name": "set location-address", - "xml": "<set>\n<parameter name='prop.site.location-address' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1666.1172103881836, - "y": 584.9066019058228, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "960e77d0.8444e8", - "type": "switchNode", - "name": "switch postcode", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", - "comments": "", - "outputs": 1, - "x": 1309.1171875, - "y": 623.3065881729126, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "2481d837.14c698" - ] - ] - }, - { - "id": "2481d837.14c698", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1474.117359161377, - "y": 622.3065881729126, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "f6fca1a2.7d9b4" - ] - ] - }, - { - "id": "f6fca1a2.7d9b4", - "type": "set", - "name": "set location-postcode", - "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", - "comments": "", - "x": 1661.1172103881836, - "y": 623.9066047668457, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "185872ae.4cf93d", - "type": "switchNode", - "name": "switch controlPoints", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`\">\n", - "comments": "", - "outputs": 1, - "x": 1303.0004806518555, - "y": 890.3335466384888, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "e1f3da86.e05088" - ] - ] - }, - { - "id": "e1f3da86.e05088", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1463.0004959106445, - "y": 901.33362865448, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "88f8ac7d.16131" - ] - ] - }, - { - "id": "cde157fb.eaac18", - "type": "set", - "name": "set role", - "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n", - "comments": "", - "x": 1806.0005207061768, - "y": 822.3335390090942, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "ecdf21f6.a7851", - "type": "set", - "name": "set controlPoint", - "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", - "comments": "", - "x": 1848.0005226135254, - "y": 921.3336267471313, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "56e0196c.fe1028", - "type": "execute", - "name": "execute split roles", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", + "id": "c3c6696a.6ae368", + "type": "for", + "name": "for loop idx - VNF input parameters", + "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n", "comments": "", "outputs": 1, - "x": 1862.6668701171875, - "y": 878.3334608078003, - "z": "6855f1c0.cd5d9", - "wires": [ - [] - ] - }, - { - "id": "1ce2a35f.a33a2d", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1609.667007446289, - "y": 858.3334608078003, - "z": "6855f1c0.cd5d9", + "x": 638.0313415527344, + "y": 435.0313129425049, + "z": "c632d855.425948", "wires": [ [ - "cde157fb.eaac18", - "56e0196c.fe1028" + "8cb85abf.a9b198" ] ] }, { - "id": "88f8ac7d.16131", + "id": "8cb85abf.a9b198", "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "name": "block", + "xml": "<block>\n", + "atomic": "false", + "comments": "", "outputs": 1, - "x": 1621.6668434143066, - "y": 905.333384513855, - "z": "6855f1c0.cd5d9", + "x": 852.809684753418, + "y": 432.5868968963623, + "z": "c632d855.425948", "wires": [ [ - "ecdf21f6.a7851", - "913d9445.5019a8" + "e6a0ec42.6ba", + "cdd1aefb.fa2f8" ] ] }, { - "id": "913d9445.5019a8", + "id": "e6a0ec42.6ba", "type": "execute", - "name": "execute split control points", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", + "name": "execute split parameterName", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n", "comments": "", "outputs": 1, - "x": 1890.666862487793, - "y": 982.3334674835205, - "z": "6855f1c0.cd5d9", + "x": 1049.0658874511719, + "y": 410.3350353240967, + "z": "c632d855.425948", "wires": [ [] ] }, { - "id": "8079e916.7357a8", - "type": "switchNode", - "name": "switch latitude", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", - "comments": "", - "outputs": 1, - "x": 1299.33349609375, - "y": 667.3333654403687, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "d72cdc6.5e2602" - ] - ] - }, - { - "id": "d72cdc6.5e2602", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1475.3333435058594, - "y": 662.333324432373, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "f171e729.d22298" - ] - ] - }, - { - "id": "f171e729.d22298", + "id": "cdd1aefb.fa2f8", "type": "set", - "name": "set location-latitude", - "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "name": "set parameterName", + "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n", "comments": "", - "x": 1649.333351135254, - "y": 660.9333410263062, - "z": "6855f1c0.cd5d9", + "x": 1018.5103149414062, + "y": 447.3351516723633, + "z": "c632d855.425948", "wires": [] }, { - "id": "27a90ae1.17e976", - "type": "switchNode", - "name": "switch longitude", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", - "comments": "", - "outputs": 1, - "x": 1302.33349609375, - "y": 707.3334083557129, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "32eefde6.ce89c2" - ] - ] - }, - { - "id": "32eefde6.ce89c2", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1474.3335037231445, - "y": 702.3334503173828, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "fdc73161.cebd7" - ] - ] - }, - { - "id": "fdc73161.cebd7", + "id": "b6127d24.eca33", "type": "set", - "name": "set location-latitude", - "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "name": "set vnf-request-input.", + "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n", "comments": "", - "x": 1656.3333587646484, - "y": 705.9333019256592, - "z": "6855f1c0.cd5d9", + "x": 600.0309600830078, + "y": 509.3560276031494, + "z": "c632d855.425948", "wires": [] }, { - "id": "86d304b7.c70368", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", + "id": "82b5aeb7.909dc", + "type": "call", + "name": "call sdwan-get-site-param", + "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n", "comments": "", "outputs": 1, - "x": 1465.3335037231445, - "y": 752.3334531784058, - "z": "6855f1c0.cd5d9", + "x": 616.0313262939453, + "y": 541.3562316894531, + "z": "c632d855.425948", "wires": [ - [ - "63e2146a.caa4bc" - ] + [] ] }, { - "id": "d126c16e.ed1c9", - "type": "set", - "name": "set emails", - "xml": "<set>\n<parameter name='prop.site.emails' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "id": "43f17df2.e71f94", + "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": 1823.3331985473633, - "y": 720.9333052635193, - "z": "6855f1c0.cd5d9", + "x": 2067.6028213500977, + "y": 388.22186279296875, + "z": "c632d855.425948", "wires": [] }, { - "id": "a2c31dc7.abd3", - "type": "switchNode", - "name": "switch emails", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", - "comments": "", - "outputs": 1, - "x": 1292.3335723876953, - "y": 752.3334531784058, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "86d304b7.c70368" - ] - ] - }, - { - "id": "36b11d40.243472", - "type": "execute", - "name": "execute split emails", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", - "comments": "", - "outputs": 1, - "x": 1848.9995422363281, - "y": 767.3332080841064, - "z": "6855f1c0.cd5d9", - "wires": [ - [] - ] - }, - { - "id": "63e2146a.caa4bc", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1627.333511352539, - "y": 753.3333706855774, - "z": "6855f1c0.cd5d9", - "wires": [ - [ - "d126c16e.ed1c9", - "36b11d40.243472" - ] - ] - }, - { - "id": "ac6dde9e.14fd8", + "id": "ee62377b.687508", "type": "comment", "name": "Take the parameter names by removing prefix", "info": "", "comments": "", - "x": 1407.0001831054688, - "y": 382.6666793823242, - "z": "6855f1c0.cd5d9", - "wires": [] - }, - { - "id": "e0bb5acb.0941c8", - "type": "execute", - "name": "execute split parameterName", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/> \n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n", - "comments": "", - "outputs": 1, - "x": 1360.0348815917969, - "y": 413.64584732055664, - "z": "6855f1c0.cd5d9", - "wires": [ - [] - ] - }, - { - "id": "4078d1f3.66f1c", - "type": "set", - "name": "set parameterName", - "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n", - "comments": "", - "x": 1327.4792137145996, - "y": 447.6458492279053, - "z": "6855f1c0.cd5d9", + "x": 1361.0314331054688, + "y": 391.6979293823242, + "z": "c632d855.425948", "wires": [] } -]
\ No newline at end of file +] diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json index ce1905c6..26456855 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json @@ -1,942 +1,733 @@ [ { - "id": "4957f22c.5e2f1c", - "type": "service-logic", - "name": "GENERIC-RESOURCE-API ${project.version}", - "module": "GENERIC-RESOURCE-API", - "version": "${project.version}", - "comments": "", - "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>", - "outputs": 1, - "x": 212, - "y": 189.23809814453125, - "z": "a0c86160.b392c", - "wires": [ - [ - "c6d0a907.91d928" - ] - ] - }, - { - "id": "91cb305c.596c5", + "id": "c9ac4983.326288", "type": "dgstart", "name": "DGSTART", "outputs": 1, - "x": 136.71429443359375, - "y": 148.99998664855957, - "z": "a0c86160.b392c", + "x": 259.03125, + "y": 199.03125, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "4957f22c.5e2f1c" + "a919b1fb.cf167" ] ] }, { - "id": "c6d0a907.91d928", - "type": "method", - "name": "method site-vnf-topology-operation-deactivate", - "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>", + "id": "a919b1fb.cf167", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API ${project.version}", + "module": "GENERIC-RESOURCE-API", + "version": "${project.version}", "comments": "", + "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>", "outputs": 1, - "x": 205.1429214477539, - "y": 228.99998092651367, - "z": "a0c86160.b392c", + "x": 471.03125381469727, + "y": 271.0312671661377, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "1123bd39.e47163" + "20189583.354efa" ] ] }, { - "id": "1123bd39.e47163", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "id": "20189583.354efa", + "type": "method", + "name": "sdwan-get-site-param", + "xml": "<method rpc='sdwan-get-site-param' mode='sync'>\n", + "comments": "", "outputs": 1, - "x": 245.88101959228516, - "y": 300.69349193573, - "z": "a0c86160.b392c", + "x": 459.0313720703125, + "y": 359.03125, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "cb3ab0a3.18f7a", - "9f93822a.38acf", - "79d541bc.c80a2", - "fd9e7734.9c2008", - "1b149ea5.120f71", - "75e2f346.784bbc", - "afea211a.e0c0a", - "f2b6a437.7e6008" + "c2456569.00bd88" ] ] }, { - "id": "1b149ea5.120f71", + "id": "c2456569.00bd88", "type": "block", "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "xml": "<block atomic=\"true\">\n", + "atomic": "false", + "comments": "", "outputs": 1, - "x": 652.9286193847656, - "y": 165.80950736999512, - "z": "a0c86160.b392c", + "x": 466.03126525878906, + "y": 445.0313081741333, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "3c6f9bb2.b231d4", - "233b3043.9673c", - "a8b21c1e.3abec", - "35b35733.634ca8" + "4e2d26a4.4c1808" ] ] }, { - "id": "3c6f9bb2.b231d4", - "type": "switchNode", - "name": "switch service-data.vnfs.vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", + "id": "4e2d26a4.4c1808", + "type": "for", + "name": "for each sdwan-get-request-input-param", + "xml": "<for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >\n\n", "comments": "", "outputs": 1, - "x": 932.817626953125, - "y": 191.14282512664795, - "z": "a0c86160.b392c", + "x": 502.6980285644531, + "y": 527.697904586792, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "bcdc7cd3.0b4fb", - "e83c4587.34b728" + "e3603253.51629" ] ] }, { - "id": "bcdc7cd3.0b4fb", - "type": "other", - "name": "outcome Null", - "xml": "<outcome value=''>\n", + "id": "e3603253.51629", + "type": "block", + "name": "block", + "xml": "<block>\n", + "atomic": "false", "comments": "", "outputs": 1, - "x": 1186.4287490844727, - "y": 172.8095121383667, - "z": "a0c86160.b392c", + "x": 789.5315780639648, + "y": 445.03135204315186, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "e5a3d434.f56108" + "4fbcc568.ce097c", + "9e4fbe84.7d2fb", + "ed14265a.99d948", + "773d0e91.45e91", + "a690711f.67d26", + "f96e2736.deb9e8", + "5bc913df.9a308c", + "8619f18f.0dd93", + "1ee73b7b.ea9285", + "5cd558f4.7f3258", + "dbf73ee2.461c2", + "bbcb741c.0eb968", + "cd952f17.46c77" ] ] }, { - "id": "e5a3d434.f56108", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n", + "id": "4fbcc568.ce097c", + "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": 1360.4287643432617, - "y": 172.8095121383667, - "z": "a0c86160.b392c", + "x": 993.0323181152344, + "y": 814.032012462616, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "e83c4587.34b728", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", + "id": "9e4fbe84.7d2fb", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", "comments": "", "outputs": 1, - "x": 1169.9287185668945, - "y": 208.80952262878418, - "z": "a0c86160.b392c", - "wires": [ - [ - "da47adb6.7e467" - ] - ] - }, - { - "id": "da47adb6.7e467", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1351.9289169311523, - "y": 219.80952835083008, - "z": "a0c86160.b392c", + "x": 1009.0312881469727, + "y": 241.031325340271, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "d1af55da.8f3b18", - "6cc13507.3cb79c" + "3261cfb2.83caf" ] ] }, { - "id": "6cc13507.3cb79c", - "type": "switchNode", - "name": "switch tmp.vidx ", - "xml": "<switch test=\"`$tmp.vidx`\">\n\n", + "id": "3261cfb2.83caf", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1541.928810119629, - "y": 236.80952262878418, - "z": "a0c86160.b392c", + "x": 1151.0312881469727, + "y": 242.031325340271, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "7a52469e.0fa9f8" + "e4e6bc65.0ec81" ] ] }, { - "id": "a8b21c1e.3abec", - "type": "switchNode", - "name": "switch vnf-level-oper-status", - "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n", + "id": "e4e6bc65.0ec81", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.device.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "outputs": 1, - "x": 896.0954284667969, - "y": 286.69837856292725, - "z": "a0c86160.b392c", - "wires": [ - [ - "263aaa11.82a2b6", - "59d6bbbd.f09a24" - ] - ] + "x": 1285.0312881469727, + "y": 242.63133144378662, + "z": "33fa79d5.e5dbd6", + "wires": [] }, { - "id": "263aaa11.82a2b6", - "type": "outcome", - "name": "outcome Active", - "xml": "<outcome value='Active'>\n", + "id": "ed14265a.99d948", + "type": "switchNode", + "name": "switch name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`\">\n", "comments": "", "outputs": 1, - "x": 1202.9287414550781, - "y": 267.8095006942749, - "z": "a0c86160.b392c", + "x": 1005.0313949584961, + "y": 332.0312833786011, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "894517c4.94cc68" + "81ce8f79.a82a1" ] ] }, { - "id": "59d6bbbd.f09a24", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", + "id": "81ce8f79.a82a1", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1170.9287414550781, - "y": 307.8095006942749, - "z": "a0c86160.b392c", + "x": 1183.0314083099365, + "y": 335.0312833786011, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "de14e045.7333a" + "6599a894.64adf8" ] ] }, { - "id": "de14e045.7333a", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />", + "id": "6599a894.64adf8", + "type": "set", + "name": "set name", + "xml": "<set>\n<parameter name='prop.site.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 1328.4287414550781, - "y": 307.8095006942749, - "z": "a0c86160.b392c", + "x": 1330.0314178466797, + "y": 334.6312789916992, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "233b3043.9673c", + "id": "5cd558f4.7f3258", "type": "switchNode", - "name": "switch vnf-id", - "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n", + "name": "switch type", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n", "comments": "", "outputs": 1, - "x": 874.9287261962891, - "y": 131.8094997406006, - "z": "a0c86160.b392c", + "x": 983.9270668029785, + "y": 630.0047330856323, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "bd1b23ac.08604" + "48783360.87fe7c" ] ] }, { - "id": "bd1b23ac.08604", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", + "id": "48783360.87fe7c", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1017.9287185668945, - "y": 131.80950260162354, - "z": "a0c86160.b392c", + "x": 1162.9269104003906, + "y": 631.0046529769897, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "78d81ec0.02c25" + "b59fb35a.098b9" ] ] }, { - "id": "78d81ec0.02c25", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-information.vnf-id is a required input\" />\n", + "id": "b59fb35a.098b9", + "type": "set", + "name": "set type", + "xml": "<set>\n<parameter name='prop.site.type' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value='true' />", "comments": "", - "x": 1166.4287185668945, - "y": 131.80950164794922, - "z": "a0c86160.b392c", + "x": 1312.9269218444824, + "y": 632.6046676635742, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "d1af55da.8f3b18", - "type": "for", - "name": "for vidx..service-data.vnfs.vnf[]", - "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", - "comments": "", - "outputs": 1, - "x": 1587.428840637207, - "y": 198.8095121383667, - "z": "a0c86160.b392c", - "wires": [ - [ - "ea3ec79e.bdec18" - ] - ] - }, - { - "id": "ea3ec79e.bdec18", + "id": "dbf73ee2.461c2", "type": "switchNode", - "name": "switch vnf-id found", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n", + "name": "switch role", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", "comments": "", "outputs": 1, - "x": 1873.428840637207, - "y": 198.8095121383667, - "z": "a0c86160.b392c", + "x": 984.9267425537109, + "y": 674.0047731399536, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "a7ba6ae5.977098" + "8ceba6c3.5c88c8" ] ] }, { - "id": "a7ba6ae5.977098", + "id": "8ceba6c3.5c88c8", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 2058.9289169311523, - "y": 198.80951404571533, - "z": "a0c86160.b392c", + "x": 1154.9267501831055, + "y": 684.0047359466553, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "4dbc76e0.8d7858" + "832f2789.d30da8" ] ] }, { - "id": "4dbc76e0.8d7858", - "type": "set", - "name": "set tmp.vidx and ctx.vnf-data", - "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n", - "comments": "", - "x": 2266.928840637207, - "y": 198.8095121383667, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "5ac1b74d.5a62b8", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-information.vnf-id not found in service-data\" />\n", - "comments": "", - "x": 1833.428810119629, - "y": 236.80952262878418, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "7a52469e.0fa9f8", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>\n", + "id": "773d0e91.45e91", + "type": "switchNode", + "name": "switch location-name", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`\">\n", "comments": "", "outputs": 1, - "x": 1695.928810119629, - "y": 236.80952262878418, - "z": "a0c86160.b392c", + "x": 1027.9265823364258, + "y": 374.0045919418335, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "5ac1b74d.5a62b8" + "85468ea4.c68d2" ] ] }, { - "id": "cb3ab0a3.18f7a", - "type": "set", - "name": "set vnf in service-data", - "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />", - "comments": "", - "x": 639.7145080566406, - "y": 634.00022315979, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "9f93822a.38acf", - "type": "set", - "name": "set vnfId and vnf-object-path", - "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` \" />", - "comments": "", - "x": 661.2701034545898, - "y": 671.2224445343018, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "fd9e7734.9c2008", - "type": "returnSuccess", - "name": "return success", - "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n", - "comments": "", - "x": 615.0478849411011, - "y": 821.7778739929199, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "79d541bc.c80a2", - "type": "set", - "name": "set vnf-level-oper-status to PendingDelete", - "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n", - "comments": "", - "x": 699.7145080566406, - "y": 715.0002861022949, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "894517c4.94cc68", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1396.856201171875, - "y": 271.88886964321136, - "z": "a0c86160.b392c", - "wires": [ - [] - ] - }, - { - "id": "35b35733.634ca8", - "type": "execute", - "name": "execute requiredParameters", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n", + "id": "85468ea4.c68d2", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 924.7145385742188, - "y": 94, - "z": "a0c86160.b392c", + "x": 1191.9267539978027, + "y": 374.0045928955078, + "z": "33fa79d5.e5dbd6", "wires": [ - [] + [ + "bc94b24c.9dce8" + ] ] }, { - "id": "13f26ce4.e0b983", - "type": "comment", - "name": "site-vnf-topology-operation-deactivate", - "info": "", + "id": "bc94b24c.9dce8", + "type": "set", + "name": "set location-name", + "xml": "<set>\n<parameter name='prop.site.location-name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 519, - "y": 94.23809814453125, - "z": "a0c86160.b392c", + "x": 1353.9267654418945, + "y": 373.6046495437622, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "75e2f346.784bbc", - "type": "for", - "name": "for loop idx - VNF input parameters", - "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n", + "id": "a690711f.67d26", + "type": "switchNode", + "name": "switch address", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`\">\n", "comments": "", "outputs": 1, - "x": 697.0001487731934, - "y": 365.0000219345093, - "z": "a0c86160.b392c", + "x": 1010.9265823364258, + "y": 410.00459575653076, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "ccc1f150.dcee8" + "5c1e569f.3488e8" ] ] }, { - "id": "ccc1f150.dcee8", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "5c1e569f.3488e8", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 903.8958854675293, - "y": 364.9218854904175, - "z": "a0c86160.b392c", + "x": 1180.9264297485352, + "y": 418.00459480285645, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "e5d9799e.ae8628", - "1badb5ed.e28e8a" + "b976d806.368f48" ] ] }, { - "id": "e5d9799e.ae8628", + "id": "b976d806.368f48", + "type": "set", + "name": "set location-address", + "xml": "<set>\n<parameter name='prop.site.location-address' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1368.9266052246094, + "y": 413.60457038879395, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "f96e2736.deb9e8", "type": "switchNode", - "name": "switch role", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n", + "name": "switch postcode", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`\">\n", "comments": "", "outputs": 1, - "x": 1041.0130882263184, - "y": 364.89532566070557, - "z": "a0c86160.b392c", + "x": 1011.9265823364258, + "y": 452.0045566558838, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "a6693add.80f898" + "e2c2334c.42179" ] ] }, { - "id": "a6693add.80f898", + "id": "e2c2334c.42179", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1181.013095855713, - "y": 365.89532566070557, - "z": "a0c86160.b392c", + "x": 1176.9267539978027, + "y": 451.0045566558838, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "139aae5d.e30622" + "8da40933.edfaf8" ] ] }, { - "id": "139aae5d.e30622", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1329.562744140625, - "y": 366.9220190048218, - "z": "a0c86160.b392c", - "wires": [ - [ - "3d248a1d.8a4626" - ] - ] - }, - { - "id": "3d248a1d.8a4626", + "id": "8da40933.edfaf8", "type": "set", - "name": "set role", - "xml": "<set>\n<parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n", + "name": "set location-postcode", + "xml": "<set>\n<parameter name='prop.site.location-postcode' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 1473.8961067199707, - "y": 367.9220361709595, - "z": "a0c86160.b392c", + "x": 1363.9266052246094, + "y": 452.6045732498169, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "afea211a.e0c0a", + "id": "bbcb741c.0eb968", "type": "switchNode", - "name": "switch prop.site.sdwan", - "xml": "<switch test=\"`$prop.site.sdwan`\">\n", + "name": "switch controlPoint", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoint'`\">\n", "comments": "", "outputs": 1, - "x": 671, - "y": 520.0000438690186, - "z": "a0c86160.b392c", + "x": 1003.8099670410156, + "y": 734.0315742492676, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "79bc523a.1ecdec" + "6a2baa92.dd77f4" ] ] }, { - "id": "79bc523a.1ecdec", + "id": "6a2baa92.dd77f4", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 852.0001335144043, - "y": 521.0000705718994, - "z": "a0c86160.b392c", + "x": 1165.8098907470703, + "y": 730.0315971374512, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "c9dc3c5b.ce873" + "fd4f1adb.5ec4b8" ] ] }, { - "id": "44a4d10f.69bea", - "type": "success", - "name": "success", - "xml": "<outcome value='success'>\n", + "id": "9ab3bfdb.b8822", + "type": "set", + "name": "set role", + "xml": "<set>\n<parameter name='prop.site.role' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", "comments": "", - "outputs": 1, - "x": 1556.500156402588, - "y": 489.00012493133545, - "z": "a0c86160.b392c", - "wires": [ - [ - "4ad01ef7.c1305" - ] - ] + "x": 1526.8100395202637, + "y": 660.0315113067627, + "z": "33fa79d5.e5dbd6", + "wires": [] }, { - "id": "4ad01ef7.c1305", + "id": "44d73030.0da8d", "type": "set", - "name": "set controller data", - "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n", + "name": "set controlPoint", + "xml": "<set>\n<parameter name='prop.site.controlPoint' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", "comments": "", - "x": 1745.0002517700195, - "y": 483.0001345872879, - "z": "a0c86160.b392c", + "x": 1550.8099174499512, + "y": 750.0315952301025, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "5be09b23.d55b04", - "type": "not-found", - "name": "not-found", - "xml": "<outcome value='not-found'>\n", + "id": "a9190ca.3c93df", + "type": "execute", + "name": "execute split roles", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.role`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.roles\"/>\n", "comments": "", "outputs": 1, - "x": 1559.991123199463, - "y": 536.5741605758667, - "z": "a0c86160.b392c", + "x": 1565.4762649536133, + "y": 707.0314292907715, + "z": "33fa79d5.e5dbd6", "wires": [ - [ - "48c84162.ad4b8" - ] + [] ] }, { - "id": "48c84162.ad4b8", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", - "comments": "", - "x": 1733.5625343322754, - "y": 524.8598966598511, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "89230c24.b3cdd", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", + "id": "832f2789.d30da8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "outputs": 1, - "x": 1552.324131011963, - "y": 577.907473564148, - "z": "a0c86160.b392c", + "x": 1312.4764022827148, + "y": 687.0314292907715, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "85634a7c.b937a8" + "9ab3bfdb.b8822", + "a9190ca.3c93df" ] ] }, { - "id": "85634a7c.b937a8", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n", - "comments": "", - "x": 1740.0966873168945, - "y": 573.3466663360596, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "a63c00b2.95bd5", - "type": "get-resource", - "name": "get-resource esr-thirdparty-sdnc", - "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n", + "id": "fd4f1adb.5ec4b8", + "type": "block", + "name": "block : atomic", + "xml": "<block atomic=\"true\">", + "atomic": "true", "comments": "", "outputs": 1, - "x": 1289.5000686645508, - "y": 537.0001307725906, - "z": "a0c86160.b392c", + "x": 1324.4762382507324, + "y": 734.0313529968262, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "44a4d10f.69bea", - "5be09b23.d55b04", - "89230c24.b3cdd" + "44d73030.0da8d", + "2ecea48f.cefbcc" ] ] }, { - "id": "d6db6a91.6f4a78", + "id": "2ecea48f.cefbcc", "type": "execute", - "name": "execute RestApiCallNode Create SDWAN site", - "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />", + "name": "execute split control points", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.controlPoint`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.controlpoints\"/>\n", + "comments": "", + "outputs": 1, + "x": 1575.4763946533203, + "y": 802.031455039978, + "z": "33fa79d5.e5dbd6", + "wires": [ + [] + ] + }, + { + "id": "5bc913df.9a308c", + "type": "switchNode", + "name": "switch latitude", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`\">\n", "comments": "", "outputs": 1, - "x": 1318.0004119873047, - "y": 735.0002021789551, - "z": "a0c86160.b392c", + "x": 1002.1428909301758, + "y": 496.03133392333984, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "6896c2eb.698ffc" + "408fca65.ceeb84" ] ] }, { - "id": "d2619b3c.655228", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", + "id": "408fca65.ceeb84", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1811.6665420532227, - "y": 708.8889743089676, - "z": "a0c86160.b392c", + "x": 1178.1427383422852, + "y": 491.03129291534424, + "z": "33fa79d5.e5dbd6", "wires": [ - [] + [ + "fff4ca4.988db38" + ] ] }, { - "id": "abc65d9c.3615e", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n", + "id": "fff4ca4.988db38", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 1787.111183166504, - "y": 770.4443570375443, - "z": "a0c86160.b392c", + "x": 1352.1427459716797, + "y": 489.63130950927734, + "z": "33fa79d5.e5dbd6", "wires": [] }, { - "id": "af0f8953.715328", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", + "id": "8619f18f.0dd93", + "type": "switchNode", + "name": "switch longitude", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`\">\n", "comments": "", "outputs": 1, - "x": 1642.111183166504, - "y": 767.4443570375443, - "z": "a0c86160.b392c", + "x": 1005.1428909301758, + "y": 536.0313768386841, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "abc65d9c.3615e" + "f2c6dced.9082e" ] ] }, { - "id": "6896c2eb.698ffc", - "type": "success", - "name": "success", - "xml": "<outcome value='success'>\n", + "id": "f2c6dced.9082e", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1638.5555572509766, - "y": 709.1111422777176, - "z": "a0c86160.b392c", + "x": 1177.1428985595703, + "y": 531.031418800354, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "d2619b3c.655228" + "dc9fd2db.e7bb7" ] ] }, { - "id": "98c6743f.874588", - "type": "execute", - "name": "execute RestApiCallNode Get token", - "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>", + "id": "dc9fd2db.e7bb7", + "type": "set", + "name": "set location-latitude", + "xml": "<set>\n<parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "outputs": 1, - "x": 1290.754165649414, - "y": 630.0041915178299, - "z": "a0c86160.b392c", - "wires": [ - [ - "39a5c053.f8453" - ] - ] + "x": 1359.1427536010742, + "y": 534.6312704086304, + "z": "33fa79d5.e5dbd6", + "wires": [] }, { - "id": "39a5c053.f8453", - "type": "success", - "name": "success", - "xml": "<outcome value='success'>\n", + "id": "95b5a3d.f7b926", + "type": "outcomeTrue", + "name": "true", + "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1555.7540473937988, - "y": 615.0040866136551, - "z": "a0c86160.b392c", + "x": 1168.1428985595703, + "y": 581.031421661377, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "f6e07bec.bc35c8" + "9b797058.27cec" ] ] }, { - "id": "a60d94cb.1ae848", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", + "id": "e75918af.752508", + "type": "set", + "name": "set emails", + "xml": "<set>\n<parameter name='prop.site.emails' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", + "comments": "", + "x": 1526.142593383789, + "y": 549.6312737464905, + "z": "33fa79d5.e5dbd6", + "wires": [] + }, + { + "id": "1ee73b7b.ea9285", + "type": "switchNode", + "name": "switch emails", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`\">\n", "comments": "", "outputs": 1, - "x": 1548.0040473937988, - "y": 656.6469699144363, - "z": "a0c86160.b392c", + "x": 995.1429672241211, + "y": 581.031421661377, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "a3e0da6b.559e48" + "95b5a3d.f7b926" ] ] }, { - "id": "a3e0da6b.559e48", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", + "id": "931cb5f.e240e48", + "type": "execute", + "name": "execute split emails", + "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$prop.site.emails`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"prop.site.email\"/>\n", "comments": "", "outputs": 1, - "x": 1674.0875434875488, - "y": 656.8930026292801, - "z": "a0c86160.b392c", + "x": 1551.808937072754, + "y": 596.0311765670776, + "z": "33fa79d5.e5dbd6", "wires": [ [] ] }, { - "id": "f6e07bec.bc35c8", - "type": "set", - "name": "set token-id", - "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n", - "comments": "", - "x": 1692.7540473937988, - "y": 615.0040866136551, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "f570928f.4101f", - "type": "comment", - "name": "tmp.thirdparty-sdnc-id is hardcoded value?", - "info": "", - "comments": "", - "x": 1286.0039596557617, - "y": 504.0040522813797, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "c9dc3c5b.ce873", + "id": "9b797058.27cec", "type": "block", "name": "block : atomic", "xml": "<block atomic=\"true\">", "atomic": "true", "outputs": 1, - "x": 1013.0000686645508, - "y": 521.6665782928467, - "z": "a0c86160.b392c", + "x": 1330.1429061889648, + "y": 582.0313391685486, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "98c6743f.874588", - "d6db6a91.6f4a78", - "a63c00b2.95bd5" + "e75918af.752508", + "931cb5f.e240e48" ] ] }, { - "id": "f2b6a437.7e6008", - "type": "save", - "name": "update siteInstance configuration in AAI", - "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='operational-status' value='PendingDelete' />\n", - "comments": "", - "outputs": 1, - "x": 693.0000915527344, - "y": 754.0001029968262, - "z": "a0c86160.b392c", - "wires": [ - [] - ] - }, - { - "id": "1badb5ed.e28e8a", + "id": "cd952f17.46c77", "type": "switchNode", - "name": "switch siteId", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`\">\n", + "name": "switch description", + "xml": "<switch test=\"`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`\">\n", "comments": "", "outputs": 1, - "x": 1041.0129852294922, - "y": 439.8953685760498, - "z": "a0c86160.b392c", + "x": 1010.03125, + "y": 286.03125, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "d169692c.c9c248" + "e92216b6.4260b8" ] ] }, { - "id": "d169692c.c9c248", + "id": "e92216b6.4260b8", "type": "outcomeTrue", "name": "true", "xml": "<outcome value='true'>\n", "comments": "", "outputs": 1, - "x": 1181.0129928588867, - "y": 440.8953685760498, - "z": "a0c86160.b392c", - "wires": [ - [ - "6b473348.32e71c" - ] - ] - }, - { - "id": "6b473348.32e71c", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1329.5626411437988, - "y": 441.922061920166, - "z": "a0c86160.b392c", + "x": 1152.03125, + "y": 287.03125, + "z": "33fa79d5.e5dbd6", "wires": [ [ - "b1ed9a25.d49d18" + "adffc0ee.7e0ff" ] ] }, { - "id": "b1ed9a25.d49d18", + "id": "adffc0ee.7e0ff", "type": "set", - "name": "set siteId", - "xml": "<set>\n<parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n", - "comments": "", - "x": 1473.8960037231445, - "y": 442.9220790863037, - "z": "a0c86160.b392c", - "wires": [] - }, - { - "id": "5308b9e7.a82c18", - "type": "comment", - "name": "Get siteId to delete", - "info": "", + "name": "set description", + "xml": "<set>\n<parameter name='prop.device.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n", "comments": "", - "x": 1052.9999694824219, - "y": 409.0000247955322, - "z": "a0c86160.b392c", + "x": 1286.03125, + "y": 287.6312561035156, + "z": "33fa79d5.e5dbd6", "wires": [] } -]
\ No newline at end of file +] diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-site-param.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-site-param.xml new file mode 100644 index 00000000..5be564d1 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-get-site-param.xml @@ -0,0 +1,123 @@ +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='sdwan-get-site-param' mode='sync'>
+ <block atomic="true">
+ <for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >
+ <block>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.device.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-address' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-postcode' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.emails' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.emails`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.email"/>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.type' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ <parameter name='prop.site.sdwan' value='true' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.role' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.role`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.roles"/>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoint'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.controlPoint' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$prop.site.controlPoint`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </for>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml index 20522bde..d8233da0 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.xml @@ -1,278 +1,235 @@ -<service-logic - xmlns='http://www.onap.org/sdnc/svclogic' - xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'> - <method rpc='site-vnf-topology-operation-activate' mode='sync'> - <block atomic="true"> - <switch test='`$service-data.vnfs.vnf_length`'> - <outcome value='0'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" /> - </return> - </outcome> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" /> - </return> - </outcome> - <outcome value='Other'> - <block atomic="true"> - <set> - <parameter name='prop.site.deviceId_length' value='0' /> - </set> - <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' > - <block> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`"> - <outcome value='true'> - <set> - <parameter name='tmp.vidx' value='`$vidx`' /> - <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`"> - <outcome value='true'> - <block atomic="true"> - <for index="deviceidx" start="0" end="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`"> - <block> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' /> - <parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' /> - </set> - </outcome> - </switch> - </block> - </for> - </block> - </outcome> - </switch> - </block> - </for> - <switch test="`$tmp.vidx`"> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" /> - </return> - </outcome> - </switch> - </block> - </outcome> - </switch> - <set> - <parameter name='prop.site.sdwan' value="false" /> - </set> - <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > - <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' /> - <parameter name='contextPrefix' value='prop' /> - </execute> - <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' > - <block> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.location-name' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.location-address' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.location-postcode' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.location-latitude' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.emails' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="original_string" value='`$prop.site.emails`'/> - <parameter name="regex" value=","/> - <parameter name="ctx_memory_result_key" value="prop.site.email"/> - </execute> - </block> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`"> - <outcome value='true'> - <set> - <parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - <parameter name='prop.site.sdwan' value="true" /> - </set> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - <parameter name='prop.site.sdwan' value="true" /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="original_string" value='`$prop.site.role`'/> - <parameter name="regex" value=","/> - <parameter name="ctx_memory_result_key" value="prop.site.roles"/> - </execute> - </block> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.controlPoint' value='`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="original_string" value='`$prop.site.controlPoint`'/> - <parameter name="regex" value=","/> - <parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/> - </execute> - </block> - </outcome> - </switch> - </block> - </for> - <switch test="`$prop.site.sdwan`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.siteId' value="" /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="esr-thirdparty-sdnc" - key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND - depth = '1'" - pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' > - <outcome value='success'> - <set> - <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> - </set> - </outcome> - <outcome value='not-found'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> - </return> - </outcome> - </get-resource> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="post"/> - <parameter name="responsePrefix" value="token-result"/> - <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> - <parameter name="trustStorePassword" value="adminadmin"/> - <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> - <parameter name="keyStorePassword" value="adminadmin"/> - <outcome value='success'> - <set> - <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' /> - </set> - </outcome> - <outcome value='failure'> - <block></block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site.json'`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`" /> - <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /> - <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="post"/> - <parameter name="responsePrefix" value="site-result"/> - <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> - <parameter name="trustStorePassword" value="adminadmin"/> - <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> - <parameter name="keyStorePassword" value="adminadmin"/> - <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> - <outcome value='success'> - <block atomic="true"></block> - </outcome> - </execute> - </block> - </outcome> - </switch> - <set> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].name' value='siteId' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1].value' value='`$site-result[0].id`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' /> - </set> - <set> - <parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> - <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$tmp.vidx].vnf-id + '/vnf-data/'` " /> - </set> - <set> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' /> - </set> - <set> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' /> - </set> - <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' - key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' > - <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> - <parameter name='generated-site-id' value='`$site-result[0].site-id`' /> - <parameter name='operational-status' value='Active' /> - </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>
\ No newline at end of file +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='site-vnf-topology-operation-activate' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.sdwan' value="false" />
+ </set>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='0'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.deviceId_length' value='0' />
+ </set>
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ <set>
+ <parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' ></call>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="sdwan-site-activateeeee-delete"/>
+ <parameter name="field3" value='`$prop.site.sdwan`'/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="deviceidx" start="0" end="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />
+ <parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <switch test="`$prop.site.sdwan`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index='cpidx' start='0' end='`$prop.site.controlpoints_length`' >
+ <block atomic="true">
+ <for index='cpvidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSiteInstance'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="sidx" start="0" end="`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].name == 'name'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].value == $prop.site.controlpoints[$cpidx]`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="lidx" start="0" end="`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].name == 'siteId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.controlpoints[$cpidx]' value='`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='prop.site.siteId' value="" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="site-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value='siteId' />
+ <!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$site-result[0].id`' /-->
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$tmp.vidx].vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource'
+ key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >
+ <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />
+ <parameter name='generated-site-id' value='`$site-result[0].site-id`' />
+ <parameter name='operational-status' value='Active' />
+ </save>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml index 02e6d237..865aa42b 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-create.xml @@ -39,102 +39,13 @@ <set>
<parameter name="`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
</set>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.location-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.location-address' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.location-postcode' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.location-latitude' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.location-latitude' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='prop.site.emails' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
- <parameter name="original_string" value='`$prop.site.emails`'/>
- <parameter name="regex" value=","/>
- <parameter name="ctx_memory_result_key" value="prop.site.email"/>
- </execute>
- </block>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.site.type' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- <parameter name='prop.site.sdwan' value="true" />
- </set>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='prop.site.role' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- <parameter name='prop.site.sdwan' value="true" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
- <parameter name="original_string" value='`$prop.site.role`'/>
- <parameter name="regex" value=","/>
- <parameter name="ctx_memory_result_key" value="prop.site.roles"/>
- </execute>
- </block>
- </outcome>
- </switch>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoints'`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='prop.site.controlPoint' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
- <parameter name="original_string" value='`$prop.site.controlPoint`'/>
- <parameter name="regex" value=","/>
- <parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/>
- </execute>
- </block>
- </outcome>
- </switch>
</block>
</for>
<set>
+ <parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' ></call>
+ <set>
<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml index d4e18bb5..67eba6fb 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.xml @@ -1,179 +1,190 @@ -<service-logic - xmlns='http://www.onap.org/sdnc/svclogic' - xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'> - <method rpc='site-vnf-topology-operation-deactivate' mode='sync'> - <block atomic="true"> - <block atomic="true"> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' > - <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/> - </execute> - <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`"> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id is a required input" /> - </return> - </outcome> - </switch> - <switch test='`$service-data.vnfs.vnf_length`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" /> - </return> - </outcome> - <outcome value='Other'> - <block atomic="true"> - <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' > - <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`"> - <outcome value='true'> - <set> - <parameter name='tmp.vidx' value='`$vidx`' /> - <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' /> - </set> - </outcome> - </switch> - </for> - <switch test="`$tmp.vidx`"> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id not found in service-data" /> - </return> - </outcome> - </switch> - </block> - </outcome> - </switch> - <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'> - <outcome value='Active'> - <block atomic="true"></block> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" /> - </return> - </outcome> - </switch> - </block> - <for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' > - <block> - <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - <parameter name='prop.site.sdwan' value="true" /> - </set> - </block> - </outcome> - </switch> - <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' /> - </set> - </block> - </outcome> - </switch> - </block> - </for> - <switch test="`$prop.site.sdwan`"> - <outcome value='true'> - <block atomic="true"> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="esr-thirdparty-sdnc" - key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND - depth = '1'" - pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' > - <outcome value='success'> - <set> - <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> - </set> - </outcome> - <outcome value='not-found'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" /> - </return> - </outcome> - </get-resource> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="post"/> - <parameter name="responsePrefix" value="token-result"/> - <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> - <parameter name="trustStorePassword" value="adminadmin"/> - <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> - <parameter name="keyStorePassword" value="adminadmin"/> - <outcome value='success'> - <set> - <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' /> - </set> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site.json'`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`" /> - <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /> - <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="post"/> - <parameter name="responsePrefix" value="site-result"/> - <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/> - <parameter name="trustStorePassword" value="adminadmin"/> - <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> - <parameter name="keyStorePassword" value="adminadmin"/> - <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> - <outcome value='success'> - <block atomic="true"></block> - </outcome> - </execute> - </block> - </outcome> - </switch> - <set> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' /> - </set> - <set> - <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' /> - <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` " /> - </set> - <set> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' /> - <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' /> - </set> - <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' - key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' > - <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> - <parameter name='operational-status' value='PendingDelete' /> - </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>
\ No newline at end of file +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='site-vnf-topology-operation-deactivate' mode='sync'>
+ <block atomic="true">
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >
+ <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/>
+ </execute>
+ <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='Active'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ <parameter name='prop.site.sdwan' value="true" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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>
+ <switch test="`$prop.site.sdwan`">
+ <outcome value='true'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-site-del.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="site-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource'
+ key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >
+ <parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />
+ <parameter name='operational-status' value='PendingDelete' />
+ </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>
|