1
|
[{"id":"14daaafb.cfb32d","type":"dgstart","name":"DGSTART","outputs":1,"x":173.75,"y":129,"z":"77025d4d.14b56c","wires":[["f4bbcde0.af09e"]]},{"id":"f4bbcde0.af09e","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":249.03570556640625,"y":169.23811149597168,"z":"77025d4d.14b56c","wires":[["5fbb453b.4759ec"]]},{"id":"5fbb453b.4759ec","type":"method","name":"network-topology-operation-deactivate","xml":"<method rpc='network-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":290.4286346435547,"y":212.7499942779541,"z":"77025d4d.14b56c","wires":[["7d0cac4e.a012bc"]]},{"id":"7d0cac4e.a012bc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":289.7500305175781,"y":307.4434814453125,"z":"77025d4d.14b56c","wires":[["56f1ffc8.cfe08","3307fea0.093582","1815769f.84fee9","70d42023.37ca2","ca5854c8.77f3e8","b18b10b3.ba84","fca0b4.8ea8575","52526c97.38f26c"]]},{"id":"892f2ad9.7eb3d","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":809.75,"y":303,"z":"77025d4d.14b56c","wires":[["f4ddd25b.a09008"]]},{"id":"f4ddd25b.a09008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"network-id not found in AAI\" />","comments":"","x":972.9443969726562,"y":303.11122131347656,"z":"77025d4d.14b56c","wires":[]},{"id":"56f1ffc8.cfe08","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\n\t\tAND depth='all'\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":574.4721069335938,"y":307.48460388183594,"z":"77025d4d.14b56c","wires":[["892f2ad9.7eb3d","5598ef33.7bef78"]]},{"id":"5598ef33.7bef78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":802.4721069335938,"y":341.48460388183594,"z":"77025d4d.14b56c","wires":[["aa29118b.944c18"]]},{"id":"aa29118b.944c18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'\" />","comments":"","x":954.5831909179688,"y":341.7068328857422,"z":"77025d4d.14b56c","wires":[]},{"id":"c78c5de.c563b2","type":"set","name":"set entity-id and plan-name","xml":"<set>\n\t<parameter name=\"eipam-ip-block.entity-id\" value=\"`$aai.l3-network.subnets.subnet[$sidx].subnet-id`\"/>\n\t<parameter name=\"eipam-ip-block.plans[0].plan-name\" value=\"$tmp.eipam-subnet-row.plan-name\"/>\n","comments":"","x":1811.8294677734375,"y":1034.0794677734375,"z":"77025d4d.14b56c","wires":[]},{"id":"a643faf5.fe499","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >\n","comments":"","outputs":1,"x":1010.1151733398438,"y":889.2223434448242,"z":"77025d4d.14b56c","wires":[["68c43f3c.00c098"]]},{"id":"68c43f3c.00c098","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1216.1151733398438,"y":889.3651733398438,"z":"77025d4d.14b56c","wires":[["f980e441.a4f0e8","4742308d.adb84"]]},{"id":"4742308d.adb84","type":"get-resource","name":"get eipam-ip-subnet by subnet-id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_SUBNETS where entity_id = $aai.l3-network.subnets.subnet[$sidx].subnet-id ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1169.258056640625,"y":1017.2222900390625,"z":"77025d4d.14b56c","wires":[["ef2c2ad7.25d89","da139eef.0a22f8","4e6832fa.59be34"]]},{"id":"7e87eaef.56d814","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNETS failed to find subnet matching aai subnet.\" />\n\t","comments":"","x":1577.4008483886719,"y":964.9365541636944,"z":"77025d4d.14b56c","wires":[]},{"id":"ef2c2ad7.25d89","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1427.9724426269531,"y":1032.9365245997906,"z":"77025d4d.14b56c","wires":[["dde7fe1d.76f4e8"]]},{"id":"da139eef.0a22f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1428.2627258300781,"y":966.9365541636944,"z":"77025d4d.14b56c","wires":[["7e87eaef.56d814"]]},{"id":"4e6832fa.59be34","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1429.1198348999023,"y":1001.2222747802734,"z":"77025d4d.14b56c","wires":[["c1fa360.29f75c8"]]},{"id":"dde7fe1d.76f4e8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1580.6865310668945,"y":1034.3651449382305,"z":"77025d4d.14b56c","wires":[["c78c5de.c563b2"]]},{"id":"c1fa360.29f75c8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Subnet not found in EIPAM_IP_SUBNETS - deactivate failed.\" />\n\t","comments":"","x":1578.0673828125,"y":1000.5556392669678,"z":"77025d4d.14b56c","wires":[]},{"id":"f980e441.a4f0e8","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":1122.4007568359375,"y":1072.2380981445312,"z":"77025d4d.14b56c","wires":[["4a6d988.b322be8","840ca69.87f17d8"]]},{"id":"3e773e43.8c9882","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1582.1469192504883,"y":1076.0793306529522,"z":"77025d4d.14b56c","wires":[]},{"id":"237731b2.80bc3e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1432.7185134887695,"y":1144.0793010890484,"z":"77025d4d.14b56c","wires":[["2dc84f58.c960e"]]},{"id":"4a6d988.b322be8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1421.5801601409912,"y":1082.3650610148907,"z":"77025d4d.14b56c","wires":[["3e773e43.8c9882"]]},{"id":"840ca69.87f17d8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1433.8659057617188,"y":1112.3650512695312,"z":"77025d4d.14b56c","wires":[["7462188c.17d9a"]]},{"id":"2dc84f58.c960e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1585.432601928711,"y":1145.5079214274883,"z":"77025d4d.14b56c","wires":[[]]},{"id":"7462188c.17d9a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet. Subnet not found.\" />\n\t","comments":"","x":1581.1467590332031,"y":1108.3650817871094,"z":"77025d4d.14b56c","wires":[]},{"id":"70d42023.37ca2","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":565.5436744689941,"y":1408.3650598526,"z":"77025d4d.14b56c","wires":[]},{"id":"b18b10b3.ba84","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $networkId\n + '/network-data/network-topology/'` \" />\n \n","comments":"","x":565.5476188659668,"y":1328.5591020584106,"z":"77025d4d.14b56c","wires":[]},{"id":"3307fea0.093582","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n","comments":"","x":559.833251953125,"y":1291.4162101745605,"z":"77025d4d.14b56c","wires":[]},{"id":"1815769f.84fee9","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />\n","comments":"","x":607.8333129882812,"y":1367.987564086914,"z":"77025d4d.14b56c","wires":[]},{"id":"52526c97.38f26c","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n","comments":"","x":601.2617874145508,"y":1254.7494916915894,"z":"77025d4d.14b56c","wires":[]},{"id":"ca5854c8.77f3e8","type":"switchNode","name":"switch $aai.l3-network.subnets.subnet_length","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":609.75,"y":403.0000343322754,"z":"77025d4d.14b56c","wires":[["232b1d63.e94362","6a5ead37.eada7c"]]},{"id":"232b1d63.e94362","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":905.75,"y":403.0000343322754,"z":"77025d4d.14b56c","wires":[["bc99db97.911"]]},{"id":"bc99db97.911","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=\"no networks found\" />\n","comments":"","x":1097.527587890625,"y":402.88901138305664,"z":"77025d4d.14b56c","wires":[]},{"id":"6a5ead37.eada7c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":891.75,"y":433.00006103515625,"z":"77025d4d.14b56c","wires":[["cdc25fad.e85d48"]]},{"id":"fca0b4.8ea8575","type":"save","name":"update AnAI - network","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":606.75,"y":1166.9998931884766,"z":"77025d4d.14b56c","wires":[["e31687c4.b37f78","c340787e.1371"]]},{"id":"fb75aff2.792f48","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network\" />\n\t","comments":"","x":1010.4961700439453,"y":1156.8411798477173,"z":"77025d4d.14b56c","wires":[]},{"id":"d509e915.753cd","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":861.0677642822266,"y":1224.8411502838135,"z":"77025d4d.14b56c","wires":[["fd8de859.5c0a58"]]},{"id":"e31687c4.b37f78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":849.9294109344482,"y":1163.1269102096558,"z":"77025d4d.14b56c","wires":[["fb75aff2.792f48"]]},{"id":"c340787e.1371","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":862.2151565551758,"y":1193.1269004642963,"z":"77025d4d.14b56c","wires":[["fc060a13.6445d"]]},{"id":"fd8de859.5c0a58","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1013.781852722168,"y":1226.2697706222534,"z":"77025d4d.14b56c","wires":[[]]},{"id":"fc060a13.6445d","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network. Network not found.\" />\n\t","comments":"","x":1009.4960098266602,"y":1189.1269309818745,"z":"77025d4d.14b56c","wires":[]},{"id":"cdc25fad.e85d48","type":"switchNode","name":"switch network-instance-group-id","xml":"<switch test='`$network-data.network-topology.network-topology-identifier-structure.network-instance-group-id`'>\n","comments":"","outputs":1,"x":592.49609375,"y":497.74609375,"z":"77025d4d.14b56c","wires":[["18fc8322.dd2f4d","2194454c.3682ca"]]},{"id":"18fc8322.dd2f4d","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":885.49609375,"y":496.24609375,"z":"77025d4d.14b56c","wires":[["86679cd0.c293d8"]]},{"id":"2194454c.3682ca","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":876.49609375,"y":527.24609375,"z":"77025d4d.14b56c","wires":[["994f705c.0c442"]]},{"id":"994f705c.0c442","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1071.49609375,"y":526.24609375,"z":"77025d4d.14b56c","wires":[["acafc97.3adb1b8"]]},{"id":"acafc97.3adb1b8","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=\"network collection activate failed\" />\n","comments":"","x":1272.49609375,"y":521.24609375,"z":"77025d4d.14b56c","wires":[]},{"id":"1e224df6.f166ba","type":"comment","name":"need to implement this","info":"","comments":"","x":1302.49609375,"y":489.74609375,"z":"77025d4d.14b56c","wires":[]},{"id":"86679cd0.c293d8","type":"switchNode","name":"switch from-preload","xml":"<switch test='`$service-data.networks.network[$nidx].network-data.network-information.from-preload`'>\n","comments":"","outputs":1,"x":558.49609375,"y":591.74609375,"z":"77025d4d.14b56c","wires":[["6131428b.0d8d6c","b1a3cb6c.9a95f8"]]},{"id":"6131428b.0d8d6c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":546.49609375,"y":670.24609375,"z":"77025d4d.14b56c","wires":[["aa34043d.dac1c8"]]},{"id":"b1a3cb6c.9a95f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":568.4961547851562,"y":888.24609375,"z":"77025d4d.14b56c","wires":[["32048c62.298084"]]},{"id":"aa34043d.dac1c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":732.74609375,"y":671.24609375,"z":"77025d4d.14b56c","wires":[["aa5a777f.f5c22"]]},{"id":"32048c62.298084","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":780.7461547851562,"y":888.24609375,"z":"77025d4d.14b56c","wires":[["a643faf5.fe499"]]},{"id":"aa5a777f.f5c22","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >\n","comments":"","outputs":1,"x":939.49609375,"y":671.74609375,"z":"77025d4d.14b56c","wires":[["aa6f6d68.9a1f58"]]},{"id":"aa6f6d68.9a1f58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1145.49609375,"y":671.8889236450195,"z":"77025d4d.14b56c","wires":[["3f1cbdf1.3ab7ca"]]},{"id":"3f1cbdf1.3ab7ca","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $aai.l3-network.subnets.subnet[$sidx].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":1374.49609375,"y":670.74609375,"z":"77025d4d.14b56c","wires":[["566ebc6d.9edeac","39776162.ed9356"]]},{"id":"63d5a91e.32272","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1759.242317199707,"y":664.5873872935772,"z":"77025d4d.14b56c","wires":[]},{"id":"2c140bc5.40cc2c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1609.8139114379883,"y":732.5873577296734,"z":"77025d4d.14b56c","wires":[["1a86f56d.e7b24b"]]},{"id":"566ebc6d.9edeac","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1598.67555809021,"y":670.8731176555157,"z":"77025d4d.14b56c","wires":[["63d5a91e.32272"]]},{"id":"39776162.ed9356","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1610.9613037109375,"y":700.8731079101562,"z":"77025d4d.14b56c","wires":[["f099c00a.ba535"]]},{"id":"1a86f56d.e7b24b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1762.5279998779297,"y":734.0159780681133,"z":"77025d4d.14b56c","wires":[[]]},{"id":"f099c00a.ba535","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet. Subnet not found.\" />\n\t","comments":"","x":1758.2421569824219,"y":696.8731384277344,"z":"77025d4d.14b56c","wires":[]}]
|