diff options
author | Hesam Rahimi <hesam.rahimi@huawei.com> | 2021-06-07 20:02:32 +0000 |
---|---|---|
committer | Herbert Eiselt <herbert.eiselt@highstreet-technologies.com> | 2021-06-17 15:49:33 +0000 |
commit | b20349a92894af9b948c8bf2b5c67c5bd86f9da5 (patch) | |
tree | 19572a62662282a3e16ea5ecf28da91031de3eac /platform-logic/generic-resource-api/src/main/xml | |
parent | 10a11542b39240d0f6b969d662c794a42782731a (diff) |
Calculating the maximum tpn for otn tunnels among all domains
Issue-ID: SDNC-1563
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: I4a0207d09698d7bd5f9c35160f98b64bb8221e39
Former-commit-id: c53664df29b5fed1c2c413434cefa890f68ec815
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
3 files changed, 48 insertions, 2 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml new file mode 100644 index 00000000..111aed3a --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml @@ -0,0 +1,42 @@ +<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='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='maxtpn' value='0' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-bindings"
+ key="selflink = 'https://aai.onap:8443/aai/v21/network/vpn-bindings"
+ local-only="false"
+ pfx="tmp.aai.allvpnbindings" >
+ <outcome value='not-found'></outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='allvpnbidx' start='0' end='`$tmp.aai.allvpnbindings.vpn-binding_length`' >
+ <block atomic='true'>
+ <switch test="`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id >= $maxtpn `">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='maxtpn' value='`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml index 446a74a8..4c336b63 100644 --- a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml @@ -734,6 +734,7 @@ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name="filename" value="`$filenamemm`" />
</execute>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call>
<for index='otnidx' start='0' end='`$tmp.otninfo_length`' >
<block atomic='true'>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
@@ -871,7 +872,8 @@ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >
<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />
<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />
- <parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />
+ <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->
+ <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />
<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />
<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml index 6d57a785..9a8a9179 100644 --- a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml @@ -848,6 +848,7 @@ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name="filename" value="`$filenamemm`" />
</execute>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call>
<for index='otnidx' start='0' end='`$tmp.otninfo_length`' >
<block atomic='true'>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
@@ -981,7 +982,8 @@ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >
<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />
<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />
- <parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />
+ <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->
+ <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />
<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />
<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
|