1
|
[{"id":"944f4f91.384e8","type":"dgstart","name":"DGSTART","outputs":1,"x":98.5714340209961,"y":82.41365623474121,"z":"b870dbc1.f01f08","wires":[["5385f04.eb80e1"]]},{"id":"5385f04.eb80e1","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>","outputs":1,"x":212.85713958740234,"y":122.65176773071289,"z":"b870dbc1.f01f08","wires":[["790a0d91.15b024"]]},{"id":"790a0d91.15b024","type":"method","name":"method vnf-topology-operation-unassign","xml":"<method rpc='vnf-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":195.00006103515625,"y":162.4136562347412,"z":"b870dbc1.f01f08","wires":[["bdca26b2.1447d8"]]},{"id":"49372a3c.517844","type":"comment","name":"vnf-topology-operation-unassign","info":"","comments":"","x":492.9162902832031,"y":30,"z":"b870dbc1.f01f08","wires":[]},{"id":"e61c5038.9ee12","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":502.0952453613281,"y":261.2707939147949,"z":"b870dbc1.f01f08","wires":[["fc9d5d49.169d","d6db7880.d1ef08"]]},{"id":"fc9d5d49.169d","type":"outcome","name":"DeleteVnfInstance","xml":"<outcome value='DeleteVnfInstance'>\n","comments":"","outputs":1,"x":755.8095397949219,"y":238.41367530822754,"z":"b870dbc1.f01f08","wires":[["31791927.887fa6"]]},{"id":"d6db7880.d1ef08","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":717.8095054626465,"y":284.12800312042236,"z":"b870dbc1.f01f08","wires":[["b87470b4.e1841"]]},{"id":"31791927.887fa6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":940.6666679382324,"y":238.41370487213135,"z":"b870dbc1.f01f08","wires":[[]]},{"id":"b87470b4.e1841","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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n","comments":"","x":957.809513092041,"y":284.12796115875244,"z":"b870dbc1.f01f08","wires":[]},{"id":"bdca26b2.1447d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":176.90476989746094,"y":555.7469902038574,"z":"b870dbc1.f01f08","wires":[["e61c5038.9ee12","bc0ea399.b5175","3fe9d895.d6c6d8","f8af2a3b.dfaaf8","9ec4a40.4c9046","e134089.fe067f8","407d562c.ffe458","83bb488f.f3aa38","c21ea09c.f64bc"]]},{"id":"bc0ea399.b5175","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":488.57141876220703,"y":330.74701976776123,"z":"b870dbc1.f01f08","wires":[["7206f725.eb2e88"]]},{"id":"7206f725.eb2e88","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":675.2380981445312,"y":330.0803174972534,"z":"b870dbc1.f01f08","wires":[["3f73d92a.b2f766"]]},{"id":"3f73d92a.b2f766","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n","comments":"","x":856.9047241210938,"y":330.0803174972534,"z":"b870dbc1.f01f08","wires":[]},{"id":"e134089.fe067f8","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":470.23809814453125,"y":379.08033752441406,"z":"b870dbc1.f01f08","wires":[["6e9fe2bf.dec39c"]]},{"id":"6e9fe2bf.dec39c","type":"switchNode","name":"switch this vnf-id == input vnf-id","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >\n","comments":"","outputs":1,"x":725.2381858825684,"y":377.7470054626465,"z":"b870dbc1.f01f08","wires":[["1f6e3682.240c19"]]},{"id":"1f6e3682.240c19","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":963.5714721679688,"y":376.7469835281372,"z":"b870dbc1.f01f08","wires":[["4f964f4a.a0762"]]},{"id":"4f964f4a.a0762","type":"set","name":"set vnf-index","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1131.9046669006348,"y":376.7470054626465,"z":"b870dbc1.f01f08","wires":[]},{"id":"407d562c.ffe458","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":481.9047622680664,"y":425.7470073699951,"z":"b870dbc1.f01f08","wires":[["4ebb6352.1f906c"]]},{"id":"4ebb6352.1f906c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":663.5713806152344,"y":425.08033752441406,"z":"b870dbc1.f01f08","wires":[["39b1b294.07bc9e"]]},{"id":"39b1b294.07bc9e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n","comments":"","x":830.2380676269531,"y":424.74696350097656,"z":"b870dbc1.f01f08","wires":[]},{"id":"3fe9d895.d6c6d8","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":467.12711334228516,"y":1187.4133186340332,"z":"b870dbc1.f01f08","wires":[]},{"id":"1de366e5.21c939","type":"for","name":"for each vnf","xml":"<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":990.4618606567383,"y":832.9690895080566,"z":"b870dbc1.f01f08","wires":[["61ee4251.957cdc"]]},{"id":"74a7fc40.220eb4","type":"comment","name":"Remove VNF from service data","info":"","comments":"","x":432.6206283569336,"y":791.5407419204712,"z":"b870dbc1.f01f08","wires":[]},{"id":"61ee4251.957cdc","type":"set","name":"move vnf to remove one","xml":"<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n","comments":"","x":1224.052993774414,"y":831.9930410385132,"z":"b870dbc1.f01f08","wires":[]},{"id":"9ec4a40.4c9046","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":476.71972274780273,"y":834.5487184524536,"z":"b870dbc1.f01f08","wires":[["fca60f91.c7a1e","a197ccd2.c3d8e"]]},{"id":"fca60f91.c7a1e","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":653.7197647094727,"y":795.2153053283691,"z":"b870dbc1.f01f08","wires":[["3854ad6d.628382"]]},{"id":"3854ad6d.628382","type":"set","name":"Remove vnfs","xml":"<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n","comments":"","x":817.3862609863281,"y":795.215404510498,"z":"b870dbc1.f01f08","wires":[]},{"id":"a197ccd2.c3d8e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":652.3865089416504,"y":878.5485782623291,"z":"b870dbc1.f01f08","wires":[["de8a693b.880468"]]},{"id":"e56b088f.c69118","type":"set","name":"set new vnf length","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n","comments":"","x":1010.0159492492676,"y":923.5486631393433,"z":"b870dbc1.f01f08","wires":[]},{"id":"21ac3bbb.ed36d4","type":"set","name":"Remove the last vnf in the list","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n","comments":"","x":1045.7196044921875,"y":878.6596841812134,"z":"b870dbc1.f01f08","wires":[]},{"id":"de8a693b.880468","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":821.0529975891113,"y":879.2152252197266,"z":"b870dbc1.f01f08","wires":[["1de366e5.21c939","21ac3bbb.ed36d4","e56b088f.c69118"]]},{"id":"7c3d420a.94a7ec","type":"switchNode","name":"switch current vnf-level-oper-status == Created","xml":"<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'Created'`\">\n","comments":"","outputs":1,"x":581.2380752563477,"y":471.4136772155762,"z":"b870dbc1.f01f08","wires":[["f39054b3.2d9ee8"]]},{"id":"f39054b3.2d9ee8","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":885.9047927856445,"y":471.0803165435791,"z":"b870dbc1.f01f08","wires":[["cb7c915.bf38c7"]]},{"id":"cb7c915.bf38c7","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=\"Cannot delete a VNF in a Created state\" />\n","comments":"","x":1044.2380676269531,"y":470.41364097595215,"z":"b870dbc1.f01f08","wires":[]},{"id":"f8af2a3b.dfaaf8","type":"switchNode","name":"switch current vf-module_length","xml":"<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`\">\n","comments":"","outputs":1,"x":531.571418762207,"y":557.4136428833008,"z":"b870dbc1.f01f08","wires":[["570efcb.c4d6904","8123ceeb.3d5e2","b858ddb6.e005b"]]},{"id":"570efcb.c4d6904","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":760.2380599975586,"y":514.0802841186523,"z":"b870dbc1.f01f08","wires":[["1b6ab0b1.e42baf"]]},{"id":"8123ceeb.3d5e2","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":758.8094711303711,"y":555.5089416503906,"z":"b870dbc1.f01f08","wires":[["1b6ab0b1.e42baf"]]},{"id":"1b6ab0b1.e42baf","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":907.3809852600098,"y":535.5089426040649,"z":"b870dbc1.f01f08","wires":[[]]},{"id":"b858ddb6.e005b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":758.8095207214355,"y":596.9375295639038,"z":"b870dbc1.f01f08","wires":[["c6a13249.b2d5f"]]},{"id":"c6a13249.b2d5f","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=\"Cannot delete the VNF because there are VFs defined\" />\n","comments":"","x":925.9524154663086,"y":596.5089178085327,"z":"b870dbc1.f01f08","wires":[]},{"id":"64d5b254.bed35c","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1322.4126358032227,"y":1086.9047145843506,"z":"b870dbc1.f01f08","wires":[[]]},{"id":"4f0c0b06.065bd4","type":"set","name":"set variables for deleting name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":1223.8412551879883,"y":1039.7617855072021,"z":"b870dbc1.f01f08","wires":[]},{"id":"83bb488f.f3aa38","type":"switchNode","name":"switch: sdnc-generated-cloud-resources","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>\n","comments":"","outputs":1,"x":556.4286117553711,"y":675.1587429046631,"z":"b870dbc1.f01f08","wires":[["3ad6c6a.f1af83a"]]},{"id":"3ad6c6a.f1af83a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":807.1786575317383,"y":675.1587448120117,"z":"b870dbc1.f01f08","wires":[["9f0d731c.fb8ff"]]},{"id":"a0ad75de.430768","type":"call","name":"call self-serve-vnf-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1211.9286041259766,"y":674.9087448120117,"z":"b870dbc1.f01f08","wires":[["7fe38fcd.9d338"]]},{"id":"7fe38fcd.9d338","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1419.6785888671875,"y":675.1587333679199,"z":"b870dbc1.f01f08","wires":[["9b0d248d.110118"]]},{"id":"9b0d248d.110118","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve resources with error: '+ $error-message`\" />\n","comments":"","x":1585.250015258789,"y":674.801628112793,"z":"b870dbc1.f01f08","wires":[]},{"id":"9f0d731c.fb8ff","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":980.928581237793,"y":675.1587352752686,"z":"b870dbc1.f01f08","wires":[["a0ad75de.430768"]]},{"id":"c21ea09c.f64bc","type":"switchNode","name":"switch: sdnc-generated-cloud-resources","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>\n","comments":"","outputs":1,"x":546.9047775268555,"y":1039.444423675537,"z":"b870dbc1.f01f08","wires":[["460f3dc9.fdcbe4","60026b43.620bc4"]]},{"id":"460f3dc9.fdcbe4","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":797.6548233032227,"y":1039.4444255828857,"z":"b870dbc1.f01f08","wires":[["16c7430.7fa30bd"]]},{"id":"60026b43.620bc4","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":798.0158615112305,"y":1082.7777976989746,"z":"b870dbc1.f01f08","wires":[["16c7430.7fa30bd"]]},{"id":"16c7430.7fa30bd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":965.793571472168,"y":1039.444423675537,"z":"b870dbc1.f01f08","wires":[["4f0c0b06.065bd4","64d5b254.bed35c"]]},{"id":"cb1bb44d.7af418","type":"comment","name":"check removed with US622450","info":"","comments":"","x":1251.4284439086914,"y":470.00002670288086,"z":"b870dbc1.f01f08","wires":[]}]
|