diff options
author | 2017-11-01 15:31:08 -0400 | |
---|---|---|
committer | 2017-11-01 15:31:08 -0400 | |
commit | 9a1267e79c232b949f666cc130ebb9837f594090 (patch) | |
tree | 4a2445a07ae87d9b58c83ed55185725795c933de /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml | |
parent | 817f1f33ddffb9ae86a77613439c50ff2059859f (diff) |
Updates to tunnelxconn assignment
Update tunnelxconn assignment logic to assign IP address and VNI
from local inventory
Change-Id: I1aae9162d1eb7a61d641b620488d52abdfe32357
Issue-ID: SDNC-160
Signed-off-by: Dan Timoney <dtimoney@att.com>
Former-commit-id: a7e7279c379e470c1cf7446099fbc11b66fd2ac8
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml new file mode 100644 index 00000000..a1a90d7e --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_manage-vni-assignment.xml @@ -0,0 +1,16 @@ +<!--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-vni-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.manage-vni.action'>
+<outcome value='reserve'>
+<block atomic='true'><get-resource plugin='`$tmp.sql.plugin`' resource='VNI' key="SELECT min(vlan_id) from VLAN_ID_POOL where purpose='VNI' and status='AVAILABLE'" pfx="tmp.manage-vni.results" >
+<outcome value='success'>
+<block>
+<set>
+<parameter name='tmp.manage-vni.vni' value='`$tmp.manage-vni.results.vlan-id`' />
+</set><save plugin='`$tmp.sql.plugin`' resource='VNI' key="UPDATE VLAN_ID_POOL set status='RESERVED' where purpose='VNI' and vlan_id=$tmp.manage-vni.vni" force='false'>
+
+</save></block></outcome></get-resource></block></outcome><outcome value='release'>
+<save plugin='`$tmp.sql.plugin`' resource='VNI' key="UPDATE VLAN_ID_POOL set status='AVAILABLE' where purpose='VNI' and vlan_id=$tmp.manage-vni.vni" force='false'>
+
+</save></outcome></switch></block></method></service-logic>
\ No newline at end of file |