diff options
author | 2017-11-01 23:44:10 +0000 | |
---|---|---|
committer | 2017-11-01 23:44:10 +0000 | |
commit | dca09f83325b3126b5135dee8b13ffc7bcd331d5 (patch) | |
tree | a385aeee66def33f470714a4e50375588827aae4 /platform-logic/generic-resource-api/src/main/xml | |
parent | 939b4f2701515545e0fa60514e8c99eb682a1fdf (diff) | |
parent | ecfdc27ead0ef5d9c057678c3e38259e8a3d4d1d (diff) |
Merge "Fix tunnelxconn assign issues"
Former-commit-id: 23a35ef1ce42fba477df0ffa84816e28bb5adbc5
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
3 files changed, 32 insertions, 42 deletions
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 58bdf73b..f14e72b8 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,16 +1,13 @@ <!--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.manage-vni.action'>
+</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) from IPV4_ADDRESS_POOL where universe='VGW' and status='AVAILABLE'" pfx="tmp.manage-ipaddr.results" >
+<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'>
-<block>
-<set>
-<parameter name='tmp.manage-ipaddr.ip' value='`$tmp.manage-ipaddr.results.ipv4_addr`' />
-</set><save plugin='`$tmp.sql.plugin`' resource='IPADDR' key="UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr=$tmp.manage-ipaddr.ip" force='false'>
+<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></block></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.manage-ipaddr.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 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 index a1a90d7e..169d20b2 100644 --- 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 @@ -1,16 +1,13 @@ <!--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'>
+</set><switch test='`$tmp.manageVni.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" >
+<block atomic='true'><get-resource plugin='`$tmp.sql.plugin`' resource='VNI' key="SELECT min(vlan_id) vni from VLAN_ID_POOL where purpose = $tmp.manageVni.pool and status='AVAILABLE'" pfx="tmp.manageVni" >
<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 plugin='`$tmp.sql.plugin`' resource='VNI' key="UPDATE VLAN_ID_POOL set status='RESERVED' where purpose='VNI' and vlan_id = $tmp.manageVni.vni" force='false'>
-</save></block></outcome></get-resource></block></outcome><outcome value='release'>
+</save></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 diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml index 963e5cd4..c4b49c35 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_tunnelxconn-topology-operation-assign.xml @@ -32,7 +32,7 @@ <parameter name="error-message"
value="`'Existing tunnelxconn-allotted-resource with order status of ' + $mdsal-ar.tunnelxconn-allotted-resource.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
</return></outcome><outcome value='Other'>
-<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='VNF-API' key='vnfs/vnf-list/$tmp.ar.parent-service-instance-id/' pfx='parent-service-instance' >
+<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='VNF-API' key='vnfs/vnf-list/$tmp.ar.parent-service-instance-id/service-data/' pfx='parent-service-instance' >
<outcome value='success'>
<block atomic="true">
<set>
@@ -134,29 +134,40 @@ value="`$ar-model.version`" /> </set><set>
<parameter name='tmp.vni' value='123' />
<parameter name='tmp.vgmux-bearer-ip' value='127.0.0.1' />
-<parameter name='tmp.vgmux-lan-ip' value='127.0.0.1' /></set><switch test="$parent-service-instance.service-data.vnf-topology.vnf-parameters_length != ''">
+<parameter name='tmp.vgmux-lan-ip' value='127.0.0.1' /></set><switch test="`$parent-service-instance.service-data.vnf-topology-information.vnf-parameters_length != ''`">
<outcome value='true'>
-<for index='curparm' start='0' end='`$parent-service-instance.service-data.vnf-topology.vnf-parameters_length`' >
-<switch test='$parent-service-instance.service-data.vnf-topology.vnf-parameters[$curidx].vnf-parameter-name'>
+<for index='curidx' start='0' end='`$parent-service-instance.service-data.vnf-topology-information.vnf-parameters_length`' >
+<switch test='`$parent-service-instance.service-data.vnf-topology-information.vnf-parameters[$curidx].vnf-parameter-name`'>
<outcome value='vgmux_private_ip_0'>
<set>
-<parameter name='tmp.vgmux-bearer-ip' value='`$parent-service-instance.service-data.vnf-topology.vnf-parameters[$curidx].vnf-parameter-value`'/>
+<parameter name='tmp.vgmux-bearer-ip' value='`$parent-service-instance.service-data.vnf-topology-information.vnf-parameters[$curidx].vnf-parameter-value`'/>
</set></outcome><outcome value='vgmux_private_ip_2'>
<set>
-<parameter name='tmp.vgmux-lan-ip' value='`$parent-service-instance.service-data.vnf-topology.vnf-parameters[$curidx].vnf-parameter-value`'/>
+<parameter name='tmp.vgmux-lan-ip' value='`$parent-service-instance.service-data.vnf-topology-information.vnf-parameters[$curidx].vnf-parameter-value`'/>
</set></outcome></switch></for></outcome></switch><set>
-<parameter name='tmp.manage-vni.action' value='reserve' />
-<parameter name='tmp.manage-ipaddr.action' value='reserve' />
-<parameter name='tmp.manage-vni.pool' value='VNI'/>
-<parameter name='tmp.manage-ipaddr.pool' value='VGW'/></set><call module='GENERIC-RESOURCE-API' rpc='manage-vni-assignment' mode='sync' >
+<parameter name='tmp.manageVni.action' value='reserve' />
+<parameter name='tmp.manageIpaddr.action' value='reserve' />
+<parameter name='tmp.manageVni.pool' value='VNI'/>
+<parameter name='tmp.manageIpaddr.pool' value='VGW'/></set><call module='GENERIC-RESOURCE-API' rpc='manage-vni-assignment' mode='sync' >
</call><call module='GENERIC-RESOURCE-API' rpc='manage-ipaddr-assignment' mode='sync' >
</call><set>
-<parameter name='tx-ar-assignments.vni' value='`$tmp.manage-vni.vni`'/>
+<parameter name='tx-ar-assignments.vni' value='`$tmp.manageVni.vni`'/>
<parameter name='tx-ar-assignments.vgmux-bearer-ip' value='`$tmp.vgmux-bearer-ip`'/>
<parameter name='tx-ar-assignments.vgmux-lan-ip' value='`$tmp.vgmux-lan-ip`'/>
-<parameter name='tx-ar-assignments.vgw-private-ip-0' value='`$tmp.manage-ipaddr.ip`'/>
+<parameter name='tx-ar-assignments.vg-ip' value='`$tmp.manageIpaddr.ip`'/>
+
+</set><set>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[0].name' value='VNI'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[0].value' value='`$tmp.manageVni.vni`'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[1].name' value='vgmux_private_ip_0'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[1].value' value='`$tmp.vgmux-bearer-ip`'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[2].name' value='vgmux_private_ip_2'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[2].value' value='`$tmp.vgmux-lan-ip`'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[3].name' value='vgw_private_ip_0'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters.param[3].value' value='`$tmp.manageIpaddr.ip`'/>
+<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-parameters_length' value='4'/>
</set><set>
<parameter name='tx-ar.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.'
@@ -230,22 +241,7 @@ value="`$tx-ar-assignments.`" /> <outcome value='success'>
<block>
-<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='DELETE' />
- <parameter name="responsePrefix" value="parent" />
-
-<outcome value='success'>
-<block>
</block></outcome><outcome value='failure'>
-<block>
-</block></outcome><outcome value='not-found'>
-<block>
-</block></outcome></execute></block></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
|