summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.json
blob: 044dac709ed8129b6f373f5a73d7b01c2ad52d86 (plain)
1
[{"id":"55d0537a.aad9ac","type":"dgstart","name":"DGSTART","outputs":1,"x":140,"y":37.14285659790039,"z":"85bef54a.63a4f8","wires":[["d3d5c485.a4c258"]]},{"id":"3fcd67d7.8f74e8","type":"method","name":"method self-serve-aai-vnf-put","xml":"<method rpc='self-serve-aai-vnf-put' mode='sync'>\n","comments":"","outputs":1,"x":270.7857208251953,"y":112.60317993164062,"z":"85bef54a.63a4f8","wires":[["dfd5ae04.f32e3"]]},{"id":"dfd5ae04.f32e3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":159.46430206298828,"y":259.09527111053467,"z":"85bef54a.63a4f8","wires":[["1ef56451.f805fc","c307398e.690a88","43d1bc2b.422f64","ac85cbde.bc5418"]]},{"id":"d3d5c485.a4c258","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":412.8571472167969,"y":36.57142353057861,"z":"85bef54a.63a4f8","wires":[["3fcd67d7.8f74e8"]]},{"id":"1ef56451.f805fc","type":"switchNode","name":"switch: ss.capability-action","xml":"<switch test='`$ss.capability-action`'>\n","comments":"","outputs":1,"x":402.5000305175781,"y":313.03571128845215,"z":"85bef54a.63a4f8","wires":[["f78a5ca3.c9ff1","545c7cf1.7eb664"]]},{"id":"f78a5ca3.c9ff1","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":626.0000267028809,"y":313.28571128845215,"z":"85bef54a.63a4f8","wires":[["d3b4d1fc.2a362"]]},{"id":"d3b4d1fc.2a362","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\t<parameter name=\"error-message\" value=\"ss.capability-action is null\" />\n","comments":"","x":785.9166984558105,"y":313.39681005477905,"z":"85bef54a.63a4f8","wires":[]},{"id":"545c7cf1.7eb664","type":"outcome","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":625.7500228881836,"y":362.28571462631226,"z":"85bef54a.63a4f8","wires":[["72205822.388d68"]]},{"id":"df1f48c5.e7d9e8","type":"for","name":"for aidx in param_length (VNF)","xml":"<for silentFailure='true' index=\"aidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`\">","comments":"","outputs":1,"x":1047.7420234680176,"y":362.2460980415344,"z":"85bef54a.63a4f8","wires":[["37dfb14b.c1f7be"]]},{"id":"c307398e.690a88","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-aai-vnfput.log' />\n","comments":"","outputs":1,"x":358.9880828857422,"y":544.523811340332,"z":"85bef54a.63a4f8","wires":[[]]},{"id":"37dfb14b.c1f7be","type":"switchNode","name":"switch: param[].name","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].name`'>\n","comments":"","outputs":1,"x":1310.2857093811035,"y":362.5000042915344,"z":"85bef54a.63a4f8","wires":[["c5a32a56.cd5118","c689826d.88f7f","58892a1d.521944","b4a84036.4788c","29e202.a7a62dfe","d7859900.1cb0d8","5c6dfc03.287a34"]]},{"id":"c5a32a56.cd5118","type":"outcome","name":"vnf_name","xml":"<outcome value='vnf_name'>","comments":"","outputs":1,"x":1531.3215599060059,"y":362.28569984436035,"z":"85bef54a.63a4f8","wires":[["55a24330.b52acc"]]},{"id":"c689826d.88f7f","type":"outcome","name":"vnf_id","xml":"<outcome value='vnf_id'>","comments":"","outputs":1,"x":1523.9645042419434,"y":404.1071581840515,"z":"85bef54a.63a4f8","wires":[["aa844c30.45db1"]]},{"id":"55a24330.b52acc","type":"set","name":"set vnf-name, index","xml":"<set>\n<parameter name='ss.param.vnf-name' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.vnf-name-index' value='`$aidx`' />","comments":"","x":1722.3215675354004,"y":362.7857155799866,"z":"85bef54a.63a4f8","wires":[]},{"id":"aa844c30.45db1","type":"set","name":"set vnf-id, index","xml":"<set>\n<parameter name='ss.param.vnf-id' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.vnf-id-index' value='`$aidx`' />","comments":"","x":1699.4645156860352,"y":403.85715913772583,"z":"85bef54a.63a4f8","wires":[]},{"id":"86241a75.30e1b8","type":"save","name":"update generic-vnf","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"generic-vnf\"\n\t\tkey=\"generic-vnf.vnf-id = $ss.param.vnf-id \" >\n<parameter name=\"vnf-name\" value=\"`$ss.param.vnf-name`\" />\n<parameter name=\"prov-status\" value=\"PREPROV\" />\n<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n<parameter name=\"selflink\" value=\"`$ss.selflink`\" />\n<parameter name=\"model-customization-id\" \n\tvalue=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"model-invariant-id\" \n\tvalue=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" \n\tvalue=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-uuid`\" />","comments":"","outputs":1,"x":1012.1784973144531,"y":963.1072387695312,"z":"85bef54a.63a4f8","wires":[["4c5244df.ce970c","7dd9e5a8.f30c7c"]]},{"id":"4c5244df.ce970c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1212.4285278320312,"y":963.4642858505249,"z":"85bef54a.63a4f8","wires":[["e6a6591.117aea8"]]},{"id":"7dd9e5a8.f30c7c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1218.678539276123,"y":1015.2143201828003,"z":"85bef54a.63a4f8","wires":[["684c9c20.1ac634"]]},{"id":"80d924b7.aface8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to update generic-vnf.vnf-name in AnAI with vnf-name=' + $ss.param.vnf-name`\" />\n","comments":"","x":1650.2974853515625,"y":963.2499904632568,"z":"85bef54a.63a4f8","wires":[]},{"id":"facbfa08.015888","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'generic-vnf with vnf-id =' + $ss.param.vnf-id + ' is not found in AAI'`\" />\n","comments":"","x":1650.8690032958984,"y":1013.488166809082,"z":"85bef54a.63a4f8","wires":[]},{"id":"8157040a.eb58e8","type":"save","name":"get generic-vnf","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"generic-vnf\"\n\t\tkey=\"generic-vnf.vnf-id = $ss.param.vnf-id \"\n\tpfx=\"tmp.aai.vnf\" >\n\n","comments":"","outputs":1,"x":1003.4642219543457,"y":748.0000066757202,"z":"85bef54a.63a4f8","wires":[["ef982b26.77f938","75c917ec.7702b8"]]},{"id":"ef982b26.77f938","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1211.999855041504,"y":747.499927520752,"z":"85bef54a.63a4f8","wires":[["b75ef25a.515e5"]]},{"id":"75c917ec.7702b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1220.2497749328613,"y":846.3928356170654,"z":"85bef54a.63a4f8","wires":[["63c26544.05168c"]]},{"id":"a4abae3c.5acf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error to get generic-vnf with vnf-id=' + $ss.param.vnf-id + ' from AnAI'`\" />\n","comments":"","x":1656.4400596618652,"y":792.9999465942383,"z":"85bef54a.63a4f8","wires":[]},{"id":"e95a3d2d.d5c19","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'generic-vnf.vnf-name with vnf-id=' + $ss.param.vnf-id + ' not found in AAI'`\" />\n","comments":"","x":1658.1545333862305,"y":846.95250415802,"z":"85bef54a.63a4f8","wires":[]},{"id":"72205822.388d68","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":783.5000190734863,"y":362.535710811615,"z":"85bef54a.63a4f8","wires":[["df1f48c5.e7d9e8","8157040a.eb58e8","86241a75.30e1b8","47acecfe.290644","3d3628a4.f5f868","110e04e.b280ffb","c62e5711.65deb8"]]},{"id":"b75ef25a.515e5","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1383.5714416503906,"y":747.5357208251953,"z":"85bef54a.63a4f8","wires":[["8eb3ba4a.2df338","a4abae3c.5acf"]]},{"id":"e6a6591.117aea8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1385.8570938110352,"y":963.535810470581,"z":"85bef54a.63a4f8","wires":[["8eb3ba4a.2df338","80d924b7.aface8"]]},{"id":"684c9c20.1ac634","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1388.7143096923828,"y":1014.392951965332,"z":"85bef54a.63a4f8","wires":[["8eb3ba4a.2df338","facbfa08.015888"]]},{"id":"63c26544.05168c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1386.4285202026367,"y":846.5357208251953,"z":"85bef54a.63a4f8","wires":[["8eb3ba4a.2df338","e95a3d2d.d5c19"]]},{"id":"8eb3ba4a.2df338","type":"set","name":"set resource-resolution-data.status = FAILED","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status' \n\tvalue='FAILED' />\n","comments":"","x":1753.1428298950195,"y":747.2500324249268,"z":"85bef54a.63a4f8","wires":[]},{"id":"56dac433.4ebe4c","type":"comment","name":"VNF params","info":"","comments":"","x":1021.785717010498,"y":312.6190495491028,"z":"85bef54a.63a4f8","wires":[]},{"id":"58892a1d.521944","type":"outcome","name":"license-assignment-group-uuid","xml":"<outcome value='license-assignment-group-uuid'>","comments":"","outputs":1,"x":1601.0000267028809,"y":447.1428647041321,"z":"85bef54a.63a4f8","wires":[["33858d6f.c508c2"]]},{"id":"33858d6f.c508c2","type":"set","name":"set license-assignment-group-uuid, index","xml":"<set>\n<parameter name='ss.param.license-assignment-group-uuid' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.license-assignment-group-uuid-index' value='`$aidx`' />","comments":"","x":1944.5000381469727,"y":446.8928656578064,"z":"85bef54a.63a4f8","wires":[]},{"id":"b4a84036.4788c","type":"outcome","name":"entitlement-assignment-group-uuid","xml":"<outcome value='entitlement-assignment-group-uuid'>","comments":"","outputs":1,"x":1616.0000267028809,"y":489.6428647041321,"z":"85bef54a.63a4f8","wires":[["6b87d852.7227f8"]]},{"id":"6b87d852.7227f8","type":"set","name":"set entitlement-assignment-group-uuid, index","xml":"<set>\n<parameter name='ss.param.entitlement-assignment-group-uuid' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.entitlement-assignment-group-uuid-index' value='`$aidx`' />","comments":"","x":1959.5000381469727,"y":489.3928656578064,"z":"85bef54a.63a4f8","wires":[]},{"id":"c6893659.48b0a8","type":"save","name":"Rollback generic-vnf update","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"generic-vnf\"\n\t\tkey=\"generic-vnf.vnf-id = $ss.param.vnf-id \" >\n<parameter name=\"vnf-name\" value='`$tmp.aai.vnf.vnf-anme`' />","comments":"","outputs":1,"x":3439.0000076293945,"y":978.928617477417,"z":"85bef54a.63a4f8","wires":[["5b3c33f6.ebd2cc","5d1a7d88.ced424","c0606087.f6dec"]]},{"id":"5b3c33f6.ebd2cc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3677.2499923706055,"y":978.4285621643066,"z":"85bef54a.63a4f8","wires":[["19c115b9.1a8d5a"]]},{"id":"5d1a7d88.ced424","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3687.250045776367,"y":1018.928632736206,"z":"85bef54a.63a4f8","wires":[["9038539f.5722d"]]},{"id":"d601c3d4.6d50b","type":"set","name":"set resource-resolution-data.status = FAILED","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-put-index].resource-resolution-data.status' \n\tvalue='FAILED' />\n","comments":"","x":3490.4284896850586,"y":933.2972393035889,"z":"85bef54a.63a4f8","wires":[]},{"id":"c0606087.f6dec","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3685.071334838867,"y":1059.6902294158936,"z":"85bef54a.63a4f8","wires":[["7acb4638.07b6a8"]]},{"id":"c470bf3f.ce10b","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":3189.606948852539,"y":889.6901836395264,"z":"85bef54a.63a4f8","wires":[["d601c3d4.6d50b","c6893659.48b0a8","7f2cc0f0.2fb8"]]},{"id":"19c115b9.1a8d5a","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`\" />\n","comments":"","x":3860.071189880371,"y":978.5472364425659,"z":"85bef54a.63a4f8","wires":[]},{"id":"9038539f.5722d","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Failed to rollback generic-vnf update because generic-vnf with vnf-id = ' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`\" />\n","comments":"","x":3866.321231842041,"y":1018.5472745895386,"z":"85bef54a.63a4f8","wires":[]},{"id":"7acb4638.07b6a8","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Rollback of generic-vnf update completed. '`\" />\n","comments":"","x":3868.821273803711,"y":1060.0472993850708,"z":"85bef54a.63a4f8","wires":[]},{"id":"7f2cc0f0.2fb8","type":"record","name":"record generic-vnf ROLLBACK","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"ROLLBACK generic-vnf update\"/>","comments":"","outputs":1,"x":3444.571189880371,"y":888.7972373962402,"z":"85bef54a.63a4f8","wires":[[]]},{"id":"b21660af.9463e","type":"comment","name":"ROLLBACK STARET HERE","info":"","comments":"","x":3213.14266204834,"y":834.7495536804199,"z":"85bef54a.63a4f8","wires":[]},{"id":"c68671d5.40c25","type":"save","name":"save license","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"license\"\n\t\tkey=\"license.group-uuid = $ss.param.license-assignment-group-uuid \n\t\tAND license.resource-uuid = $ss.param.license-key\n\t\tAND generic-vnf.vnf-id = $ss.param.vnf-id\" >\n<parameter name=\"group-uuid\" value='`$ss.param.license-assignment-group-uuid`' />\n<parameter name=\"resource-uuid\" value='`$ss.param.license-key`' />","comments":"","outputs":1,"x":2126.321647644043,"y":1164.821494102478,"z":"85bef54a.63a4f8","wires":[["596f2794.29bd08","3babeea8.206f12","d8ad3e8c.2f704"]]},{"id":"596f2794.29bd08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2326.571678161621,"y":1165.1785411834717,"z":"85bef54a.63a4f8","wires":[["d5f43627.b5ce68"]]},{"id":"3babeea8.206f12","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2332.821689605713,"y":1216.928575515747,"z":"85bef54a.63a4f8","wires":[["379e1f2a.c8bb6"]]},{"id":"ba258248.c8735","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to save license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' in AA. ' + $error-message`\" />\n","comments":"","x":2701.4406356811523,"y":1164.9642457962036,"z":"85bef54a.63a4f8","wires":[]},{"id":"37505579.aeb93a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' is not found in AAI. ' + $error-message`\" />\n","comments":"","x":2702.0121536254883,"y":1215.2024221420288,"z":"85bef54a.63a4f8","wires":[]},{"id":"d5f43627.b5ce68","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2500.000244140625,"y":1165.2500658035278,"z":"85bef54a.63a4f8","wires":[["ba258248.c8735","c470bf3f.ce10b"]]},{"id":"379e1f2a.c8bb6","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2502.8574600219727,"y":1216.1072072982788,"z":"85bef54a.63a4f8","wires":[["37505579.aeb93a","c470bf3f.ce10b"]]},{"id":"25fd194b.69a846","type":"save","name":"save entitlement","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"entitlement\"\n\t\tkey=\"entitlement.group-uuid = $ss.param.entitlement-assignment-group-uuid \n\t\tAND entitlement.resource-uuid = $ss.param.entitlement-key\n\t\tAND generic-vnf.vnf-id = $ss.param.vnf-id\" >\n<parameter name=\"group-uuid\" value='`$ss.param.entitlement-assignment-group-uuid`' />\n<parameter name=\"resource-uuid\" value='`$ss.param.entitlement-key`' />","comments":"","outputs":1,"x":2148.583366394043,"y":1518.2499980926514,"z":"85bef54a.63a4f8","wires":[["6aa55b3.95b14a4","c6d02bd0.b0edd8"]]},{"id":"6aa55b3.95b14a4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2348.833396911621,"y":1518.607045173645,"z":"85bef54a.63a4f8","wires":[["71ccf768.2c3b38"]]},{"id":"c6d02bd0.b0edd8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2355.083408355713,"y":1570.3570795059204,"z":"85bef54a.63a4f8","wires":[["67dfc015.a0271"]]},{"id":"d3bfd616.246fd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to save entitlement with group-uuid = ' + $ss.param.entitlement-assignment-group-uuid + ' AND entitlement.resource-uuid = ' + $ss.param.entitlement-key + ' in AAI. ' + $error-message`\" />\n","comments":"","x":2717.98819732666,"y":1518.3926372528076,"z":"85bef54a.63a4f8","wires":[]},{"id":"18dde61b.aca13a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'entitlement with group-uuid = ' + $ss.param.entitlement-assignment-group-uuid + ' AND entitlement.resource-uuid = ' + $ss.param.entitlement-key + ' is not found in AAI. ' + $error-message`\" />\n","comments":"","x":2724.2738723754883,"y":1568.6309261322021,"z":"85bef54a.63a4f8","wires":[]},{"id":"71ccf768.2c3b38","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2522.261962890625,"y":1518.6785697937012,"z":"85bef54a.63a4f8","wires":[["d3bfd616.246fd8","479bbe95.38113"]]},{"id":"67dfc015.a0271","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2525.1191787719727,"y":1569.5357112884521,"z":"85bef54a.63a4f8","wires":[["18dde61b.aca13a","479bbe95.38113"]]},{"id":"85eb871.2640978","type":"save","name":"Rollback license save","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"license\"\n\t\tkey=\"license.group-uuid = $ss.param.license-assignment-group-uuid \n\t\tAND license.resource-uuid = $ss.param.license-key\" >","comments":"","outputs":1,"x":3809.3573417663574,"y":1243.6072721481323,"z":"85bef54a.63a4f8","wires":[["6ce1b45f.4ed2bc","93d8b7a8.2141d8","d4c04554.422618"]]},{"id":"6ce1b45f.4ed2bc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4047.6073265075684,"y":1243.107216835022,"z":"85bef54a.63a4f8","wires":[["1e973b6a.3ecc25"]]},{"id":"93d8b7a8.2141d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":4056.3573417663574,"y":1282.3572721481323,"z":"85bef54a.63a4f8","wires":[["d0cb4d6e.6f6cf"]]},{"id":"d4c04554.422618","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":4054.1786346435547,"y":1320.6188688278198,"z":"85bef54a.63a4f8","wires":[["dae35973.8abc38"]]},{"id":"d86b3e46.6b4fb","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":3573.2142448425293,"y":1201.8688192367554,"z":"85bef54a.63a4f8","wires":[["85eb871.2640978","7905671f.4688f8"]]},{"id":"1e973b6a.3ecc25","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Failed to rollback license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' in AAI. MANUAL ROLLBACK IS REQUIRED!'`\" />\n","comments":"","x":4230.428524017334,"y":1243.2258911132812,"z":"85bef54a.63a4f8","wires":[]},{"id":"d0cb4d6e.6f6cf","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Failed to rollback license because license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' NOT FOUND in AAI. SILENT SUCCESS! '`\" />\n","comments":"","x":4235.428527832031,"y":1281.9759140014648,"z":"85bef54a.63a4f8","wires":[]},{"id":"dae35973.8abc38","type":"set","name":"set error-message","xml":"<set>\n<parameter name='error-message' value=\"`$error-message + ' Rollback of license completed. '`\" />\n","comments":"","x":4237.928573608398,"y":1320.975938796997,"z":"85bef54a.63a4f8","wires":[]},{"id":"7905671f.4688f8","type":"record","name":"record license ROLLBACK","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"ROLLBACK license\"/>","comments":"","outputs":1,"x":3824.1784858703613,"y":1200.9758729934692,"z":"85bef54a.63a4f8","wires":[[]]},{"id":"479bbe95.38113","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":3030.428451538086,"y":1063.9285678863525,"z":"85bef54a.63a4f8","wires":[["c470bf3f.ce10b","b081f7f0.a01508"]]},{"id":"47acecfe.290644","type":"set","name":"set resource-resolution-data.status = SUCCESS","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status' \n\tvalue='SUCCESS' />\n","comments":"","x":1090.845458984375,"y":1695.5354652404785,"z":"85bef54a.63a4f8","wires":[]},{"id":"29e202.a7a62dfe","type":"outcome","name":"aai-vnf-put","xml":"<outcome value='aai-vnf-put'>","comments":"","outputs":1,"x":1543.2500038146973,"y":533.3928589820862,"z":"85bef54a.63a4f8","wires":[["5d6926ab.0be6e8"]]},{"id":"5d6926ab.0be6e8","type":"set","name":"set ss.param.aai-vnf-put-index","xml":"<set>\n<parameter name='ss.param.aai-vnf-put-index' value='`$aidx`' />","comments":"","x":1776.750015258789,"y":533.1428599357605,"z":"85bef54a.63a4f8","wires":[]},{"id":"43d1bc2b.422f64","type":"switchNode","name":"switch: ss.capability-name","xml":"<switch test='`$ss.capability-name`'>\n","comments":"","outputs":1,"x":400.8928451538086,"y":258.75000953674316,"z":"85bef54a.63a4f8","wires":[["760bd716.8d2598"]]},{"id":"760bd716.8d2598","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":625.8928680419922,"y":259.2500081062317,"z":"85bef54a.63a4f8","wires":[["53678390.0ec93c"]]},{"id":"53678390.0ec93c","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\t<parameter name=\"error-message\" value=\"ss.capability-name is null\" />\n","comments":"","x":785.8095397949219,"y":259.3611068725586,"z":"85bef54a.63a4f8","wires":[]},{"id":"ac85cbde.bc5418","type":"set","name":"set param[$ss.param.aai-vnf-put-index].value = SUCCESS","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].value' \n\tvalue='SUCCESS' />\n","comments":"","x":505.6071472167969,"y":483.0357093811035,"z":"85bef54a.63a4f8","wires":[]},{"id":"d7859900.1cb0d8","type":"outcome","name":"license-key","xml":"<outcome value='license-key'>","comments":"","outputs":1,"x":1545.71439743042,"y":579.999979019165,"z":"85bef54a.63a4f8","wires":[["ef0d6945.2d36b8"]]},{"id":"ef0d6945.2d36b8","type":"set","name":"set license-key, index","xml":"<set>\n<parameter name='ss.param.license-key' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.license-key-index' value='`$aidx`' />","comments":"","x":1781.2144088745117,"y":579.7499799728394,"z":"85bef54a.63a4f8","wires":[]},{"id":"5c6dfc03.287a34","type":"outcome","name":"entitlement-key","xml":"<outcome value='entitlement-key'>","comments":"","outputs":1,"x":1558.71439743042,"y":622.499979019165,"z":"85bef54a.63a4f8","wires":[["27af300f.e5eac"]]},{"id":"27af300f.e5eac","type":"set","name":"set entitlement-key, index","xml":"<set>\n<parameter name='ss.param.entitlement-key' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />\n<parameter name='ss.param.entitlement-key-index' value='`$aidx`' />","comments":"","x":1796.2144088745117,"y":622.2499799728394,"z":"85bef54a.63a4f8","wires":[]},{"id":"3d3628a4.f5f868","type":"switchNode","name":"ss.param.license-assignment-group-uuid != NULL","xml":"<switch test=\"`$ss.param.license-assignment-group-uuid != ''`\">\n","comments":"","outputs":1,"x":1107.1427612304688,"y":1118.428671836853,"z":"85bef54a.63a4f8","wires":[["70116375.debe9c"]]},{"id":"bea6d364.081b4","type":"execute","name":"ss.param.license-assignment-group-uuid contains $","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >\n    <parameter name='source' value='`$ss.param.license-assignment-group-uuid`' />\n    <parameter name='target' value='$' />\n","comments":"","outputs":1,"x":1677.5238494873047,"y":1117.8572483062744,"z":"85bef54a.63a4f8","wires":[["535af96b.aeb4e8","970650fa.244cd"]]},{"id":"535af96b.aeb4e8","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1972.5237884521484,"y":1117.1427755355835,"z":"85bef54a.63a4f8","wires":[["3ca8f5ac.1ddeda"]]},{"id":"70116375.debe9c","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1398.8095016479492,"y":1117.857219696045,"z":"85bef54a.63a4f8","wires":[["bea6d364.081b4"]]},{"id":"970650fa.244cd","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1973.0006275177002,"y":1164.9999904632568,"z":"85bef54a.63a4f8","wires":[["c68671d5.40c25"]]},{"id":"3ca8f5ac.1ddeda","type":"record","name":"record ss.param.license-assignment-group-uuid","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"`'ss.param.license-assignment-group-uuid = ' + $ss.param.license-assignment-group-uuid`\"/>\n<parameter name=\"field3\" value=\"__SKIP saving license object in AnAI__\"/>","comments":"","outputs":1,"x":2235.952377319336,"y":1116.4285945892334,"z":"85bef54a.63a4f8","wires":[[]]},{"id":"110e04e.b280ffb","type":"switchNode","name":"ss.param.entitlement-assignment-group-uuid NULL","xml":"<switch test=\"`$ss.param.entitlement-assignment-group-uuid != ''`\">\n","comments":"","outputs":1,"x":1108.0952453613281,"y":1469.4286861419678,"z":"85bef54a.63a4f8","wires":[["f6c3383e.93cd68"]]},{"id":"99866447.2f71e8","type":"execute","name":"ss.param.license-assignment-group-uuid contains $","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >\n    <parameter name='source' value='`$ss.param.entitlement-assignment-group-uuid`' />\n    <parameter name='target' value='$' />\n","comments":"","outputs":1,"x":1680.1428680419922,"y":1469.1905555725098,"z":"85bef54a.63a4f8","wires":[["723da42a.d12fec","285fe0d2.3ca42"]]},{"id":"723da42a.d12fec","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1975.142807006836,"y":1468.4760828018188,"z":"85bef54a.63a4f8","wires":[["cecb74d6.760fe8"]]},{"id":"f6c3383e.93cd68","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1401.4285202026367,"y":1469.1905269622803,"z":"85bef54a.63a4f8","wires":[["99866447.2f71e8"]]},{"id":"285fe0d2.3ca42","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1975.6195335388184,"y":1518.3333625793457,"z":"85bef54a.63a4f8","wires":[["25fd194b.69a846"]]},{"id":"cecb74d6.760fe8","type":"record","name":"record ss.param.entitlement-assignment-group-uuid","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"`'ss.param.entitlement-assignment-group-uuid = ' + $ss.param.entitlement-assignment-group-uuid`\"/>\n<parameter name=\"field3\" value=\"__SKIP saving entitlement object in AnAI__\"/>","comments":"","outputs":1,"x":2259.5713958740234,"y":1467.7619018554688,"z":"85bef54a.63a4f8","wires":[[]]},{"id":"d8ad3e8c.2f704","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2330,"y":1265.7143535614014,"z":"85bef54a.63a4f8","wires":[["7e08d129.12734"]]},{"id":"7e08d129.12734","type":"set","name":"set ss.license-updated = true","xml":"<set>\n<parameter name='ss.license-updated' value='true' />\n","comments":"","x":2550.142822265625,"y":1265.1428203582764,"z":"85bef54a.63a4f8","wires":[]},{"id":"b081f7f0.a01508","type":"switchNode","name":"ss.ss.license-updated","xml":"<switch test=\"`$ss.license-updated`\">\n\n\n","comments":"","outputs":1,"x":3238.5715103149414,"y":1202.4286546707153,"z":"85bef54a.63a4f8","wires":[["eaef5990.271bf8"]]},{"id":"eaef5990.271bf8","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3430.1427993774414,"y":1201.8572435379028,"z":"85bef54a.63a4f8","wires":[["d86b3e46.6b4fb"]]},{"id":"c62e5711.65deb8","type":"set","name":"set ss.selflink","xml":"<set>\n<parameter name=\"ss.selflink\" \n\tvalue=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + \n\t$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id + \n\t'/service-data/vnfs/vnf/' + \n\t$ss.param.vnf-id + \n\t'/vnf-data/vnf-topology/'`\" />\n","comments":"","x":995.9999771118164,"y":892.8571701049805,"z":"85bef54a.63a4f8","wires":[]}]