diff options
Diffstat (limited to 'platform-logic/generic-resource-api')
2 files changed, 1769 insertions, 258 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-activate.json index 5f0ecf5b..89d7c286 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-activate.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-activate.json @@ -1 +1,1444 @@ -[{"id":"89ae3f75.efc06","type":"dgstart","name":"DGSTART","outputs":1,"x":141,"y":83,"z":"307d8ab2.24f886","wires":[["a0627d9f.9732f8"]]},{"id":"a0627d9f.9732f8","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":237.23807907104492,"y":143.95239067077637,"z":"307d8ab2.24f886","wires":[["d2b128d2.d9f3b"]]},{"id":"d2b128d2.d9f3b","type":"method","name":"tunnelxconn-topology-operation-activate","xml":"<method rpc='tunnelxconn-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":283.15485763549805,"y":179.19044589996338,"z":"307d8ab2.24f886","wires":[["e0a0d26a.cd7c18"]]},{"id":"e0a0d26a.cd7c18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":191.47619247436523,"y":322.5237879753113,"z":"307d8ab2.24f886","wires":[["3595ac23.ea8734","f82799c8.167508","e00d09b3.2a3938","2679eac0.b2cc36","1a8f12fd.5ade8d","d30bace3.5a7f2","6c7cdfc8.6b2608","e60cbd81.14ee9","e233eb48.73f8b","69d61c38.40caa4","d2103b31.1f83e8","3936aa7e.049e66"]]},{"id":"f82799c8.167508","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":458.0001106262207,"y":992.2145080566406,"z":"307d8ab2.24f886","wires":[]},{"id":"3595ac23.ea8734","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='tunnelxconn-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $tunnelxconn-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":486.75402450561523,"y":956.3370542526245,"z":"307d8ab2.24f886","wires":[]},{"id":"69d61c38.40caa4","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tunnelxconn-topology-operation-input.request-information.request-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":497.7542190551758,"y":703.0514001846313,"z":"307d8ab2.24f886","wires":[]},{"id":"2679eac0.b2cc36","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/tunnelxconn-topology/'` \" />\n\n","comments":"","x":453.73806381225586,"y":296.33332538604736,"z":"307d8ab2.24f886","wires":[]},{"id":"e00d09b3.2a3938","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.brg-vnf-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.tunnelxconn-vnf-id`' />\n\n\n","comments":"","x":500.9973258972168,"y":262.59259128570557,"z":"307d8ab2.24f886","wires":[]},{"id":"1a8f12fd.5ade8d","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":459.9934196472168,"y":332.23152446746826,"z":"307d8ab2.24f886","wires":[[]]},{"id":"6c7cdfc8.6b2608","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":522.5187530517578,"y":493.4594917297363,"z":"307d8ab2.24f886","wires":[["4b2d666b.abe658","c5e31c5.77e05e"]]},{"id":"d30bace3.5a7f2","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.tx-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":488.0648536682129,"y":392.0172290802002,"z":"307d8ab2.24f886","wires":[[]]},{"id":"4b2d666b.abe658","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":779.8148918151855,"y":492.26725220680237,"z":"307d8ab2.24f886","wires":[["56d62b25.1f49bc"]]},{"id":"e60cbd81.14ee9","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.tx.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":530.5293121337891,"y":846.4341316223145,"z":"307d8ab2.24f886","wires":[["46ade8d5.b547e","20a825ec.94755a","ce5466bc.b050b"]]},{"id":"46ade8d5.b547e","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":800.837329864502,"y":899.432332418859,"z":"307d8ab2.24f886","wires":[["83dde006.65958"]]},{"id":"20a825ec.94755a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":791.8373794555664,"y":867.9323581680655,"z":"307d8ab2.24f886","wires":[["83dde006.65958"]]},{"id":"ce5466bc.b050b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":795.5874176025391,"y":838.2894630432129,"z":"307d8ab2.24f886","wires":[["f7831c73.19aa18"]]},{"id":"83dde006.65958","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 updating md-sal for tunnelxconn-allotted-resource\" />\n","comments":"","x":961.5874176025391,"y":868.6823820099235,"z":"307d8ab2.24f886","wires":[]},{"id":"56d62b25.1f49bc","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":960.8148460388184,"y":492.7672016620636,"z":"307d8ab2.24f886","wires":[["e624279a.12ec8","a31618b2.409b8"]]},{"id":"e624279a.12ec8","type":"switchNode","name":"switch tx length","xml":"<switch test='`$mdsal-ar.tunnelxconn-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1206.6720924377441,"y":527.052964925766,"z":"307d8ab2.24f886","wires":[["3cddd823.41afe"]]},{"id":"3cddd823.41afe","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1397.6720962524414,"y":527.0529625415802,"z":"307d8ab2.24f886","wires":[["6be9fe1e.f9c138"]]},{"id":"d7146c6d.b9cef8","type":"set","name":"set tx-ar from get","xml":"<set>\n<parameter name='tx-ar.' value='$mdsal-ar.tunnelxconn-allotted-resource[0].' />\n","comments":"","x":1797.5292320251465,"y":527.6243867874146,"z":"307d8ab2.24f886","wires":[]},{"id":"6be9fe1e.f9c138","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1568.5290794372559,"y":527.6244316101074,"z":"307d8ab2.24f886","wires":[["d7146c6d.b9cef8","357a7eb2.2788c2","aecdfd17.ff094"]]},{"id":"357a7eb2.2788c2","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tx-ar.allotted-resource-status.rpc-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1795.5294761657715,"y":595.0529508590698,"z":"307d8ab2.24f886","wires":[]},{"id":"787114c9.2806c4","type":"comment","name":"GET tunnelxconn-allotted-resource from mdsal","info":"","comments":"","x":547.8148155212402,"y":456.7671926021576,"z":"307d8ab2.24f886","wires":[]},{"id":"aecdfd17.ff094","type":"switchNode","name":"switch order-status","xml":"<switch test='`$tx-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1805.52925491333,"y":560.6243848800659,"z":"307d8ab2.24f886","wires":[["60364cde.e8654c","5dbfe46e.a42744"]]},{"id":"60364cde.e8654c","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2017.1292114257812,"y":521.6243848800659,"z":"307d8ab2.24f886","wires":[["2e5253bb.935b44"]]},{"id":"5dbfe46e.a42744","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2042.8435859680176,"y":557.052975654602,"z":"307d8ab2.24f886","wires":[["2e5253bb.935b44"]]},{"id":"3137dae9.e2b426","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":503.33863830566406,"y":547.3386459350586,"z":"307d8ab2.24f886","wires":[]},{"id":"a31618b2.409b8","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-tx-ar' value='$mdsal-ar.' />\n","comments":"","x":1286.3864250183105,"y":492.76729369163513,"z":"307d8ab2.24f886","wires":[]},{"id":"f725e409.258e68","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":458.9576606750488,"y":361.6243562698364,"z":"307d8ab2.24f886","wires":[]},{"id":"f7831c73.19aa18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":937.2433853149414,"y":834.481632232666,"z":"307d8ab2.24f886","wires":[[]]},{"id":"6917ca0.586c538","type":"comment","name":"TO DO: vnf/put parent","info":"","comments":"","x":461.2433776855469,"y":735.1481952667236,"z":"307d8ab2.24f886","wires":[]},{"id":"e233eb48.73f8b","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":445.24338150024414,"y":664.4815549850464,"z":"307d8ab2.24f886","wires":[[]]},{"id":"c5e31c5.77e05e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":779.5766868591309,"y":528.4814250469208,"z":"307d8ab2.24f886","wires":[["dd1ff459.39f8a8"]]},{"id":"dd1ff459.39f8a8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":959.5766372680664,"y":529.1479756832123,"z":"307d8ab2.24f886","wires":[[]]},{"id":"d2103b31.1f83e8","type":"set","name":"set id","xml":"<set>\n<parameter name='tx-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='tx-ar.allotted-resource-status.action' value=\"`$tunnelxconn-topology-operation-input.request-information.request-action` \" />\n<parameter name='tx-ar.allotted-resource-status.rpc-name' value=\"tunnelxconn-topology-operation\" />\n<parameter name='tx-ar.allotted-resource-status.rpc-action' value=\"`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$tunnelxconn-topology-operation-input.request-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$tunnelxconn-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$tunnelxconn-topology-operation-input.service-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.' value=\"`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.` \" />","comments":"","x":428.24342346191406,"y":584.1481666564941,"z":"307d8ab2.24f886","wires":[]},{"id":"2e5253bb.935b44","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2231.5997276306152,"y":523.0000190734863,"z":"307d8ab2.24f886","wires":[[]]},{"id":"3936aa7e.049e66","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":488.85716247558594,"y":768.2380628585815,"z":"307d8ab2.24f886","wires":[["578afeed.16a8f8","fb8f774e.d3d13"]]},{"id":"578afeed.16a8f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":744.6190567016602,"y":751.1905598640442,"z":"307d8ab2.24f886","wires":[["9bc7661.b85f498"]]},{"id":"9bc7661.b85f498","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=\"AAI failed\" />\n","comments":"","x":911.142936706543,"y":762.8096308708191,"z":"307d8ab2.24f886","wires":[]},{"id":"fb8f774e.d3d13","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":751.7143440246582,"y":783.9525275230408,"z":"307d8ab2.24f886","wires":[["9bc7661.b85f498"]]}] +[ + { + "id":"b999eafe.842858", + "type":"dgstart", + "name":"DGSTART", + "outputs":1, + "x":140, + "y":82, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "9b116564.833cb8" + ] + ] + }, + { + "id":"9b116564.833cb8", + "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":236.23807907104492, + "y":142.95239067077637, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "edc3be65.01613" + ] + ] + }, + { + "id":"edc3be65.01613", + "type":"method", + "name":"tunnelxconn-topology-operation-assign", + "xml":"<method rpc='tunnelxconn-topology-operation-assign' mode='sync'>\n", + "comments":"", + "outputs":1, + "x":282.15485763549805, + "y":178.19044589996338, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "54beea01.d91654" + ] + ] + }, + { + "id":"54beea01.d91654", + "type":"block", + "name":"block : atomic", + "xml":"<block atomic=\"true\">", + "atomic":"true", + "comments":"", + "outputs":1, + "x":190.47619247436523, + "y":321.5237879753113, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "b278cddb.d9fd3", + "9cae3448.05d718", + "979614.a2bff9f", + "d949a905.c1bea8", + "ad83edc9.9f4e2" + ] + ] + }, + { + "id":"b89786a1.d6f318", + "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":1033.6666564941406, + "y":2248.5477046966553, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"dc5c7ceb.62245", + "type":"set", + "name":"set output to api handler", + "xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='tunnelxconn-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $tunnelxconn-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n", + "comments":"", + "x":1070.7540550231934, + "y":2127.432439804077, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"d5b8885e.fd6168", + "type":"set", + "name":"set allotted-resource-oper-status", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tunnelxconn-topology-operation-input.request-information.request-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n", + "comments":"", + "x":1142.468376159668, + "y":1544.6228160858154, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"9cae3448.05d718", + "type":"set", + "name":"set tmp.ar.self-link", + "xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/tunnelxconn-topology/'` \" />\n\n", + "comments":"", + "x":620.7380676269531, + "y":213.33331298828125, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"b278cddb.d9fd3", + "type":"set", + "name":"set tmp.ar.allotted-resource-id,etc", + "xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n", + "comments":"", + "x":673.997314453125, + "y":175.59259033203125, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"da748381.28b49", + "type":"success", + "name":"success", + "xml":"<outcome value='success'>\n", + "comments":"", + "outputs":1, + "x":823.8148803710938, + "y":361.26727294921875, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "e55d0a81.00b8c8" + ] + ] + }, + { + "id":"c75dc9bc.241ea8", + "type":"execute", + "name":"execute RestApiCallNode - PUT AR by id", + "xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.tx.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n", + "comments":"", + "outputs":1, + "x":1163.8626251220703, + "y":1769.1008231639862, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "5bb67f7.ab55c8", + "46f52c14.83ac04", + "c3730f0f.b2283" + ] + ] + }, + { + "id":"5bb67f7.ab55c8", + "type":"not-found", + "name":"not-found", + "xml":"<outcome value='not-found'>\n", + "comments":"", + "outputs":1, + "x":1432.5040016174316, + "y":1820.4322349056602, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "2d28b29b.2679ae" + ] + ] + }, + { + "id":"46f52c14.83ac04", + "type":"failure", + "name":"failure", + "xml":"<outcome value='failure'>\n", + "comments":"", + "outputs":1, + "x":1423.504051208496, + "y":1788.9322606548667, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "2d28b29b.2679ae" + ] + ] + }, + { + "id":"c3730f0f.b2283", + "type":"success", + "name":"success", + "xml":"<outcome value='success'>\n", + "comments":"", + "outputs":1, + "x":1427.2540893554688, + "y":1759.289365530014, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "bfc770a.039b39" + ] + ] + }, + { + "id":"2d28b29b.2679ae", + "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 updating md-sal for tunnelxconn-allotted-resource\" />\n", + "comments":"", + "x":1593.2540893554688, + "y":1789.6822844967246, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"26675278.de272e", + "type":"set", + "name":"set oper-status", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tx-ar.allotted-resource-status.rpc-action`' />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n", + "comments":"", + "x":1173.5294189453125, + "y":462.05291748046875, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"56500c.86eb1ff4", + "type":"comment", + "name":"Save consumed-allotted-resources to mdsal", + "info":"", + "comments":"", + "x":1241.2434692382812, + "y":1143.7196044921875, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"a45d9a74.e21dc8", + "type":"comment", + "name":"GET tunnelxconn-allotted-resource from mdsal", + "info":"", + "comments":"", + "x":546.8148193359375, + "y":331.7672119140625, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"e55d0a81.00b8c8", + "type":"returnFailure", + "name":"return failure - tunnelxconn already exists", + "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\" \n value=\"`'Existing tunnelxconn-allotted-resource with order status of ' + $mdsal-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n", + "comments":"", + "x":1133.129150390625, + "y":357.6243896484375, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"585a5348.26ebdc", + "type":"set", + "name":"set tx-ar-identifiers", + "xml":"<set>\n<parameter name='tx-ar-identifiers.consuming-service-instance-id' value=\"`$tunnelxconn-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='tx-ar-identifiers.parent-service-instance-id' value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='tx-ar-identifiers.allotted-resource-type' value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='tx-ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n", + "comments":"", + "x":1183.38623046875, + "y":555.6243896484375, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"adb0c575.93fc28", + "type":"comment", + "name":"Set allotted-resource-identifiers", + "info":"", + "comments":"", + "x":1210.338623046875, + "y":514.338623046875, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"657f2f7c.d06f3", + "type":"set", + "name":"set identifiers in overal structure", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.' \nvalue=\"`$tx-ar-identifiers.`\" />\n\n\n", + "comments":"", + "x":1200.38623046875, + "y":863.910400390625, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"5116afe8.1fbc7", + "type":"set", + "name":"set ecomp model information from input", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.' \nvalue=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.`\" />\n\n\n", + "comments":"", + "x":1228.957763671875, + "y":598.9100952148438, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"ae66aa68.abd658", + "type":"switchNode", + "name":"switch model-invariant-uuid is null", + "xml":"<switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>\n", + "comments":"", + "outputs":1, + "x":1209.8148193359375, + "y":638.195809841156, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "6cc54295.2d161c" + ] + ] + }, + { + "id":"6cc54295.2d161c", + "type":"outcome", + "name":"outcome null", + "xml":"<outcome value=''>\n", + "comments":"", + "outputs":1, + "x":1436.9576988220215, + "y":639.6243271827698, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "81127881.9d9608" + ] + ] + }, + { + "id":"81127881.9d9608", + "type":"set", + "name":"set model-invariant-uuid", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-invariant-uuid' \nvalue=\"`$ar-model.invariant-uuid`\" />\n\n\n", + "comments":"", + "x":1638.38627243042, + "y":639.0528798103333, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"152bdff8.022b9", + "type":"switchNode", + "name":"switch model-uuid is null", + "xml":"<switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>\n", + "comments":"", + "outputs":1, + "x":1181.2434158325195, + "y":672.4815106391907, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "bbbedf49.98db6" + ] + ] + }, + { + "id":"bbbedf49.98db6", + "type":"outcome", + "name":"outcome null", + "xml":"<outcome value=''>\n", + "comments":"", + "outputs":1, + "x":1382.6719818115234, + "y":673.0529322624207, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "569c769b.028248" + ] + ] + }, + { + "id":"569c769b.028248", + "type":"set", + "name":"set model-uuid", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-uuid' \nvalue=\"`$ar-model.uuid`\" />\n\n\n", + "comments":"", + "x":1575.529140472412, + "y":673.0528540611267, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"20290d0b.2155a2", + "type":"switchNode", + "name":"switch model-version is null", + "xml":"<switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>\n", + "comments":"", + "outputs":1, + "x":1189.8148193359375, + "y":705.3386378288269, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "7e9cf888.d7fe28" + ] + ] + }, + { + "id":"7e9cf888.d7fe28", + "type":"outcome", + "name":"outcome null", + "xml":"<outcome value=''>\n", + "comments":"", + "outputs":1, + "x":1439.8148002624512, + "y":705.3386225700378, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "5612f00a.3e69b" + ] + ] + }, + { + "id":"5612f00a.3e69b", + "type":"set", + "name":"set model-version", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-version' \nvalue=\"`$ar-model.version`\" />\n\n\n", + "comments":"", + "x":1632.6719589233398, + "y":705.3385443687439, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"a6deba2.5709c48", + "type":"switchNode", + "name":"switch ar-model.ecomp-generated-naming", + "xml":"<switch test='`$ar-model.ecomp-generated-naming`'>\n", + "comments":"", + "outputs":1, + "x":1253.38623046875, + "y":807.7672729492188, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "6d922375.aad36c", + "57e0183a.8970f8" + ] + ] + }, + { + "id":"6d922375.aad36c", + "type":"other", + "name":"outcome Y", + "xml":"<outcome value='Y'>\n", + "comments":"", + "outputs":1, + "x":1539.3862915039062, + "y":807.1958618164062, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "1fce2277.8cc94e" + ] + ] + }, + { + "id":"1fce2277.8cc94e", + "type":"block", + "name":"block : atomic", + "xml":"<block atomic=\"true\">\n", + "atomic":"true", + "comments":"", + "outputs":1, + "x":1693.1363525390625, + "y":809.69580078125, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "88e249.16900db8" + ] + ] + }, + { + "id":"57e0183a.8970f8", + "type":"other", + "name":"other", + "xml":"<outcome value='Other'>\n", + "comments":"", + "outputs":1, + "x":1558.608642578125, + "y":896.1958618164062, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "3976e608.f5d75a" + ] + ] + }, + { + "id":"3976e608.f5d75a", + "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 in allotted-resource-model data. Ecomp-generated-naming should be true\" />\n\n", + "comments":"", + "x":1741.608642578125, + "y":901.1958618164062, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"88e249.16900db8", + "type":"switchNode", + "name":"switch ar-model.ecomp-generated-naming", + "xml":"<switch test='`$ar-model.naming-policy`'>\n", + "comments":"", + "outputs":1, + "x":1829.38623046875, + "y":858.767333984375, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "5641d8c.283f728", + "b39ef6a0.0274b8" + ] + ] + }, + { + "id":"5641d8c.283f728", + "type":"other", + "name":"outcome oam_network_policy", + "xml":"<outcome value='oam_network_policy'>\n", + "comments":"", + "outputs":1, + "x":2204.244140625, + "y":862.3453369140625, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "b3953e7c.866a1" + ] + ] + }, + { + "id":"b39ef6a0.0274b8", + "type":"other", + "name":"other", + "xml":"<outcome value='Other'>\n", + "comments":"", + "outputs":1, + "x":2118.671875, + "y":939.1958618164062, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "b3953e7c.866a1" + ] + ] + }, + { + "id":"2b9f3515.cf741a", + "type":"set", + "name":"set ar_name", + "xml":"<set>\n<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />\n", + "comments":"", + "x":2510.100830078125, + "y":897.7672729492188, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"3cef7181.8fe5ae", + "type":"execute", + "name":"execute SliStringUtils - replace TenantOAMNetworkRole", + "xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantOAMNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.untrusted-network-role`\"/>\n\n", + "comments":"", + "outputs":1, + "x":2654.2437858581543, + "y":941.6244196891785, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + }, + { + "id":"ab0c53b1.763fd", + "type":"execute", + "name":"execute SliStringUtils - replace LandingNetworkRole", + "xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.trusted-network-role`\"/>\n\n", + "comments":"", + "outputs":1, + "x":2641.243896484375, + "y":981.7672729492188, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + }, + { + "id":"b3953e7c.866a1", + "type":"block", + "name":"block: atomic", + "xml":"<block atomic='true'>\n", + "atomic":"false", + "comments":"", + "outputs":1, + "x":2318.5292015075684, + "y":937.3387522697449, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "2b9f3515.cf741a", + "3cef7181.8fe5ae", + "ab0c53b1.763fd", + "d423712c.9510d" + ] + ] + }, + { + "id":"d423712c.9510d", + "type":"set", + "name":"set identifiers.allotted-resource-name", + "xml":"<set>\n<parameter name='tx-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n", + "comments":"", + "x":2599.1005859375, + "y":1032.052978515625, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"f2d263a0.9cb28", + "type":"set", + "name":"set assignments in overall structure", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.' \nvalue=\"`$tx-ar-assignments.`\" />\n\n\n", + "comments":"", + "x":1208.8624572753906, + "y":1068.6246919631958, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"cfb78668.00cd08", + "type":"set", + "name":"Handle tx-ar-assignments", + "xml":"<set>\n<parameter name='tx-ar-assignments.vni' value='`$tmp.vni`'/>\n<parameter name='tx-ar-assignments.vgmux-bearer-ip' value='`$tmp.vgmux-bearer-ip'/>\n<parameter name='tx-ar-assignments.vgmux-lan-ip' value='`$tmp.vgmux-lan-ip`'/>\n\n", + "comments":"", + "x":1192.529052734375, + "y":1014.0530395507812, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"4da8a0e3.f9391", + "type":"for", + "name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]", + "xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n", + "comments":"", + "outputs":1, + "x":2226.8155822753906, + "y":1342.0411586761475, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "501bbf27.3dc73" + ] + ] + }, + { + "id":"a8b2172e.cd4e48", + "type":"switchNode", + "name":"switch service-data.consumed-allotted-resources_length", + "xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n", + "comments":"", + "outputs":1, + "x":1255.8148498535156, + "y":1230.505145072937, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "a50704cf.c04048", + "85ec2af5.2058c8" + ] + ] + }, + { + "id":"a50704cf.c04048", + "type":"other", + "name":"outcome Null", + "xml":"<outcome value=''>\n", + "comments":"", + "outputs":1, + "x":1633.2077865600586, + "y":1234.1124458312988, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "529a9ced.1689c4" + ] + ] + }, + { + "id":"85ec2af5.2058c8", + "type":"other", + "name":"other", + "xml":"<outcome value='Other'>\n", + "comments":"", + "outputs":1, + "x":1631.9577865600586, + "y":1324.1124477386475, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "c7832c3d.51fd4" + ] + ] + }, + { + "id":"501bbf27.3dc73", + "type":"switchNode", + "name":"switch allotted-resource-id", + "xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n", + "comments":"", + "outputs":1, + "x":2661.4106826782227, + "y":1343.85085105896, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "b8d3fff1.f08f7" + ] + ] + }, + { + "id":"b8d3fff1.f08f7", + "type":"outcomeTrue", + "name":"true", + "xml":"<outcome value='true'>\n", + "comments":"", + "outputs":1, + "x":2868.220375061035, + "y":1347.064962387085, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "a18e2528.73b4b8" + ] + ] + }, + { + "id":"c7832c3d.51fd4", + "type":"block", + "name":"block : atomic", + "xml":"<block atomic=\"true\">", + "atomic":"true", + "outputs":1, + "x":1789.834976196289, + "y":1330.4885501861572, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "4da8a0e3.f9391", + "cf052f96.b8566" + ] + ] + }, + { + "id":"a18e2528.73b4b8", + "type":"block", + "name":"block : atomic", + "xml":"<block atomic=\"true\">", + "atomic":"true", + "outputs":1, + "x":3036.4817276000977, + "y":1351.9222631454468, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "1499010f.83f3cf", + "9c256baa.9a73c8" + ] + ] + }, + { + "id":"529a9ced.1689c4", + "type":"set", + "name":"set cidx", + "xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n", + "comments":"", + "x":1812.0647735595703, + "y":1236.3266830444336, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"1499010f.83f3cf", + "type":"set", + "name":"set tmp.cidx and ctx.consumed-ar", + "xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />", + "comments":"", + "x":3282.3391876220703, + "y":1346.4937419891357, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"ba9689e8.b0eb18", + "type":"set", + "name":"set consumed allotted resources", + "xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n", + "comments":"", + "x":1168.6720123291016, + "y":1394.826681137085, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"bfc770a.039b39", + "type":"block", + "name":"block", + "xml":"<block>\n", + "atomic":"false", + "comments":"", + "outputs":1, + "x":1568.910057067871, + "y":1755.4815347194672, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "16086eb5.0d69c1" + ] + ] + }, + { + "id":"6d9885bf.82560c", + "type":"comment", + "name":"Add SZ AR to mdsal", + "info":"", + "comments":"", + "x":1093.148208618164, + "y":1730.1957080364227, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"bfbe7bd4.d6c658", + "type":"execute", + "name":"execute getTime", + "xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n", + "comments":"", + "outputs":1, + "x":1109.4814224243164, + "y":1468.671986579895, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + }, + { + "id":"9216b08d.5fd83", + "type":"other", + "name":"other", + "xml":"<outcome value='Other'>\n", + "comments":"", + "outputs":1, + "x":829.57666015625, + "y":412.4814453125, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "e846c57.b684038" + ] + ] + }, + { + "id":"371cd2ba.38774e", + "type":"block", + "name":"block: atomic", + "xml":"<block atomic=\"true\">\n", + "atomic":"false", + "comments":"", + "outputs":1, + "x":777.57666015625, + "y":908.2908325195312, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "2a2df6fc.2dabba", + "585a5348.26ebdc", + "5116afe8.1fbc7", + "ae66aa68.abd658", + "152bdff8.022b9", + "20290d0b.2155a2", + "26675278.de272e", + "a6deba2.5709c48", + "657f2f7c.d06f3", + "cfb78668.00cd08", + "f2d263a0.9cb28", + "a8b2172e.cd4e48", + "ba9689e8.b0eb18", + "bfbe7bd4.d6c658", + "d5b8885e.fd6168", + "d48a17c0.cf0328", + "c75dc9bc.241ea8", + "dc5c7ceb.62245", + "b89786a1.d6f318", + "f9fa039a.8b5e4", + "34f814bd.9517ec" + ] + ] + }, + { + "id":"2a2df6fc.2dabba", + "type":"set", + "name":"set id", + "xml":"<set>\n<parameter name='tx-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='tx-ar.allotted-resource-status.action' value=\"`$tunnelxconn-topology-operation-input.request-information.request-action` \" />\n<parameter name='tx-ar.allotted-resource-status.rpc-name' value=\"tunnelxconn-topology-operation\" />\n<parameter name='tx-ar.allotted-resource-status.rpc-action' value=\"`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$tunnelxconn-topology-operation-input.request-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$tunnelxconn-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$tunnelxconn-topology-operation-input.service-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.' value=\"`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.` \" />", + "comments":"", + "x":1148.2434387207031, + "y":418.433837890625, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"d48a17c0.cf0328", + "type":"update", + "name":"update AAI allotted-resource", + "xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$ar-model.invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$ar-model.uuid`\" />\n\t<parameter name=\"operational-status\" value=\"null\" />\n", + "comments":"", + "outputs":1, + "x":1130.0529327392578, + "y":1636.5767517089844, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "79fa545.87748ac", + "4d20b9c0.a03f48" + ] + ] + }, + { + "id":"79fa545.87748ac", + "type":"failure", + "name":"failure", + "xml":"<outcome value='failure'>\n", + "comments":"", + "outputs":1, + "x":1385.814842224121, + "y":1619.5292553901672, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "35f0ebf7.475e14" + ] + ] + }, + { + "id":"35f0ebf7.475e14", + "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=\"AAI failed\" />\n", + "comments":"", + "x":1552.338722229004, + "y":1631.1483263969421, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"4d20b9c0.a03f48", + "type":"failure", + "name":"not-found", + "xml":"<outcome value='not-found'>\n", + "comments":"", + "outputs":1, + "x":1392.9101295471191, + "y":1652.2912230491638, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "35f0ebf7.475e14" + ] + ] + }, + { + "id":"cf052f96.b8566", + "type":"switchNode", + "name":"switch tmp.found-cidx", + "xml":"<switch test='`$tmp.found-cidx`'>\n", + "comments":"", + "outputs":1, + "x":2041.743423461914, + "y":1588.2315921783447, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "8bf3422f.2b157" + ] + ] + }, + { + "id":"8bf3422f.2b157", + "type":"outcomeTrue", + "name":"false", + "xml":"<outcome value='false'>\n", + "comments":"", + "outputs":1, + "x":2231.743377685547, + "y":1588.2315292358398, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "9c6522bb.3d0d8" + ] + ] + }, + { + "id":"9c6522bb.3d0d8", + "type":"block", + "name":"block : atomic", + "xml":"<block atomic=\"true\">", + "atomic":"true", + "outputs":1, + "x":2397.743377685547, + "y":1588.2315292358398, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "7050f1b9.4b61d" + ] + ] + }, + { + "id":"7050f1b9.4b61d", + "type":"set", + "name":"set tmp.cidx ", + "xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n", + "comments":"", + "x":2643.600706100464, + "y":1588.8030033111572, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"9c256baa.9a73c8", + "type":"break", + "name":"break", + "xml":"<break>", + "comments":"", + "x":3201.243408203125, + "y":1391.731689453125, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"16086eb5.0d69c1", + "type":"execute", + "name":"execute RestApiCallNode - Update parent provided service AR", + "xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n", + "comments":"", + "outputs":1, + "x":1919.9521980285645, + "y":1755.1904199123383, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "86e0d6.1ae8cf28", + "75544fc8.6352b", + "57a8706f.ba354" + ] + ] + }, + { + "id":"a5553221.c0fd3", + "type":"comment", + "name":"Rollback parent", + "info":"", + "comments":"", + "x":1763.9521255493164, + "y":1724.8570504188538, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"86e0d6.1ae8cf28", + "type":"not-found", + "name":"not-found", + "xml":"<outcome value='not-found'>\n", + "comments":"", + "outputs":1, + "x":2291.2602462768555, + "y":1815.8553862571716, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "caf797d4.f6d228" + ] + ] + }, + { + "id":"75544fc8.6352b", + "type":"failure", + "name":"failure", + "xml":"<outcome value='failure'>\n", + "comments":"", + "outputs":1, + "x":2282.26029586792, + "y":1784.3554120063782, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "caf797d4.f6d228" + ] + ] + }, + { + "id":"57a8706f.ba354", + "type":"success", + "name":"success", + "xml":"<outcome value='success'>\n", + "comments":"", + "outputs":1, + "x":2286.0103340148926, + "y":1754.7125168815255, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "caf797d4.f6d228" + ] + ] + }, + { + "id":"caf797d4.f6d228", + "type":"block", + "name":"block", + "xml":"<block>\n", + "atomic":"false", + "comments":"", + "outputs":1, + "x":2427.666301727295, + "y":1750.9046860709786, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + }, + { + "id":"9ff8826d.6bd4a", + "type":"comment", + "name":"Generate naming", + "info":"", + "comments":"", + "x":1184.3862762451172, + "y":765.7672252655029, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"979614.a2bff9f", + "type":"get-resource", + "name":"get-resource tunnelxconn-allotted-resource", + "xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/$tunnelxconn-topology-operation-input.alloted-resource-information.allotted-resource-id' pfx='mdsal-ar' >\n", + "comments":"", + "outputs":1, + "x":529, + "y":366, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "da748381.28b49", + "9216b08d.5fd83" + ] + ] + }, + { + "id":"d949a905.c1bea8", + "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":605, + "y":255, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + }, + { + "id":"e846c57.b684038", + "type":"get-resource", + "name":"get-resource parent service instance", + "xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id' pfx='mdsal-parent-service-instance' >\n", + "comments":"", + "outputs":1, + "x":642, + "y":515, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "a2470c46.eb9cf", + "62985d2c.2792b4" + ] + ] + }, + { + "id":"a2470c46.eb9cf", + "type":"success", + "name":"success", + "xml":"<outcome value='success'>\n", + "comments":"", + "outputs":1, + "x":905, + "y":509, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "371cd2ba.38774e" + ] + ] + }, + { + "id":"62985d2c.2792b4", + "type":"other", + "name":"other", + "xml":"<outcome value='Other'>\n", + "comments":"", + "outputs":1, + "x":718, + "y":610, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "b1afedee.bd87b" + ] + ] + }, + { + "id":"b1afedee.bd87b", + "type":"returnFailure", + "name":"return failure - tunnelxconn already exists", + "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\" \n value=\"`'No entry found for parent service instance id ' + $tmp.ar.parent-service-instance-id + '.'`\" />\n", + "comments":"", + "x":645, + "y":671, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"f9fa039a.8b5e4", + "type":"for", + "name":"for vf module parameters", + "xml":"<for index='curparm' start='0' end='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param_length`' >\n", + "comments":"", + "outputs":1, + "x":1179, + "y":961, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "92171d5f.d4722" + ] + ] + }, + { + "id":"92171d5f.d4722", + "type":"switchNode", + "name":"switch parameter name", + "xml":"<switch test='$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].name'>\n", + "comments":"", + "outputs":1, + "x":1449, + "y":960, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "56162789.d15ac8", + "15568e39.5cb232" + ] + ] + }, + { + "id":"56162789.d15ac8", + "type":"other", + "name":"vGMUX_Bearer_IP", + "xml":"<outcome value='vGMUX_Bearer_IP'>\n", + "comments":"", + "outputs":1, + "x":1675, + "y":964, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "d653d93c.35b268" + ] + ] + }, + { + "id":"d653d93c.35b268", + "type":"set", + "name":"set tmp.vgmux-bearer-ip", + "xml":"<set>\n<parameter name='tmp.vgmux-bearer-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'/>\n", + "comments":"", + "x":1917.999984741211, + "y":965.0000286102295, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"15568e39.5cb232", + "type":"other", + "name":"vGMUX_LAN_IP", + "xml":"<outcome value='vGMUX_LAN_IP'>\n", + "comments":"", + "outputs":1, + "x":1677, + "y":1024, + "z":"6d778d5b.c45f64", + "wires":[ + [ + "2e8b39e3.6a9606" + ] + ] + }, + { + "id":"2e8b39e3.6a9606", + "type":"set", + "name":"set tmp.vgmux-lan-ip", + "xml":"<set>\n<parameter name='tmp.vgmux-lan-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'/>\n", + "comments":"", + "x":1920, + "y":1025, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"34f814bd.9517ec", + "type":"set", + "name":"set default assignments", + "xml":"<set>\n<parameter name='tmp.vni' value='123' />\n<parameter name='tmp.vgmux-bearer-ip' value='127.0.0.1' />\n<parameter name='tmp.vgmux-lan-ip' value='127.0.0.1' />", + "comments":"", + "x":1163, + "y":910, + "z":"6d778d5b.c45f64", + "wires":[ + + ] + }, + { + "id":"ad83edc9.9f4e2", + "type":"execute", + "name":"generate allotted-resource url", + "xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.tx-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n", + "comments":"", + "outputs":1, + "x":612, + "y":295, + "z":"6d778d5b.c45f64", + "wires":[ + [ + + ] + ] + } +]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml index 3c85b1b9..485091f8 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml @@ -1,261 +1,329 @@ -<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='tunnelxconn-topology-operation-assign' mode='sync'>
-<block atomic="true"><set>
-<parameter name='tmp.ar.allotted-resource-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
-<parameter name='tmp.ar.parent-service-instance-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
-
-
-</set><set>
-<parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/'
+<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='tunnelxconn-topology-operation-assign' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ar.allotted-resource-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+ <parameter name='tmp.ar.parent-service-instance-id' value='`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/'
+ $tmp.ar.allotted-resource-id
+ '/allotted-resource-data/tunnelxconn-topology/'` " />
-
-</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><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.tx-allottedresource`"/>
- <parameter name="outputPath" value="tmp.ar-url"/>
- <parameter name="target" value="{allotted-resource-id}"/>
- <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>
-</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/$tunnelxconn-topology-operation-input.alloted-resource-information.allotted-resource-id' pfx='mdsal-ar' >
-<outcome value='success'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message"
- value="`'Existing tunnelxconn-allotted-resource with order status of ' + $mdsal-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
-</return></outcome><outcome value='Other'>
-<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id' pfx='mdsal-parent-service-instance' >
-<outcome value='success'>
-<block atomic="true">
-<set>
-<parameter name='tx-ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-<parameter name='tx-ar.allotted-resource-status.action' value="`$tunnelxconn-topology-operation-input.request-information.request-action` " />
-<parameter name='tx-ar.allotted-resource-status.rpc-name' value="tunnelxconn-topology-operation" />
-<parameter name='tx-ar.allotted-resource-status.rpc-action' value="`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action` " />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$tunnelxconn-topology-operation-input.request-information.` " />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$tunnelxconn-topology-operation-input.sdnc-request-header.` " />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$tunnelxconn-topology-operation-input.service-information.` " />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.` " />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.' value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.` " /></set><set>
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tx-ar.allotted-resource-status.rpc-action`' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />
-
-</set><set>
-<parameter name='tx-ar-identifiers.consuming-service-instance-id' value="`$tunnelxconn-topology-operation-input.service-information.service-instance-id` " />
-<parameter name='tx-ar-identifiers.parent-service-instance-id' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
-<parameter name='tx-ar-identifiers.allotted-resource-type' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
-<parameter name='tx-ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-
-</set><set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.'
-value="`$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.`" />
-
-
-</set><switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>
-<outcome value=''>
-<set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-invariant-uuid'
-value="`$ar-model.invariant-uuid`" />
-
-
-</set></outcome></switch><switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>
-<outcome value=''>
-<set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-uuid'
-value="`$ar-model.uuid`" />
-
-
-</set></outcome></switch><switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>
-<outcome value=''>
-<set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-version'
-value="`$ar-model.version`" />
-
-
-</set></outcome></switch><switch test='`$ar-model.ecomp-generated-naming`'>
-<outcome value='Y'>
-<block atomic="true">
-<switch test='`$ar-model.naming-policy`'>
-<outcome value='oam_network_policy'>
-<block atomic='true'>
-<set>
-<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$TenantOAMNetworkRole"/>
- <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.untrusted-network-role`"/>
-
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$LandingNetworkRole"/>
- <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.trusted-network-role`"/>
-
-</execute><set>
-<parameter name='tx-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
-</set></block></outcome><outcome value='Other'>
-<block atomic='true'>
-<set>
-<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$TenantOAMNetworkRole"/>
- <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.untrusted-network-role`"/>
-
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$LandingNetworkRole"/>
- <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.trusted-network-role`"/>
-
-</execute><set>
-<parameter name='tx-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
-</set></block></outcome></switch></block></outcome><outcome value='Other'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error in allotted-resource-model data. Ecomp-generated-naming should be true" />
-
-</return></outcome></switch><set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.'
-value="`$tx-ar-identifiers.`" />
-
-
-</set><set>
-<parameter name='tmp.vni' value='123' />
-<parameter name='tmp.vgmux-bearer-ip' value='127.0.0.1' />
-<parameter name='tmp.vgmux-lan-ip' value='127.0.0.1' /></set><for index='curparm' start='0' end='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param_length`' >
-<switch test='$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].name'>
-<outcome value='vGMUX_Bearer_IP'>
-<set>
-<parameter name='tmp.vgmux-bearer-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'>
-`' />
-</set></outcome><outcome value='vGMUX_LAN_IP'>
-<set>
-<parameter name='tmp.vgmux-lan-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'>
-`' />
-</set></outcome></switch></for><set>
-<parameter name='tx-ar-assignments.vni' value='`$tmp.vni`'/>
-<parameter name='tx-ar-assignments.vgmux-bearer-ip' value='`$tmp.vgmux-bearer-ip'/>
-<parameter name='tx-ar-assignments.vgmux-lan-ip' value='`$tmp.vgmux-lan-ip`'/>
-
-</set><set>
-<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.'
-value="`$tx-ar-assignments.`" />
-
-
-</set><switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
-<outcome value=''>
-<set>
-<parameter name='tmp.cidx' value="`0`" />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value="1" />
-
-
-</set></outcome><outcome value='Other'>
-<block atomic="true"><for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >
-<switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
-
-<outcome value='true'>
-<block atomic="true"><set>
-<parameter name='tmp.cidx' value='`$cidx`' />
-<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />
-<parameter name='tmp.found-cidx' value='true' /></set><break>
-</break></block></outcome></switch></for><switch test='`$tmp.found-cidx`'>
-<outcome value='false'>
-<block atomic="true"><set>
-<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />
-</set></block></outcome></switch></block></outcome></switch><set>
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value="`$tmp.ar.self-link` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />
-
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
- <parameter name="outputPath" value="tmp.current-time" />
-
-</execute><set>
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tunnelxconn-topology-operation-input.request-information.request-action`' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action`' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-request-id`' />
-<parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
-</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="allotted-resource"
- key="customer.global-customer-id = $service-data.service-information.global-customer-id AND
- service-subscription.service-type = $service-data.service-information.subscription-service-type AND
- service-instance.service-instance-id = $service-data.service-information.service-instance-id AND
- allotted-resource.id = $tmp.ar.allotted-resource-id"
- pfx='pfx' local-only='false' force='false'>
- <parameter name="description" value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type`" />
- <parameter name="selflink" value="`$tmp.ar.self-link`" />
- <parameter name="model-invariant-id" value="`$ar-model.invariant-uuid`" />
- <parameter name="model-version-id" value="`$ar-model.uuid`" />
- <parameter name="operational-status" value="null" />
-<outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="AAI failed" />
-</return></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="AAI failed" />
-</return></outcome></update><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.tx.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='PUT' />
- <parameter name="responsePrefix" value="mdsal-ar" />
-
-<outcome value='success'>
-<block>
-<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='DELETE' />
- <parameter name="responsePrefix" value="parent" />
-
-<outcome value='success'>
-<block>
-</block></outcome><outcome value='failure'>
-<block>
-</block></outcome><outcome value='not-found'>
-<block>
-</block></outcome></execute></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 updating md-sal for tunnelxconn-allotted-resource" />
-</return></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="Error updating md-sal for tunnelxconn-allotted-resource" />
-</return></outcome></execute><set>
-<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
-<parameter name='tunnelxconn-object-path' value="`$tmp.ar.self-link`"/>
-<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ </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>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.tx-allottedresource`"/>
+ <parameter name="outputPath" value="tmp.ar-url"/>
+ <parameter name="target" value="{allotted-resource-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>
+ </execute>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/$tunnelxconn-topology-operation-input.alloted-resource-information.allotted-resource-id' pfx='mdsal-ar' >
+ <outcome value='success'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message"
+ value="`'Existing tunnelxconn-allotted-resource with order status of ' + $mdsal-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id' pfx='mdsal-parent-service-instance' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tx-ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ <parameter name='tx-ar.allotted-resource-status.action' value="`$tunnelxconn-topology-operation-input.request-information.request-action` " />
+ <parameter name='tx-ar.allotted-resource-status.rpc-name' value="tunnelxconn-topology-operation" />
+ <parameter name='tx-ar.allotted-resource-status.rpc-action' value="`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action` " />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$tunnelxconn-topology-operation-input.request-information.` " />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$tunnelxconn-topology-operation-input.sdnc-request-header.` " />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$tunnelxconn-topology-operation-input.service-information.` " />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.` " />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.' value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.` " />
+ </set>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tx-ar.allotted-resource-status.rpc-action`' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tx-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />
+ </set>
+ <set>
+ <parameter name='tx-ar-identifiers.consuming-service-instance-id' value="`$tunnelxconn-topology-operation-input.service-information.service-instance-id` " />
+ <parameter name='tx-ar-identifiers.parent-service-instance-id' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
+ <parameter name='tx-ar-identifiers.allotted-resource-type' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
+ <parameter name='tx-ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ </set>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.'
+ value="`$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.`" />
+ </set>
+ <switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-invariant-uuid'
+ value="`$ar-model.invariant-uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-uuid'
+ value="`$ar-model.uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$tunnelxconn-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>
+ <outcome value=''>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.onap-model-information.model-version'
+ value="`$ar-model.version`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$ar-model.ecomp-generated-naming`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <switch test='`$ar-model.naming-policy`'>
+ <outcome value='oam_network_policy'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.untrusted-network-role`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.trusted-network-role`"/>
+ </execute>
+ <set>
+ <parameter name='tx-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.untrusted-network-role`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$tunnelxconn-topology-operation-input.tunnelxconn-request-input.trusted-network-role`"/>
+ </execute>
+ <set>
+ <parameter name='tx-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in allotted-resource-model data. Ecomp-generated-naming should be true" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.'
+ value="`$tx-ar-identifiers.`" />
+ </set>
+ <set>
+ <parameter name='tmp.vni' value='123' />
+ <parameter name='tmp.vgmux-bearer-ip' value='127.0.0.1' />
+ <parameter name='tmp.vgmux-lan-ip' value='127.0.0.1' />
+ </set>
+ <for index='curparm' start='0' end='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param_length`' >
+ <switch test='$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].name'>
+ <outcome value='vGMUX_Bearer_IP'>
+ <set>
+ <parameter name='tmp.vgmux-bearer-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'/>
+ </set>
+ </outcome>
+ <outcome value='vGMUX_LAN_IP'>
+ <set>
+ <parameter name='tmp.vgmux-lan-ip' value='`$parent-service-instance.service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameter.param[$curparm].value`'/>
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <set>
+ <parameter name='tx-ar-assignments.vni' value='`$tmp.vni`'/>
+ <parameter name='tx-ar-assignments.vgmux-bearer-ip' value='`$tmp.vgmux-bearer-ip'/>
+ <parameter name='tx-ar-assignments.vgmux-lan-ip' value='`$tmp.vgmux-lan-ip`'/>
+ </set>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.'
+ value="`$tx-ar-assignments.`" />
+ </set>
+ <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.cidx' value="`0`" />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value="1" />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >
+ <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.cidx' value='`$cidx`' />
+ <parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />
+ <parameter name='tmp.found-cidx' value='true' />
+ </set>
+ <break></break>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.found-cidx`'>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value="`$tmp.ar.self-link` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+ </execute>
+ <set>
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$tunnelxconn-topology-operation-input.request-information.request-action`' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$tunnelxconn-topology-operation-input.sdnc-request-header.svc-request-id`' />
+ <parameter name='tx-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="allotted-resource"
+ key="customer.global-customer-id = $service-data.service-information.global-customer-id AND
+ service-subscription.service-type = $service-data.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $service-data.service-information.service-instance-id AND
+ allotted-resource.id = $tmp.ar.allotted-resource-id"
+ pfx='pfx' local-only='false' force='false'>
+ <parameter name="description" value="`$tunnelxconn-topology-operation-input.allotted-resource-information.allotted-resource-type`" />
+ <parameter name="selflink" value="`$tmp.ar.self-link`" />
+ <parameter name="model-invariant-id" value="`$ar-model.invariant-uuid`" />
+ <parameter name="model-version-id" value="`$ar-model.uuid`" />
+ <parameter name="operational-status" value="null" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="AAI failed" />
+ </return>
+ </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="AAI failed" />
+ </return>
+ </outcome>
+ </update>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.tx.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+ <outcome value='success'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='DELETE' />
+ <parameter name="responsePrefix" value="parent" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </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 updating md-sal for tunnelxconn-allotted-resource" />
+ </return>
+ </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="Error updating md-sal for tunnelxconn-allotted-resource" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+ <parameter name='tunnelxconn-object-path' value="`$tmp.ar.self-link`"/>
+ <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $tunnelxconn-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
-
-</set><return status='success'>
-<parameter name="ack-final-indicator" value="Y" />
-<parameter name="error-code" value="200" />
-<parameter name="error-message" value="`$error-message`" />
-</return></block></outcome><outcome value='Other'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message"
- value="`'No entry found for parent service instance id ' + $tmp.ar.parent-service-instance-id + '.'`" />
-</return></outcome></get-resource></outcome></get-resource></block></method></service-logic>
\ No newline at end of file + </set>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message"
+ value="`'No entry found for parent service instance id ' + $tmp.ar.parent-service-instance-id + '.'`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </get-resource>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |