summaryrefslogtreecommitdiffstats
path: root/platform-logic
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic')
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_manage-ipaddr-assignment.json212
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-ipaddr-assignment.xml37
2 files changed, 235 insertions, 14 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_manage-ipaddr-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_manage-ipaddr-assignment.json
index 98f31c04..952535f4 100644
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_manage-ipaddr-assignment.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_manage-ipaddr-assignment.json
@@ -1 +1,211 @@
-[{"id":"6c77e0ff.812608","type":"dgstart","name":"DGSTART","outputs":1,"x":115,"y":68,"z":"3d31b783.83364","wires":[["eeca2dac.71c38"]]},{"id":"eeca2dac.71c38","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"Reserve/release VNI","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":298,"y":157,"z":"3d31b783.83364","wires":[["5622528.2d1752c"]]},{"id":"5622528.2d1752c","type":"method","name":"manage-ipaddr-assignment","xml":"<method rpc='manage-ipaddr-assignment' mode='sync'>\n","comments":"","outputs":1,"x":400,"y":229,"z":"3d31b783.83364","wires":[["928c2075.c1ea38"]]},{"id":"6b987445.22932c","type":"switchNode","name":"switch $tmp.manageIpaddr.action","xml":"<switch test='`$tmp.manageIpaddr.action`'>\n","comments":"","outputs":1,"x":874,"y":262,"z":"3d31b783.83364","wires":[["c7842702.edc6a8","bdab292c.3fb228"]]},{"id":"c7842702.edc6a8","type":"outcome","name":"reserve","xml":"<outcome value='reserve'>\n","comments":"","outputs":1,"x":1156,"y":261,"z":"3d31b783.83364","wires":[["fe238eec.5c8f68"]]},{"id":"fe238eec.5c8f68","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1328,"y":263,"z":"3d31b783.83364","wires":[["b640d0c8.5d0da8"]]},{"id":"b640d0c8.5d0da8","type":"get-resource","name":"get-resource IPADDR from IPV4_ADDRESS_POOL","xml":"<get-resource plugin='`$tmp.sql.plugin`' resource='VNI' key=\"SELECT min(ipv4_addr) ip from IPV4_ADDRESS_POOL where universe = $tmp.manageIpaddr.pool and status='AVAILABLE'\" pfx=\"tmp.manageIpaddr\" >\n","comments":"","outputs":1,"x":1609,"y":264,"z":"3d31b783.83364","wires":[["834dd8d3.47713"]]},{"id":"928c2075.c1ea38","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":632,"y":228,"z":"3d31b783.83364","wires":[["faee9c.6ff1d968","6b987445.22932c"]]},{"id":"faee9c.6ff1d968","type":"set","name":"set sql plugin name","xml":"<set>\n<parameter name='tmp.sql.plugin' value='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' />\n","comments":"","x":839,"y":187,"z":"3d31b783.83364","wires":[]},{"id":"834dd8d3.47713","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1881,"y":262,"z":"3d31b783.83364","wires":[["c03409b6.2bb5d"]]},{"id":"c03409b6.2bb5d","type":"save","name":"Mark ip address reserved","xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n","comments":"","outputs":1,"x":2098,"y":264,"z":"3d31b783.83364","wires":[[]]},{"id":"bdab292c.3fb228","type":"outcome","name":"release","xml":"<outcome value='release'>\n","comments":"","outputs":1,"x":1154,"y":328,"z":"3d31b783.83364","wires":[["22501595.859f1a"]]},{"id":"22501595.859f1a","type":"save","name":"Mark ipaddress available","xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='AVAILABLE' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n","comments":"","outputs":1,"x":1340,"y":331,"z":"3d31b783.83364","wires":[[]]}] \ No newline at end of file
+[
+ {
+ "id":"d81e50c6.10867",
+ "type":"dgstart",
+ "name":"DGSTART",
+ "outputs":1,
+ "x":186,
+ "y":168,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "794b3924.54ea18"
+ ]
+ ]
+ },
+ {
+ "id":"794b3924.54ea18",
+ "type":"service-logic",
+ "name":"GENERIC-RESOURCE-API ${project.version}",
+ "module":"GENERIC-RESOURCE-API",
+ "version":"${project.version}",
+ "comments":"Reserve/release IP",
+ "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":369,
+ "y":257,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "3876df34.9cbea"
+ ]
+ ]
+ },
+ {
+ "id":"3876df34.9cbea",
+ "type":"method",
+ "name":"manage-ipaddr-assignment",
+ "xml":"<method rpc='manage-ipaddr-assignment' mode='sync'>\n",
+ "comments":"",
+ "outputs":1,
+ "x":471,
+ "y":329,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "255e6973.efa936"
+ ]
+ ]
+ },
+ {
+ "id":"eac5864f.de8f18",
+ "type":"switchNode",
+ "name":"switch $tmp.manageIpaddr.action",
+ "xml":"<switch test='`$tmp.manageIpaddr.action`'>\n",
+ "comments":"",
+ "outputs":1,
+ "x":945,
+ "y":362,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "980f17d0.c10a28",
+ "2fb21d9f.e9b6e2"
+ ]
+ ]
+ },
+ {
+ "id":"980f17d0.c10a28",
+ "type":"outcome",
+ "name":"reserve",
+ "xml":"<outcome value='reserve'>\n",
+ "comments":"",
+ "outputs":1,
+ "x":1227,
+ "y":361,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "ab295c0b.78142"
+ ]
+ ]
+ },
+ {
+ "id":"ab295c0b.78142",
+ "type":"block",
+ "name":"block : atomic",
+ "xml":"<block atomic='true'>",
+ "atomic":"true",
+ "comments":"",
+ "outputs":1,
+ "x":1399,
+ "y":363,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "8fd400db.0432d"
+ ]
+ ]
+ },
+ {
+ "id":"8fd400db.0432d",
+ "type":"get-resource",
+ "name":"get-resource IPADDR from IPV4_ADDRESS_POOL",
+ "xml":"<get-resource plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"SELECT min(ipv4_addr) ip from IPV4_ADDRESS_POOL where universe = $tmp.manageIpaddr.pool and status='AVAILABLE'\" pfx=\"tmp.manageIpaddr\" >\n",
+ "comments":"",
+ "outputs":1,
+ "x":1680,
+ "y":364,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "7fb7948a.ed39dc"
+ ]
+ ]
+ },
+ {
+ "id":"255e6973.efa936",
+ "type":"block",
+ "name":"block : atomic",
+ "xml":"<block atomic='true'>",
+ "atomic":"true",
+ "comments":"",
+ "outputs":1,
+ "x":703,
+ "y":328,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "d5fece9.ea5c63",
+ "eac5864f.de8f18"
+ ]
+ ]
+ },
+ {
+ "id":"d5fece9.ea5c63",
+ "type":"set",
+ "name":"set sql plugin name",
+ "xml":"<set>\n<parameter name='tmp.sql.plugin' value='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' />\n",
+ "comments":"",
+ "x":910,
+ "y":287,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+
+ ]
+ },
+ {
+ "id":"7fb7948a.ed39dc",
+ "type":"success",
+ "name":"success",
+ "xml":"<outcome value='success'>\n",
+ "comments":"",
+ "outputs":1,
+ "x":1952,
+ "y":362,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "7a9dcfdb.a10f9"
+ ]
+ ]
+ },
+ {
+ "id":"7a9dcfdb.a10f9",
+ "type":"save",
+ "name":"Mark ip address reserved",
+ "xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n",
+ "comments":"",
+ "outputs":1,
+ "x":2169,
+ "y":364,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+
+ ]
+ ]
+ },
+ {
+ "id":"2fb21d9f.e9b6e2",
+ "type":"outcome",
+ "name":"release",
+ "xml":"<outcome value='release'>\n",
+ "comments":"",
+ "outputs":1,
+ "x":1225,
+ "y":428,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+ "a8f883cf.1ee52"
+ ]
+ ]
+ },
+ {
+ "id":"a8f883cf.1ee52",
+ "type":"save",
+ "name":"Mark ipaddress available",
+ "xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='AVAILABLE' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n",
+ "comments":"",
+ "outputs":1,
+ "x":1411,
+ "y":431,
+ "z":"ee2bc85b.58f498",
+ "wires":[
+ [
+
+ ]
+ ]
+ }
+] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-ipaddr-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-ipaddr-assignment.xml
index f14e72b8..724faf38 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-ipaddr-assignment.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-ipaddr-assignment.xml
@@ -1,13 +1,24 @@
-<!--Reserve/release VNI--><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='manage-ipaddr-assignment' mode='sync'>
-<block atomic='true'><set>
-<parameter name='tmp.sql.plugin' value='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' />
-</set><switch test='`$tmp.manageIpaddr.action`'>
-<outcome value='reserve'>
-<block atomic='true'><get-resource plugin='`$tmp.sql.plugin`' resource='VNI' key="SELECT min(ipv4_addr) ip from IPV4_ADDRESS_POOL where universe = $tmp.manageIpaddr.pool and status='AVAILABLE'" pfx="tmp.manageIpaddr" >
-<outcome value='success'>
-<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key="UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip" force='false'>
-
-</save></outcome></get-resource></block></outcome><outcome value='release'>
-<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key="UPDATE IPV4_ADDRESS_POOL set status='AVAILABLE' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip" force='false'>
-
-</save></outcome></switch></block></method></service-logic> \ No newline at end of file
+<!--Reserve/release IP-->
+<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='manage-ipaddr-assignment' mode='sync'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.sql.plugin' value='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' />
+ </set>
+ <switch test='`$tmp.manageIpaddr.action`'>
+ <outcome value='reserve'>
+ <block atomic='true'>
+ <get-resource plugin='`$tmp.sql.plugin`' resource='IPADDR' key="SELECT min(ipv4_addr) ip from IPV4_ADDRESS_POOL where universe = $tmp.manageIpaddr.pool and status='AVAILABLE'" pfx="tmp.manageIpaddr" >
+ <outcome value='success'>
+ <save plugin='`$tmp.sql.plugin`' resource='IPADDR' key="UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip" force='false'></save>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='release'>
+ <save plugin='`$tmp.sql.plugin`' resource='IPADDR' key="UPDATE IPV4_ADDRESS_POOL set status='AVAILABLE' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip" force='false'></save>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file