aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-activate.json
blob: 51cbef11cf967a9896a84f26ca9d72f02fa14444 (plain)
1
[{"id":"e6f39633.471c48","type":"dgstart","name":"DGSTART","outputs":1,"x":258.5714416503906,"y":97.14286041259766,"z":"10870127.4386af","wires":[["d6249e04.66f74"]]},{"id":"d6249e04.66f74","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":333.8571472167969,"y":137.38097190856934,"z":"10870127.4386af","wires":[["6c9006ff.722f08"]]},{"id":"6c9006ff.722f08","type":"method","name":"network-topology-operation-activate","xml":"<method rpc='network-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":375.2500762939453,"y":180.89285469055176,"z":"10870127.4386af","wires":[["913b7a05.ce48c8"]]},{"id":"913b7a05.ce48c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":374.57147216796875,"y":275.58634185791016,"z":"10870127.4386af","wires":[["483fa189.e48fa","4a952ce4.1e15f4","dd05a3dc.3a557","abcbde1a.155d9","4323ba0.5293848","64b80dfc.ef3a34","9e1fc71.9223838","c9ccd6fd.b061c8"]]},{"id":"4f6e01d6.e961e","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":894.5714416503906,"y":271.14286041259766,"z":"10870127.4386af","wires":[["a48d6330.48ebc"]]},{"id":"a48d6330.48ebc","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":1057.7658386230469,"y":271.2540817260742,"z":"10870127.4386af","wires":[]},{"id":"483fa189.e48fa","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\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":659.2935485839844,"y":275.6274642944336,"z":"10870127.4386af","wires":[["4f6e01d6.e961e","f7be2e5e.033bb"]]},{"id":"f7be2e5e.033bb","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":887.2935485839844,"y":309.6274642944336,"z":"10870127.4386af","wires":[["54a3713d.2b9d5"]]},{"id":"54a3713d.2b9d5","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":1039.4046325683594,"y":309.84969329833984,"z":"10870127.4386af","wires":[]},{"id":"e6d2c8f2.14a568","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":1087.6509094238281,"y":824.222297668457,"z":"10870127.4386af","wires":[]},{"id":"9db53dfb.ded5f","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":703.9365539550781,"y":465.3651809692383,"z":"10870127.4386af","wires":[["6df15d6b.7d45e4"]]},{"id":"6df15d6b.7d45e4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":907.9365539550781,"y":465.5080032348633,"z":"10870127.4386af","wires":[["34e2f4cb.2f293c"]]},{"id":"34e2f4cb.2f293c","type":"get-resource","name":"get eipam-ip-subnet by subnet-id","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.sli.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":863.0794677734375,"y":593.3651103973389,"z":"10870127.4386af","wires":[["5d8dc2c.3d6613c","4a3e4daf.fbea34","159507a4.d55848"]]},{"id":"d270ebed.73a6d8","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":1271.2222290039062,"y":541.0793916881084,"z":"10870127.4386af","wires":[]},{"id":"5d8dc2c.3d6613c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1121.7938232421875,"y":609.0793621242046,"z":"10870127.4386af","wires":[["9a4c8eed.e5e32"]]},{"id":"4a3e4daf.fbea34","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1122.0841064453125,"y":543.0793916881084,"z":"10870127.4386af","wires":[["d270ebed.73a6d8"]]},{"id":"159507a4.d55848","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1122.9412155151367,"y":577.3651123046875,"z":"10870127.4386af","wires":[["3bd47e7c.2eb412"]]},{"id":"9a4c8eed.e5e32","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1274.507911682129,"y":610.5079824626446,"z":"10870127.4386af","wires":[["e6d2c8f2.14a568","d1f1dda7.2a7f","743c8d64.6209d4"]]},{"id":"3bd47e7c.2eb412","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 - activate failed.\" />\n\t","comments":"","x":1270.222068786621,"y":573.3651428222656,"z":"10870127.4386af","wires":[]},{"id":"d1f1dda7.2a7f","type":"execute","name":"execute EIPAM activateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":1100.5079498291016,"y":867.0793867111206,"z":"10870127.4386af","wires":[["14296d10.9a71c3"]]},{"id":"14296d10.9a71c3","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1310.5079803466797,"y":868.4697523117065,"z":"10870127.4386af","wires":[["14bf629f.48693d"]]},{"id":"14bf629f.48693d","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while activating subnet in EIPAM.\" />\n\t","comments":"","x":1474.5079612731934,"y":867.1840448379517,"z":"10870127.4386af","wires":[]},{"id":"743c8d64.6209d4","type":"save","name":"Update subnet to Active in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ACTIVE'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1099.0794525146484,"y":907.0793333053589,"z":"10870127.4386af","wires":[["b0892e3c.001c2","81c9d2da.4de6d","6955b5ef.93cc7c"]]},{"id":"d709d6dc.cc91a8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1467.6508331298828,"y":914.2222089767456,"z":"10870127.4386af","wires":[]},{"id":"6955b5ef.93cc7c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1318.222427368164,"y":982.2221794128418,"z":"10870127.4386af","wires":[["6d0338bb.0ea688"]]},{"id":"b0892e3c.001c2","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1318.512710571289,"y":916.2222089767456,"z":"10870127.4386af","wires":[["d709d6dc.cc91a8"]]},{"id":"81c9d2da.4de6d","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1319.3698196411133,"y":950.5079295933247,"z":"10870127.4386af","wires":[["a647d288.410a9"]]},{"id":"6d0338bb.0ea688","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1470.9365158081055,"y":983.6507997512817,"z":"10870127.4386af","wires":[["9c0c90cf.0e24"]]},{"id":"a647d288.410a9","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1466.6506729125977,"y":946.5079601109028,"z":"10870127.4386af","wires":[]},{"id":"9c0c90cf.0e24","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=\"Created\" />\n\t\t","comments":"","outputs":1,"x":1696.22216796875,"y":984.3809642791748,"z":"10870127.4386af","wires":[["e6f35141.0faae","64a1bcb5.b701b4"]]},{"id":"1a14322d.73a58e","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":2087.9683380126953,"y":974.2222089767456,"z":"10870127.4386af","wires":[]},{"id":"e2c902b5.a3806","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1938.5399322509766,"y":1042.2221794128418,"z":"10870127.4386af","wires":[["958ef34e.7f381"]]},{"id":"e6f35141.0faae","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1927.4015789031982,"y":980.5079393386841,"z":"10870127.4386af","wires":[["1a14322d.73a58e"]]},{"id":"64a1bcb5.b701b4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1939.6873245239258,"y":1010.5079295933247,"z":"10870127.4386af","wires":[["434dd028.03aa2"]]},{"id":"958ef34e.7f381","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2091.254020690918,"y":1043.6507997512817,"z":"10870127.4386af","wires":[[]]},{"id":"434dd028.03aa2","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":2086.96817779541,"y":1006.5079601109028,"z":"10870127.4386af","wires":[]},{"id":"abcbde1a.155d9","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":667.3651161193848,"y":1390.507939338684,"z":"10870127.4386af","wires":[]},{"id":"64b80dfc.ef3a34","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":667.3690605163574,"y":1310.7019815444946,"z":"10870127.4386af","wires":[]},{"id":"4a952ce4.1e15f4","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n","comments":"","x":661.6546936035156,"y":1273.5590896606445,"z":"10870127.4386af","wires":[]},{"id":"dd05a3dc.3a557","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='Created' />\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":709.6547546386719,"y":1356.1304550170898,"z":"10870127.4386af","wires":[]},{"id":"4323ba0.5293848","type":"switchNode","name":"switch $aai.l3-network.subnets.subnet_length","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":692.5714416503906,"y":369.1428909301758,"z":"10870127.4386af","wires":[["24ed13fa.fd22fc","87c32ead.5792"]]},{"id":"24ed13fa.fd22fc","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1012.5714416503906,"y":369.1428909301758,"z":"10870127.4386af","wires":[["55d6b99e.dc48b8"]]},{"id":"55d6b99e.dc48b8","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":1234.3489685058594,"y":367.03186798095703,"z":"10870127.4386af","wires":[]},{"id":"87c32ead.5792","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":888.5714416503906,"y":409.1428909301758,"z":"10870127.4386af","wires":[["9db53dfb.ded5f"]]},{"id":"9e1fc71.9223838","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=\"Active\" />\t","comments":"","outputs":1,"x":699.2381057739258,"y":1153.476107597351,"z":"10870127.4386af","wires":[["503fe113.27f6d","728bfb7d.f2fb44"]]},{"id":"f1272b1f.5a1378","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":1112.317611694336,"y":1138.9840593338013,"z":"10870127.4386af","wires":[]},{"id":"9d9f3cda.c470f","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":962.8892059326172,"y":1206.9840297698975,"z":"10870127.4386af","wires":[["ef2d84a7.0876f8"]]},{"id":"503fe113.27f6d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":951.7508525848389,"y":1145.2697896957397,"z":"10870127.4386af","wires":[["f1272b1f.5a1378"]]},{"id":"728bfb7d.f2fb44","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":964.0365982055664,"y":1175.2697799503803,"z":"10870127.4386af","wires":[["3ba7e47e.1480bc"]]},{"id":"ef2d84a7.0876f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1115.6032943725586,"y":1208.4126501083374,"z":"10870127.4386af","wires":[[]]},{"id":"3ba7e47e.1480bc","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":1111.3174514770508,"y":1171.2698104679585,"z":"10870127.4386af","wires":[]},{"id":"c9ccd6fd.b061c8","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":703.0832290649414,"y":1233.5590562820435,"z":"10870127.4386af","wires":[]}]