diff options
author | 2021-08-05 11:54:57 +0530 | |
---|---|---|
committer | 2021-08-05 12:01:43 +0530 | |
commit | 7cd7fe946ae07d21a3daf57a5f2868f4b4b2e7fc (patch) | |
tree | b4c49bc4b2d72df0001c2bd84b4b5029df389f0f /platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml | |
parent | a6e92d163cc81a268771cc5da4952a9aefc8c4e3 (diff) |
RAN Slice - Termination testing
Issue-ID: CCSDK-3393
Change-Id: I6b99330eb7869fbca6c840fc994fb12131f3420a
Signed-off-by: Hariharan <rh20085046@wipro.com>
Diffstat (limited to 'platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml')
-rw-r--r-- | platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml | 4090 |
1 files changed, 2042 insertions, 2048 deletions
diff --git a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml index ddf618d6..93d226f5 100644 --- a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml +++ b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_terminateRANSliceInstance.xml @@ -8,52 +8,110 @@ <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="RPC to handle terminateRANSlice.: "/> - <parameter name="field2" value="`$terminate-r-a-n-slice-input.action`"/> - <parameter name="field3" value="`$terminate-r-a-n-slice-input.common-header.timestamp`"/> - <parameter name="field4" value="`$terminate-r-a-n-slice-input.common-header.request-id`"/> - <parameter name="field5" value="`$terminate-r-a-n-slice-input.common-header.originator-id`"/> + <parameter name="field2" value="`$terminate-r-a-n-slice-instance-input.action`"/> + <parameter name="field3" value="`$terminate-r-a-n-slice-instance-input.common-header.timestamp`"/> + <parameter name="field4" value="`$terminate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="field5" value="`$terminate-r-a-n-slice-instance-input.common-header.originator-id`"/> <parameter name="field6" value="RPC Payload String "/> - <parameter name="field7" value="`$terminate-r-a-n-slice-input.payload`"/> + <parameter name="field7" value="`$terminate-r-a-n-slice-instance-input.payload`"/> </record> <set> <parameter name='error-code' value='200' /> <parameter name='error-message' value='Successful execution of terminateRANSice RPC' /> </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'> - <parameter name='source' value='terminate-r-a-n-slice-input.payload' /> - <parameter name='outputPath' value='payloadJson' /> - <parameter name='isEscaped' value='false' /> - <outcome value='success'> + <switch test='`$terminate-r-a-n-slice-instance-input.action == deallocate`'> + <outcome value='true'> <block atomic='true'> - <switch test='`$instantiate-r-a-n-slice-input.action`==deallocate'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="deallocate called" /> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'> + <parameter name='source' value='terminate-r-a-n-slice-instance-input.payload' /> + <parameter name='outputPath' value='payloadJson' /> + <parameter name='isEscaped' value='false' /> <outcome value='success'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.sNSSAI' /> - <parameter name='source' value="`$payloadJson.input.NSSAI`" /> - </execute> - </outcome> - <outcome value='failure'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.sNSSAI' /> - <parameter name='source' value="`$payloadJson.input.sliceProfile.NSSAI`" /> - </execute> + <block atomic='true'> + <set> + <parameter name='tmp.action' value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-context.log' /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Payload for terminateRANSlice.: "/> + <parameter name="field2" value="`$tmp.sNSSAI`"/> + <parameter name="field3" value="`$payloadJson.input.RANNFNSSIId`"/> + <parameter name="field4" value="`$payloadJson.input.callbackURL`"/> + <parameter name="field5" value="`$payloadJson.input.sliceProfileId`"/> + </record> + <set> + <parameter name='tmp.sNSSAI' value="`$payloadJson.input.sNSSAI`"/> + </set> + <set> + <parameter name='tmp.sliceprofileid' value="`$payloadJson.input.sliceProfileId`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="DEallocate sNSSAI: "/> + <parameter name="field2" value="`$tmp.sNSSAI`"/> + <parameter name="field3" value="`$tmp.sliceprofileid`"/> + </record> + </block> </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-context.log' /> </execute> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Payload for terminateRANSlice.: "/> - <parameter name="field2" value="`$tmp.sNSSAI`"/> - <parameter name="field3" value="`$payloadJson.input.RANNFNSSIId`"/> - <parameter name="field4" value="`$payloadJson.input.callbackURL`"/> - <parameter name="field5" value="`$payloadJson.input.sliceProfileId`"/> + <parameter name="field1" value="modify deallocate called" /> </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'> + <parameter name='source' value='instantiate-r-a-n-slice-input.payload' /> + <parameter name='outputPath' value='payloadJson' /> + <parameter name='isEscaped' value='false' /> + <outcome value='success'> + <block atomic='true'> + <set> + <parameter name='tmp.action' value="`$instantiate-r-a-n-slice-input.action`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-context.log' /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Payload for modifyallocateRANSlice.: "/> + <parameter name="field2" value="`$payloadJson.input.RANNFNSSIId`"/> + <parameter name="field3" value="`$payloadJson.input.callbackURL`"/> + <parameter name="field4" value="`$payloadJson.input.sliceProfile.sliceProfileId`"/> + </record> + <set> + <parameter name='tmp.sNSSAI' value="`$payloadJson.input.sliceProfile.sNSSAI`"/> + </set> + <set> + <parameter name='tmp.sliceprofileid' value="`$payloadJson.input.sliceProfile.sliceProfileId`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="modify-deallocate-sNSSAI: "/> + <parameter name="field2" value="`$tmp.sNSSAI`"/> + <parameter name="field3" value="`$tmp.sliceprofileid`"/> + </record> + </block> + </outcome> + </execute> </block> </outcome> - </execute> + </switch> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-context.log' /> </execute> @@ -103,10 +161,10 @@ <block atomic='true'> <set> <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> + <parameter name="tmp.status" value="success"/> <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> @@ -120,13 +178,15 @@ </record> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='*/*' /> <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -167,7 +227,7 @@ <parameter name="source" value="`$prop.restapi.configdb.getplmn`"/> <parameter name="outputPath" value="tmp.configdb.getPLMNId.url"/> <parameter name="target" value="{sliceProfileId}"/> - <parameter name="replacement" value="`$payloadJson.input.sliceProfileId`"/> + <parameter name="replacement" value="`$tmp.sliceprofileid`"/> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> @@ -186,21 +246,19 @@ </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> <parameter name='outputPath' value='tmp.pLMNId' /> - <parameter name='source' value="`getPLMN-configdb-response.pLMNId`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring'> - <parameter name="string" value="`$tmp.pLMNId`" /> - <parameter name="result" value="tmp.mcc"/> - <parameter name="begin-index" value="0" /> - <parameter name="end-index" value="3" /> + <parameter name='source' value="`getPLMN-configdb-response.plmnId`" /> </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring'> - <parameter name="string" value="`$tmp.pLMNId`" /> - <parameter name="result" value="tmp.mnc"/> - <parameter name="begin-index" value="4" /> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'> + <parameter name="original_string" value="`$tmp.pLMNId`" /> + <parameter name="regex" value="-"/> + <parameter name="ctx_memory_result_key" value="tmp.plmnList" /> </execute> + <set> + <parameter name='tmp.mcc' value='`$tmp.plmnList[0]`'/> + <parameter name='tmp.mnc' value='`$tmp.plmnList[1]`'/> + </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSlice.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="`$tmp.pLMNId`"/> <parameter name="field2" value="`$tmp.mcc`"/> @@ -210,146 +268,106 @@ <for index='idy' start='0' end='`$getNFNSSIRIC-configdb-response._length`' > <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.nearRTRICId' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].nearRTRICId'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.configdb.getNearRTRICById`"/> - <parameter name="outputPath" value="tmp.configdb.getNearRTRICById.url"/> - <parameter name="target" value="{nearRTRICId}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + <parameter name='outputPath' value='tmp.RICPLMNEntries' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].pLMNInfoList_length'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="URL for configDB to Get NearRTRIC for NearRTRICId"/> - <parameter name='field2' value="`$prop.configdb.url + $tmp.configdb.getNearRTRICById.url`" /> - <parameter name='field3' value="`$nearRTRICId`" /> + <parameter name="field1" value="PLMNInfo List before removal"/> + <parameter name="field2" value="`$tmp.RICPLMNEntries`"/> </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.getNearRTRICById.url`"/> - <parameter name="httpMethod" value="GET"/> - <parameter name="responsePrefix" value="getNearRTRICById-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error Getting Info from ConfigDB. Aborting RPC executiopn'/> - </set> + <for index='id-ric' start='0' end='`$tmp.RICPLMNEntries`' > + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.ric.sNSSAILength' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].pLMNInfoList['+$id-ric+'].sNSSAI_length'`" /> + </execute> + <for index='id-ric-snssai' start='0' end='`$tmp.ric.sNSSAILength`' > <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.ric.sNSSAI' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].pLMNInfoList['+$id-ric+'].sNSSAI['+$id-ric-snssai+'].sNSSAI'`" /> + </execute> + <switch test='`$tmp.ric.sNSSAI == $tmp.sNSSAI`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Matching sNSSAI found in config DB"/> + <parameter name="field2" value="`$tmp.ric.sNSSAI`"/> + <parameter name="field3" value="sNSSAI List length before removal"/> + <parameter name="field4" value="`$tmp.ric.sNSSAILength`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.ric.sNSSAIremoved' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].pLMNInfoList['+$id-ric+'].sNSSAI['+$id-ric-snssai+'].sNSSAI'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.nearRTRICId' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy + '].nearRTRICId'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.configdb.url + $prop.restapi.configdb.removenSSAINearRTRIC`"/> + <parameter name="outputPath" value="tmp.configdb.getNearRTRICNSSAIRemoval.url"/> + <parameter name="target" value="{nearRTRICId}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.configdb.getNearRTRICNSSAIRemoval.url`"/> + <parameter name="outputPath" value="tmp.configdb.getNearRTRICNSSAIRemoval.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.ric.sNSSAIremoved`"/> + </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> + <parameter name="field1" value="sNSSAI"/> + <parameter name="field2" value="`$tmp.ric.sNSSAIremoved`" /> + <parameter name="field3" value="nearRTRICId"/> + <parameter name="field4" value="`$tmp.nearRTRICId`" /> + <parameter name="field5" value="endpoint URL"/> + <parameter name="field6" value="`$tmp.configdb.getNearRTRICNSSAIRemoval.url`" /> </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$tmp.configdb.getNearRTRICNSSAIRemoval.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-nearRTRIC-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error updating nearRTRIC info in ConfigDB. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error updating nearRTRIC info in ConfigDB. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Updated NearRT RIC info in ConfigDB"/> + </record> + </block> + </outcome> + </execute> </block> </outcome> - </execute> + </switch> </block> - </block> - </outcome> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Obtained NearRT RIC info from ConfigDB"/> - <parameter name="field2" value="`$getNearRTRICById-configdb-response`"/> - </record> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-configrsp-context.log' /> - </execute> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.gNBId' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy + '].gNBId'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.gNBIdLength' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy + '].gNBIdLength'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`$getNearRTRICById-configdb-response`" /> - <parameter name="value" value="`$getNearRTRICById-configdb-response.pLMNInfoList[0].sNSSAI.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.pLMNInfoList-RIC" value="`'$getNearRTRICById-configdb-response.pLMNInfoList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updatenearRTRIC`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removenearRTRIC-PLMNInfo.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="delete-nearRTRIC-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating nearRTRIC info in ConfigDB. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating nearRTRIC info in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Updated NearRT RIC info in ConfigDB"/> - </record> - </block> - </outcome> - </execute> + </for> + </block> + </for> </block> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> @@ -384,492 +402,856 @@ <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> <parameter name='outputPath' value='tmp.pLMNInfoList_length' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList_length '`" /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList_length'`" /> </execute> - <for index='id-cuplmn' start='0' end='`$tmp.pLMNInfoList_length`' > - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.configDBSNSSAI' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList['+ $id-cuplmn +'].sNSSAI.sNSSAI'`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> - <parameter name="field2" value="`$tmp.configDBSNSSAI`"/> - <parameter name="field3" value="sNSSAI from request"/> - <parameter name="field4" value="`$tmp.sNSSAI`"/> - </record> - <switch test='`$tmp.configDBSNSSAI == $tmp.sNSSAI`'> - <outcome value='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList_length'`"/> + <parameter name="field2" value="`$tmp.pLMNInfoList_length`"/> + </record> + <switch test='`$tmp.pLMNInfoList_length > 0`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistlength in true "/> + <parameter name="field2" value="`$tmp.pLMNInfoList_length`"/> + </record> + <for index='id-cuplmn' start='0' end='`$tmp.pLMNInfoList_length`' > <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="NSSAI exists "/> - </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellCU`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellCU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.patchPLMNInfoListEntry.url`"/> - <parameter name="outputPath" value="tmp.patchPLMNInfoListEntry.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.cellCULocalId' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].cellLocalId'`" /> - </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.cucpNFType' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].nFType'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{idGNBCUCPFunction}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{idNRCellCU}"/> - <parameter name="replacement" value="`$tmp.cellCULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{mcc}"/> - <parameter name="replacement" value="`$tmp.mcc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{mnc}"/> - <parameter name="replacement" value="`$tmp.mnc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> - <parameter name="target" value="{sNssai}"/> - <parameter name="replacement" value="`$tmp.sNSSAI`"/> + <parameter name='outputPath' value='tmp.sNssaiListLengthCU' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList['+ $id-cuplmn +'].sNSSAI_length'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="patch cellCU NSSAI parameters"/> - <parameter name="field2" value="`$tmp.nearRTRICId`"/> - <parameter name="field3" value="`$tmp.CUCPName`"/> - <parameter name="field4" value="`$tmp.cellCULocalId`"/> - <parameter name="field5" value="`$tmp.mcc`"/> - <parameter name="field6" value="`$tmp.mnc`"/> - <parameter name="field7" value="`$tmp.sNSSAI`"/> - <parameter name="field8" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="field1" value="CU_plmninfolength_nssailength "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthCU`"/> </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteSNSSAIListEntry.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-cellCU-sNSSAI-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error patching cellCU PLMNInfoList. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating NRcellCU - PLMNInfo. Aborting RPC executiopn'/> - </return> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - </block> - </outcome> - <outcome value='success'> + <switch test='`$tmp.sNssaiListLengthCU > 0`'> + <outcome value='true'> <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Patched - cellCU PLMNInfo List"/> + <parameter name="field1" value="plmninfolistnssailength in true in CU "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthCU`"/> </record> - </block> - </outcome> - </execute> - <block atomic='true'> - <set> - <parameter name='tmp.maxNumberOfConnsPercellCU' value='`$tmp.payload.maxNumberofConns / $tmp.cellCUList_length`' /> - <parameter name='tmp.rRMPolicyDedicatedRatio.CellCU1' value='`$tmp.maxNumberOfConnsPercellCU * 100`' /> - <parameter name='tmp.rRMPolicyDedicatedRatio_SliceProfile' value='`$tmp.rRMPolicyDedicatedRatio.CellCU1 / $prop.nrcellcu.maxNumberOfConnsPerCell`' /> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyRatio for this profile is - "/> - <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio.CellCU`"/> - </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToNRCellCU`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToNRCellCU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{idGNBCUCPFunction}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{idNRCellCU}"/> - <parameter name="replacement" value="`$tmp.cellCULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="GET"/> - <parameter name="responsePrefix" value="get-rrmpolicyratio-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in Fetching RRMPolicyRatio - CellCU. Aborting RPC executiopn'/> - </return> + <for index='id-cusnssai' start='0' end='`$tmp.sNssaiListLengthCU`'> <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.configDBSNSSAI' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].pLMNInfoList['+ $id-cuplmn +'].sNSSAI['+ $id-cusnssai +'].sNSSAI'`" /> + </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> + <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> + <parameter name="field2" value="`$tmp.configDBSNSSAI`"/> + <parameter name="field3" value="sNSSAI from request"/> + <parameter name="field4" value="`$tmp.sNSSAI`"/> </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> + <switch test='`$tmp.configDBSNSSAI == $tmp.sNSSAI`'> + <outcome value='true'> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> + <parameter name="field1" value="NSSAI exists for cucp plmninfo "/> </record> - </block> - </outcome> - </execute> - </block> - </block> - </outcome> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> - </record> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-configrsp-context.log' /> - </execute> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.rrmPolicyRatioList_length' /> - <parameter name='source' value="`'get-rrmpolicyratio-response.attributes.RRMPolicyRatio_length '`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyRatioList size"/> - <parameter name="field2" value="`$tmp.rrmPolicyRatioList_length`"/> - </record> - <for index='idcu-rrm' start='0' end='`$tmp.rrmPolicyRatioList_length`' > - <block atomic='true'> - <set> - <parameter name='tmp.rrmPolicyDedicatedRatio_cellCU' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm +'].attributes.rRMPolicyDedicatedRatio'`" /> - <parameter name='tmp.rrmPolicyDedicatedRatio_CellCU_updated' value="`$tmp.rrmPolicyDedicatedRatio_cellCU + $tmp.rRMPolicyDedicatedRatio_SliceProfile`" /> - </set> - <set> - <parameter name='tmp.RRMPolicyRatio_id' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].id'`" /> - </set> - <set> - <parameter name='tmp.NRCellCURRMPolicyMembersLength' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList_length'`" /> - </set> - <for index='idcu-rrm1' start='0' end='`$tmp.NRCellCURRMPolicyMembersLength`' > - <block atomic='true'> - <switch test='`$tmp.NRCellCURRMPolicyMembersLeangth`>0'> - <outcome value='success'> - <block atomic='true'> <switch test='`$prop.ransim-mounted`'> <outcome value='false'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellCU`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </block> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellCU`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> </outcome> <outcome value='true'> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellCU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellCU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> <parameter name="target" value="{idNearRTRIC}"/> <parameter name="replacement" value="`$tmp.nearRTRICId`"/> </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="source" value="`$tmp.patchPLMNInfoListEntry.url`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoListEntry.url"/> <parameter name="target" value="{mountName}"/> <parameter name="replacement" value="`$tmp.CUCPName`"/> </execute> </block> </outcome> </switch> - </block> - </outcome> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='tmp.RRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm1 +'].sNSSAI'`" /> - </set> - <switch test='`$tmp.RRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cellCULocalId' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].cellCUList['+ $idcu +'].cellLocalId'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cucpNFType' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].nFType'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{idGNBCUCPFunction}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{idNRCellCU}"/> + <parameter name="replacement" value="`$tmp.cellCULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{mcc}"/> + <parameter name="replacement" value="`$tmp.mcc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="outputPath" value="tmp.deleteSNSSAIListEntry.url"/> + <parameter name="target" value="{sNssai}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSliceModifyAllocate.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="patch cellCU NSSAI parameters"/> + <parameter name="field2" value="`$tmp.nearRTRICId`"/> + <parameter name="field3" value="`$tmp.CUCPName`"/> + <parameter name="field4" value="`$tmp.cellCULocalId`"/> + <parameter name="field5" value="`$tmp.mcc`"/> + <parameter name="field6" value="`$tmp.mnc`"/> + <parameter name="field7" value="`$tmp.sNSSAI`"/> + <parameter name="field8" value="`$tmp.deleteSNSSAIListEntry.url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteSNSSAIListEntry.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-cellCU-sNSSAI-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error patching cellCU PLMNInfoList. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error updating NRcellCU - PLMNInfo. Aborting RPC executiopn'/> + </return> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Patched - cellCU PLMNInfo List"/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.removenSSAINRCellCU`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CellCU.configdb.url"/> + <parameter name="target" value="{idNRCellCU}"/> + <parameter name="replacement" value="`$tmp.cellCULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CellCU.configdb.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CellCU.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deletePLMNInfo-CellCU.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-CELLCU-plmninfo-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> + </return> + </block> + </outcome> <outcome value='success'> <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - CEllCU PLMNInfo Entry from configdb"/> + </record> + </block> + </outcome> + </execute> + <block atomic='true'> + <set> + <parameter name='tmp.maxNumberOfConnsPercellCU' value='`$tmp.payload.maxNumberofConns / $tmp.cellCUList_length`' /> + <parameter name='tmp.rRMPolicyDedicatedRatio.CellCU1' value='`$tmp.maxNumberOfConnsPercellCU * 100`' /> + <parameter name='tmp.rRMPolicyDedicatedRatio_SliceProfile' value='`$tmp.rRMPolicyDedicatedRatio.CellCU1 / $prop.nrcellcu.maxNumberOfConnsPerCell`' /> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyRatio for this profile is - "/> + <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio_SliceProfile`"/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToNRCellCU`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToNRCellCU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{idGNBCUCPFunction}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{idNRCellCU}"/> + <parameter name="replacement" value="`$tmp.cellCULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="get-rrmpolicyratio-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in Fetching RRMPolicyRatio - CellCU. Aborting RPC executiopn'/> + </return> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-configrsp-context.log' /> + </execute> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.rrmPolicyRatioList_length' /> + <parameter name='source' value="`'get-rrmpolicyratio-response.attributes.RRMPolicyRatio_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyRatioList size"/> + <parameter name="field2" value="`$tmp.rrmPolicyRatioList_length`"/> + </record> + <for index='idcu-rrm' start='0' end='`$tmp.rrmPolicyRatioList_length`'> + <block atomic='true'> <set> - <parameter name='tmp.RRMPolicyMember_id' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm1 +'].idx'`" /> + <parameter name='tmp.rrmPolicyDedicatedRatio_cellCU' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm +'].attributes.rRMPolicyDedicatedRatio'`" /> + <parameter name='tmp.rrmPolicyDedicatedRatio_CellCU_updated' value="`$tmp.rrmPolicyDedicatedRatio_cellCU + $tmp.rRMPolicyDedicatedRatio_SliceProfile`" /> </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.RRMPolicyRatio_id' /> + <parameter name='source' value="`'get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].id'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.NRCellCURRMPolicyMembersLength' /> + <parameter name='source' value="`'get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList_length'`" /> + </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyMember id - "/> - <parameter name="field2" value="`$tmp.RRMPolicyMember_id`"/> + <parameter name="field1" value="RRMPolicyMembersList size"/> + <parameter name="field2" value="`$tmp.NRCellCURRMPolicyMembersLength`"/> </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> + <for index='idcu-rrm1' start='0' end='`$tmp.NRCellCURRMPolicyMembersLength`' > + <block atomic='true'> + <switch test='`$tmp.NRCellCURRMPolicyMembersLength > 0`'> + <outcome value='true'> + <block atomic='true'> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellCU`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </block> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellCU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <set> + <parameter name='tmp.RRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm1 +'].sNSSAI'`" /> + </set> + <switch test='`$tmp.RRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> + <outcome value='success'> + <block atomic='true'> + <set> + <parameter name='tmp.RRMPolicyMember_id' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm1 +'].idx'`" /> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyMember id - "/> + <parameter name="field2" value="`$tmp.RRMPolicyMember_id`"/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellCU`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellCU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{idGNBCUCPFunction}"/> + <parameter name="replacement" value="`$tmp.CUCPName`"/> + </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellCU`"/> + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + <parameter name="target" value="{idNRCellCU}"/> + <parameter name="replacement" value="`$tmp.cellCULocalId`"/> </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> + <parameter name="target" value="{id}"/> + <parameter name="replacement" value="`$tmp.RRMPolicyRatio_id`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> + <parameter name="target" value="{idx}"/> + <parameter name="replacement" value="`$tmp.RRMPolicyMember_id`"/> + </execute> + </block> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Delete RRMPolicy URL - "/> + <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="field3" value="RRMPolicyRatio id"/> + <parameter name="field4" value="`$tmp.RRMPolicyRatio_id`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-cellCU-RRMPolicyRatio-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Deleted - cellCU RRMpolicyRatio/RRMPolicyMember"/> + </record> + </block> </outcome> - <outcome value='true'> + <outcome value='failure'> <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellCU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error Removing cellCU RRMPolicyRatio. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing NRCellDU - RRMPolicyRAtio. Aborting RPC executiopn'/> + </return> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> </block> </outcome> - </switch> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.CURRMPolicyMembersResourceType' /> + <parameter name='source' value="`'get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm+'].attributes.resourceType'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.removenSSAICUUPRRMPOLICY`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{gnbCUUPId}"/> + <parameter name="replacement" value="`$tmp.cellCULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{resourcetype}"/> + <parameter name="replacement" value="`$tmp.CURRMPolicyMembersResourceType`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-CU-rrmpolicy-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'></block> + </outcome> + <outcome value='success'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - gNBCU rrmpolicy Entry from configdb"/> + </record> + </outcome> + </execute> </block> - </outcome> - </switch> + </for> + </block> </block> </outcome> </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{idGNBCUCPFunction}"/> - <parameter name="replacement" value="`$tmp.CUCPName`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{idNRCellCU}"/> - <parameter name="replacement" value="`$tmp.cellCULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio.url"/> - <parameter name="target" value="{id}"/> - <parameter name="replacement" value="`$tmp.RRMPolicyRatio_id`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio.url"/> - <parameter name="target" value="{idx}"/> - <parameter name="replacement" value="`$tmp.RRMPolicyMember_id`"/> - </execute> </block> </for> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Delete RRMPolicy URL - "/> - <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio.url`"/> - <parameter name="field3" value="RRMPolicyRatio id"/> - <parameter name="field4" value="`$tmp.RRMPolicyRatio_id`"/> + <parameter name="field1" value="plmninfolistnssailength in false in CU "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthCU`"/> </record> + </block> + </outcome> + </switch> + </block> + </for> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistlength in false "/> + <parameter name="field2" value="`$tmp.pLMNInfoList_length`"/> + </record> + </block> + </outcome> + </switch> + </block> + </for> + </block> + </for> + </block> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.CUUPList_length' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy +'].gNBCUUPList_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Number of CUCP List Entries "/> + <parameter name="field2" value="`$tmp.CUUPList_length`"/> + <parameter name="field3" value="for the NearRTRIC"/> + <parameter name="field4" value="`$tmp.nearRTRICId`"/> + </record> + <for index='id-cuup' start='0' end='`$tmp.CUUPList_length`'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.idGNBCUUPFunction' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].gNBCUUPId'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="idGNBCUUPFunction "/> + <parameter name="field2" value="`$tmp.idGNBCUUPFunction`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.pLMNInfoList' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].pLMNInfoList_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="cuup_plmninfolength "/> + <parameter name="field2" value="`$tmp.pLMNInfoList`"/> + </record> + <for index='id-plmn' start='0' end='1'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.sNssaiListLength' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].pLMNInfoList['+ $id-plmn +'].sNSSAI_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="cuup_plmninfolength_nssailength "/> + <parameter name="field2" value="`$tmp.sNssaiListLength`"/> + </record> + <switch test='`$tmp.sNssaiListLength > 0`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistnssailength in true "/> + <parameter name="field2" value="`$tmp.sNssaiListLength`"/> + </record> + <for index='id-snssai' start='0' end='`$tmp.sNssaiListLength`'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.configDBSNSSAI1' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].pLMNInfoList['+ $id-plmn +'].sNSSAI['+ $id-snssai +'].sNSSAI'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> + <parameter name="field2" value="`$tmp.configDBSNSSAI1`"/> + <parameter name="field3" value="sNSSAI from Request"/> + <parameter name="field4" value="`$tmp.sNSSAI`"/> + </record> + <switch test='`$tmp.configDBSNSSAI1 == $tmp.sNSSAI`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="nssaimatch in True "/> + <parameter name="field2" value="`Proceeding for nssai deletion`"/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToCUUP`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToCUUP.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{idGNBCUUPFunction}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{mcc}"/> + <parameter name="replacement" value="`$tmp.mcc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> + <parameter name="target" value="{sNssai}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio.url`"/> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deletePLMNInfo-CUUP.url`"/> <parameter name="restapiUser" value="`$prop.controller.user`" /> <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-cellCU-RRMPolicyRatio-response"/> + <parameter name="responsePrefix" value="delete-CUUP-sNSSAI-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Deleted - cellCU RRMpolicyRatio/RRMPolicyMember"/> - </record> - </block> - </outcome> <outcome value='failure'> <block atomic='true'> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error Removing cellCU RRMPolicyRatio. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing NRCellDU - RRMPolicyRAtio. Aborting RPC executiopn'/> - </return> <block atomic='true'> <set> <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> + <parameter name="tmp.status" value="success"/> <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> @@ -883,13 +1265,15 @@ </record> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='*/*' /> <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -910,25 +1294,43 @@ </outcome> </execute> </block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - gNBCUUP PLMNInfo Entry"/> + </record> </block> </outcome> </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.NRCellCURRMPolicyMembersList' /> - <parameter name='source' value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm +'].attributes.rRMPolicyMemberList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`$tmp.NRCellCURRMPolicyMembersList`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.removenSSAICUUP`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.configdb.url"/> + <parameter name="target" value="{gnbCUUPId}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.CellCURRMMembersList" value="`'$get-rrmpolicyratio-response.attributes.RRMPolicyRatio['+ $idcu-rrm +'].attributes.rRMPolicyMemberList'`" /> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> </execute> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updateRRMPolicy`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removeRRMPolicyMember-CUCP.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="remove-gNBCUCP-rrmpolicy-configdb-response"/> + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deletePLMNInfo-CUUP.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-CUUP-plmninfo-configdb-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> @@ -937,816 +1339,434 @@ <block atomic='true'> <set> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating RRMPolicyRatio - NRCellCU. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> </set> <return status='failure'> <parameter name='ack-final' value='Y'/> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating NRCellCU-RRMPolicyRatio in ConfigDB. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> </return> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> </block> </outcome> <outcome value='success'> - <block> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - NRCellCU RRMPolicyRatio "/> + <parameter name="field1" value="Successfully removed - gNBCUUP PLMNInfo Entry from configdb"/> </record> </block> </outcome> </execute> </block> - </for> - </block> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBCUCPList['+$idz +'].cellCUList['+ $idcu +'].pLMNInfoList'`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.pLMNInfoList" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBCUCPList['+$idz +'].cellCUList['+ $idcu +'].pLMNInfoList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updategNBCUCP`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removegNBCUCP.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="remove-gNBCUCP-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating Config DB - NRCellCU. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating NRCellCU-PLMNInfo in ConfigDB. Aborting RPC executiopn'/> - </return> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - NRCellCU pLMNinfo "/> - </record> - </block> - </outcome> - </execute> - </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="nssaimatch in false "/> + <parameter name="field2" value="`nssai deletion does not takes place`"/> + </record> + </block> + </outcome> + </switch> </block> - </outcome> - </switch> - </block> - </for> + </for> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistnssailength in false "/> + <parameter name="field2" value="`$tmp.sNssaiListLength`"/> + </record> + </block> + </outcome> + </switch> </block> </for> - </block> - </for> - </block> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.CUUPList_length' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy +'].gNBCUUPList_length'`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Number of CUCP List Entries "/> - <parameter name="field2" value="`$tmp.CUUPList_length`"/> - <parameter name="field3" value="for the NearRTRIC"/> - <parameter name="field4" value="`$tmp.nearRTRICId`"/> - </record> - <for index='id-cuup' start='0' end='`$tmp.CUUPList_length`'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.idGNBCUUPFunction' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].gNBCUUPId'`" /> - </execute> + <set> + <parameter name='tmp.maxNumberOfDRBsPerNSSAI' value='`$tmp.payload.maxNumberofConns*4`' /> + <parameter name='tmp.maxNumberOfDRBsPerCUUP' value='`$tmp.maxNumberOfDRBsPerNSSAI /$tmp.CUUPList_length`' /> + <parameter name='tmp.rRMPolicyDedicatedRatio1' value='`$tmp.maxNumberOfDRBsPerCUUP*100`' /> + <parameter name='tmp.rRMPolicyDedicatedRatio-CUUP' value='`$tmp.rRMPolicyDedicatedRatio1/$prop.cuupfunction.maxNumberOfDRBsPerCUUP`' /> + </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="idGNBCUUPFunction "/> - <parameter name="field2" value="`$tmp.idGNBCUUPFunction`"/> + <parameter name="field1" value="RRMPolicyRatio for this profile is - "/> + <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio-CUUP`"/> </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBCUUP`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBCUUP.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idGNBCUUPFunction}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio-CUUP.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="get-rrmpolicyratio-cuup-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in fetching RRMPolicyRatio. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-instantiateRANSlice-configrsp-context.log' /> + </execute> + </block> + </outcome> + </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.pLMNInfoList' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].pLMNInfoList_length'`" /> + <parameter name='outputPath' value='tmp.rrmPolicyRatioList_CUUP_length' /> + <parameter name='source' value="`'get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio_length'`" /> </execute> - <for index='id-plmn' start='0' end='`$tmp.pLMNInfoList`'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="CUUP - RRMPolicyRatioList size"/> + <parameter name="field2" value="`$tmp.rrmPolicyRatioList_CUUP_length`"/> + </record> + <for index='idcuup-rrm' start='0' end='`$tmp.rrmPolicyRatioList_CUUP_length`' > <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.configDBSNSSAI1' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUUPList['+ $id-cuup +'].pLMNInfoList['+ $id-plmn +'].sNSSAI.sNSSAI'`" /> + <parameter name='outputPath' value='tmp.CUUPRRMPolicyRatio_id' /> + <parameter name='source' value="`'get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].id'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.CUUPRRMPolicyMembersLength' /> + <parameter name='source' value="`'get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList_length'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> - <parameter name="field2" value="`$tmp.configDBSNSSAI1`"/> - <parameter name="field3" value="sNSSAI from request"/> - <parameter name="field4" value="`$tmp.sNSSAI`"/> + <parameter name="field1" value="CUUP - RRMPolicyMembersList size"/> + <parameter name="field2" value="`$tmp.CUUPRRMPolicyMembersLength`"/> </record> - <switch test='`$tmp.configDBSNSSAI1 == $tmp.sNSSAI`'> - <outcome value='true'> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToCUUP`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> + <for index='idcu-rrm2' start='0' end='`$tmp.CUUPRRMPolicyMembersLength`' > + <block atomic='true'> + <switch test='`$tmp.CUUPRRMPolicyMembersLength > 0`'> <outcome value='true'> <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToCUUP.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Success" /> + <parameter name="field2" value="Tocheck if ransim mounted" /> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="before setting url" /> + <parameter name="field2" value="ransimnot mounted" /> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToCUUP`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Delete RRMPolicy URL after setting - "/> + <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + </record> + </block> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToCUUP.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Failure" /> + <parameter name="field2" value="Tocheck if ransim mounted" /> + </record> + <set> + <parameter name='tmp.CUUPRRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm2 +'].sNSSAI'`" /> + </set> + <switch test='`$tmp.CUUPRRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> + <outcome value='success'> + <block atomic='true'> + <set> + <parameter name='tmp.CUUPRRMPolicyMember_id' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm2 +'].idx'`" /> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyMember id - "/> + <parameter name="field2" value="`$tmp.CUUPRRMPolicyMember_id`"/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToCUUP`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.CUUP.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> </block> </outcome> </switch> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{idGNBCUUPFunction}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{mcc}"/> - <parameter name="replacement" value="`$tmp.mcc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{mnc}"/> - <parameter name="replacement" value="`$tmp.mnc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfo-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfo-CUUP.url"/> - <parameter name="target" value="{sNssai}"/> - <parameter name="replacement" value="`$tmp.sNSSAI`"/> - </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Delete RRMPolicy URL first - "/> + <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idGNBCUUPFunction}"/> + <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{id}"/> + <parameter name="replacement" value="`$tmp.CUUPRRMPolicyRatio_id`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> + <parameter name="target" value="{idx}"/> + <parameter name="replacement" value="`$tmp.CUUPRRMPolicyMember_id`"/> + </execute> + </block> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Delete RRMPolicy URL - "/> + <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> + <parameter name="field3" value="RRMPolicyRatio id"/> + <parameter name="field4" value="`$tmp.CUUPRRMPolicyRatio_id`"/> + </record> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deletePLMNInfo-CUUP.url`"/> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio-CUUP.url`"/> <parameter name="restapiUser" value="`$prop.controller.user`" /> <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-CUUP-sNSSAI-response"/> + <parameter name="responsePrefix" value="delete-CUUP-RRMPolicyRatio-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - CUUP RRMpolicyRatio"/> + </record> + </block> + </outcome> <outcome value='failure'> <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> <set> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing CUUP RRMPolicyRatio. Aborting RPC executiopn'/> </set> <return status='failure'> <parameter name='ack-final' value='Y'/> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing RRMPolicyRatio. Aborting RPC executiopn'/> </return> </block> </outcome> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully removed - gNBCUUP PLMNInfo Entry"/> - </record> - </block> - </outcome> </execute> - <set> - <parameter name='tmp.maxNumberOfDRBsPerNSSAI' value='`$tmp.payload.maxNumberofConns*4`' /> - <parameter name='tmp.maxNumberOfDRBsPerCUUP' value='`$tmp.maxNumberOfDRBsPerNSSAI /$tmp.CUUPList_length`' /> - <parameter name='tmp.rRMPolicyDedicatedRatio1' value='`$tmp.maxNumberOfDRBsPerCUUP*100`' /> - <parameter name='tmp.rRMPolicyDedicatedRatio-CUUP' value='`$tmp.rRMPolicyDedicatedRatio1/$prop.cuupfunction.maxNumberOfDRBsPerCUUP`' /> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyRatio for this profile is - "/> - <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio-CUUP`"/> - </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBCUUP`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBCUUP.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> - </block> - </outcome> - </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.CUUPRRMPolicyMembersResourceType' /> + <parameter name='source' value="`'get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.resourceType'`" /> + </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idGNBCUUPFunction}"/> + <parameter name="source" value="`$prop.restapi.configdb.removenSSAICUUPRRMPOLICY`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{gnbCUUPId}"/> <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{resourcetype}"/> + <parameter name="replacement" value="`$tmp.CUUPRRMPolicyMembersResourceType`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio-CUUP.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="GET"/> - <parameter name="responsePrefix" value="get-rrmpolicyratio-cuup-response"/> + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-CUUP-rrmpolicy-configdb-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> <parameter name="convertResponse" value="true"/> <outcome value='failure'> <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> <set> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> </set> <return status='failure'> <parameter name='ack-final' value='Y'/> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in fetching RRMPolicyRatio. Aborting RPC executiopn'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> </return> </block> </outcome> <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> - </record> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-instantiateRANSlice-configrsp-context.log' /> - </execute> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.rrmPolicyRatioList_CUUP_length' /> - <parameter name='source' value="`'get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio_length '`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="CUUP - RRMPolicyRatioList size"/> - <parameter name="field2" value="`$tmp.tmp.rrmPolicyRatioList_CUUP_length`"/> - </record> - <for index='idcuup-rrm' start='0' end='`$tmp.rrmPolicyRatioList_CUUP_length`' > - <block atomic='true'> - <set> - <parameter name='tmp.CUUPRRMPolicyRatio_id' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].id'`" /> - </set> - <set> - <parameter name='tmp.CUUPRRMPolicyMembersLength' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList_length'`" /> - </set> - <for index='idcu-rrm2' start='0' end='`$tmp.CUUPRRMPolicyMembersLength`' > - <block atomic='true'> - <switch test='`$tmp.CUUPRRMPolicyMembersLength`>0'> - <outcome value='success'> - <block atomic='true'> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToCUUP`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </block> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToCUUP.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> - </block> - </outcome> - </switch> - </block> - </outcome> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='tmp.CUUPRRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm2 +'].sNSSAI'`" /> - </set> - <switch test='`$tmp.CUUPRRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> - <outcome value='success'> - <block atomic='true'> - <set> - <parameter name='tmp.CUUPRRMPolicyMember_id' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm+'].attributes.rRMPolicyMemberList['+ $idcu-rrm2 +'].idx'`" /> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyMember id - "/> - <parameter name="field2" value="`$tmp.CUUPRRMPolicyMember_id`"/> - </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToCUUP`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.CUUP.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> - </block> - </outcome> - </switch> - </block> - </outcome> - </switch> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idGNBCUUPFunction}"/> - <parameter name="replacement" value="`$tmp.idGNBCUUPFunction`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{id}"/> - <parameter name="replacement" value="`$tmp.CUUPRRMPolicyRatio_id`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-CUUP.url"/> - <parameter name="target" value="{idx}"/> - <parameter name="replacement" value="`$tmp.CUUPRRMPolicyMember_id`"/> - </execute> - </block> - </for> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Delete RRMPolicy URL - "/> - <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-CUUP.url`"/> - <parameter name="field3" value="RRMPolicyRatio id"/> - <parameter name="field4" value="`$tmp.CUUPRRMPolicyRatio_id`"/> + <parameter name="field1" value="Successfully removed - gNBCUUP rrmpolicy Entry from configdb"/> </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio-CUUP.ur`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-CUUP-RRMPolicyRatio-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully removed - CUUP RRMpolicyRatio"/> - </record> - </block> - </outcome> - <outcome value='failure'> - <block atomic='true'> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing CUUP RRMPolicyRatio. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing RRMPolicyRatio. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.CUUPRRMPolicyMembersList' /> - <parameter name='source' value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm +'].attributes.rRMPolicyMemberList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`$tmp.CUUPRRMPolicyMembersList`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.CellCURRMMembersList" value="`'$get-rrmpolicyratio-cuup-response.attributes.RRMPolicyRatio['+ $idcuup-rrm +'].attributes.rRMPolicyMemberList'`" /> - </execute> - </block> - </for> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBCUUPList['+$id-cuup+'].pLMNInfoList'`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.pLMNInfoList-CUUP" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBCUCPList['+$idz +'].cellCUList['+ $id-cuup +'].pLMNInfoList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updategNBCUUP`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/restapi.configDB.updategNBCUUP.templatefile'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="update-gNBCUUP-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating Config DB - NRCellCU. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating CUUP-PLMNInfo in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - NRCellCU pLMNinfo "/> - </record> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updateRRMPolicy`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removeRRMPolicy-CUUP.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="delete-gNBCUUP-rrmpolicy-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating RRMPolicyRatio - CUUP. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating CUUP-RRMPolicyRatio in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - CUUP RRMPolicyRatio "/> - </record> - </block> - </outcome> - </execute> - </block> + </outcome> + </execute> </block> </for> </block> @@ -1758,7 +1778,7 @@ <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy +'].gNBDUList_length'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="Number of DU List Entries "/> <parameter name="field2" value="`$tmp.DUList_length`"/> @@ -1772,7 +1792,7 @@ <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].gNBDUId'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="GNBDUId "/> <parameter name="field2" value="`$tmp.GNBDUId`"/> @@ -1782,754 +1802,728 @@ <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy +'].gNBDUList[' + $id-du +'].cellDUList_length'`" /> </execute> <for index='id-celldu' start='0' end='`$tmp.cellDUList_length`' > - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.DUpLMNInfoList_length' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].pLMNInfoList_length '`" /> - </execute> - <for index='id-duplmn' start='0' end='`$tmp.DUpLMNInfoList_length`' > - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.configDBSNSSAI-DU' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].pLMNInfoList['+ $id-duplmn +'].sNSSAI.sNSSAI'`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> - <parameter name="field2" value="`$tmp.configDBSNSSAI-DU`"/> - <parameter name="field3" value="sNSSAI from request"/> - <parameter name="field4" value="`$tmp.sNSSAI`"/> - </record> - <switch test='`$tmp.configDBSNSSAI-DU == $tmp.sNSSAI`'> - <outcome value='true'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="CellDU is applicable for the NSSAI "/> - </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellDU`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Iterating "/> + <parameter name="field2" value="`CellDU`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.DUpLMNInfoList_length' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].pLMNInfoList_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolengthcelldu "/> + <parameter name="field2" value="`$tmp.DUpLMNInfoList_length`"/> + </record> + <for index='id-duplmn' start='0' end='`$tmp.DUpLMNInfoList_length`' > + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.sNssaiListLengthDU' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].pLMNInfoList['+ $id-duplmn +'].sNSSAI_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="DU_plmninfolength_nssailength "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthDU`"/> + </record> + <switch test='`$tmp.sNssaiListLengthDU > 0`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistnssailength in true in DU "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthDU`"/> + </record> + <for index='id-dusnssai' start='0' end='`$tmp.sNssaiListLengthDU`'> <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellDU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.configDBSNSSAI-DU' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].pLMNInfoList['+ $id-duplmn +'].sNSSAI['+ $id-dusnssai +'].sNSSAI'`" /> </execute> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.cellDULocalId' /> - <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellCUList['+ $id-celldu +'].cellLocalId'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{idGNBDUFunction}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{idNRCellDU}"/> - <parameter name="replacement" value="`$tmp.cellCULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{mcc}"/> - <parameter name="replacement" value="`$tmp.mcc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{mnc}"/> - <parameter name="replacement" value="`$tmp.mnc`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> - <parameter name="target" value="{sNssai}"/> - <parameter name="replacement" value="`$tmp.sNSSAI`"/> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="patch cellCU NSSAI parameters"/> - <parameter name="field2" value="`$tmp.nearRTRICId`"/> - <parameter name="field3" value="`$tmp.GNBDUId`"/> - <parameter name="field4" value="`$tmp.cellDULocalId`"/> - <parameter name="field5" value="`$tmp.mcc`"/> - <parameter name="field6" value="`$tmp.mnc`"/> - <parameter name="field7" value="`$tmp.sNSSAI`"/> - <parameter name="field8" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deletePLMNInfoListEntry-cellDU.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-cellDU-PLMNInfoList-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error deleting cellDU PLMNInfoList. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error deleting NECellDU - PLMNInfo. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully deleted - cellDU PLMNInfo List"/> + <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> + <parameter name="field2" value="`$tmp.configDBSNSSAI-DU`"/> + <parameter name="field3" value="sNSSAI from request"/> + <parameter name="field4" value="`$tmp.sNSSAI`"/> </record> - </block> - </outcome> - </execute> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name='tmp.uLThptPerSlice' value='`$payloadJson.input.sliceProfile.uLThptPerSlice`' /> - </set> - <set> - <parameter name='tmp.dLThptPerSlice' value='`$payloadJson.input.sliceProfile.dLThptPerSlice`' /> - </set> - <set> - <parameter name='tmp.maxNumberOfConns' value='`$payloadJson.input.sliceProfile.maxNumberOfConns`' /> - </set> - <set> - <parameter name='tmp.nearRTRIC.trafficCapacity1' value='`$tmp.uLThptPerSlice + $tmp.dLThptPerSlice`' /> - </set> - <set> - <parameter name='tmp.nearRTRIC.trafficCapacity' value='`$tmp.nearRTRIC.trafficCapacity1 / 2`' /> - </set> - <set> - <parameter name='tmp.nearRTRIC.trafficCapacityBPS' value='`$tmp.nearRTRIC.trafficCapacity * 1000000`' /> - </set> - <set> - <parameter name='tmp.nrcelldu.totalPRBForSNSSAI' value='`$tmp.nearRTRIC.trafficCapacityBPS / 1008000`' /> - </set> - <set> - <parameter name='tmp.nrcelldu.PRBPerImpactedCell' value='`$tmp.nrcelldu.totalPRBForSNSSAI / $tmp.cellDUList_length`' /> - </set> - <set> - <parameter name='tmp.rRMPolicyDedicatedRatio.CellDU1' value='`$tmp.nrcelldu.PRBPerImpactedCell * 100`' /> - </set> - <set> - <parameter name='tmp.rRMPolicyDedicatedRatio.CellDU' value='`$tmp.rRMPolicyDedicatedRatio.CellDU1 / $prop.nrcelldu.TotalPRBsPerCell`' /> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="rRMPolicyDedicatedRatio for CellDU "/> - <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio.CellDU`"/> - <parameter name="field3" value="tmp.nearRTRIC.trafficCapacity1 "/> - <parameter name="field4" value="`$tmp.nearRTRIC.trafficCapacity1`"/> - <parameter name="field5" value="tmp.nearRTRIC.trafficCapacity "/> - <parameter name="field6" value="`$tmp.nearRTRIC.trafficCapacity`"/> - <parameter name="field7" value="tmp.nearRTRIC.trafficCapacityBPS"/> - <parameter name="field8" value="`$tmp.nearRTRIC.trafficCapacityBPS`"/> - <parameter name="field9" value="tmp.nrcelldu.totalPRBForSNSSAI "/> - <parameter name="field10" value="`$tmp.nrcelldu.totalPRBForSNSSAI`"/> - <parameter name="field11" value="tmp.nrcelldu.PRBPerImpactedCell "/> - <parameter name="field12" value="`$tmp.nrcelldu.PRBPerImpactedCell`"/> - <parameter name="field13" value="tmp.rRMPolicyDedicatedRatio.CellDU1 "/> - <parameter name="field14" value="`$tmp.rRMPolicyDedicatedRatio.CellDU1`"/> - </record> - </block> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBDU`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBDU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> - <parameter name="target" value="{idGNBDUFunction}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> - <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> - <parameter name="target" value="{idNRCellDU}"/> - <parameter name="replacement" value="`$tmp.cellDULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio-gNBDU.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="GET"/> - <parameter name="responsePrefix" value="get-rrmpolicyratio-du-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> + <switch test='`$tmp.configDBSNSSAI-DU == $tmp.sNSSAI`'> + <outcome value='true'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="CellDU is applicable for the NSSAI "/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellDU`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.terminateSNSSAIEntry.ToNRCellDU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cellDULocalId' /> + <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBDUList['+ $id-du +'].cellDUList['+ $id-celldu +'].cellLocalId'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="LocalId "/> + <parameter name="field2" value="`$tmp.cellDULocalId`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{idGNBDUFunction}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{idNRCellDU}"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{mcc}"/> + <parameter name="replacement" value="`$tmp.mcc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="outputPath" value="tmp.deletePLMNInfoListEntry-cellDU.url"/> + <parameter name="target" value="{sNssai}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="patch cellCU NSSAI parameters"/> + <parameter name="field2" value="`$tmp.nearRTRICId`"/> + <parameter name="field3" value="`$tmp.GNBDUId`"/> + <parameter name="field4" value="`$tmp.cellDULocalId`"/> + <parameter name="field5" value="`$tmp.mcc`"/> + <parameter name="field6" value="`$tmp.mnc`"/> + <parameter name="field7" value="`$tmp.sNSSAI`"/> + <parameter name="field8" value="`$tmp.deletePLMNInfoListEntry-cellDU.url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deletePLMNInfoListEntry-cellDU.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-cellDU-PLMNInfoList-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='failure'> + <block atomic='true'> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error deleting cellDU PLMNInfoList. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error deleting NECellDU - PLMNInfo. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully deleted - cellDU PLMNInfo List"/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.removenSSAINRCellDU`"/> + <parameter name="outputPath" value="tmp.deleteplmninfo-GNBDU.configdb.url"/> + <parameter name="target" value="{idNRCellDU}"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteplmninfo-GNBDU.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteplmninfo-GNBDU.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deleteplmninfo-GNBDU.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-GNBDU-plmninfo-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfoList. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing CUUP PLMNInfo. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> + <parameter name="field1" value="Successfully removed - gNBDU pmmninfo Entry from configdb"/> </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in Fetching RRMPolicyRatio - CellDU. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> - </record> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-instantiateRANSlice-configrsp-context.log' /> - </execute> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.rrmPolicyRatioDUList_length' /> - <parameter name='source' value="`'get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio_length '`" /> - </execute> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyRatioList size"/> - <parameter name="field2" value="`$tmp.rrmPolicyRatioList_length`"/> - </record> - <for index='iddu-rrm' start='0' end='`$tmp.rrmPolicyRatioDUList_length`' > - <block atomic='true'> - <set> - <parameter name='tmp.cellDURRMPolicyRatio_id' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].id'`" /> - </set> - <set> - <parameter name='tmp.DURRMPolicyMembersLength' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList_length'`" /> - </set> - <for index='iddu-rrm2' start='0' end='`$tmp.DURRMPolicyMembersLength`' > - <block atomic='true'> - <switch test='`$tmp.DURRMPolicyMembersLength`>0'> - <outcome value='success'> - <block atomic='true'> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellDU`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - </block> - </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellDU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> - </block> - </outcome> - </switch> - </block> - </outcome> - <outcome value='failure'> + </outcome> + </execute> + <block atomic='true'> <block atomic='true'> <set> - <parameter name='tmp.cellDURRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList['+ $iddu-rrm2 +'].sNSSAI'`" /> + <parameter name='tmp.uLThptPerSlice' value='`$payloadJson.input.sliceProfile.uLThptPerSlice`' /> </set> - <switch test='`$tmp.cellDURRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> - <outcome value='success'> + <set> + <parameter name='tmp.dLThptPerSlice' value='`$payloadJson.input.sliceProfile.dLThptPerSlice`' /> + </set> + <set> + <parameter name='tmp.maxNumberOfConns' value='`$payloadJson.input.sliceProfile.maxNumberOfConns`' /> + </set> + <set> + <parameter name='tmp.nearRTRIC.trafficCapacity1' value='`$tmp.uLThptPerSlice + $tmp.dLThptPerSlice`' /> + </set> + <set> + <parameter name='tmp.nearRTRIC.trafficCapacity' value='`$tmp.nearRTRIC.trafficCapacity1 / 2`' /> + </set> + <set> + <parameter name='tmp.nearRTRIC.trafficCapacityBPS' value='`$tmp.nearRTRIC.trafficCapacity * 1000000`' /> + </set> + <set> + <parameter name='tmp.nrcelldu.totalPRBForSNSSAI' value='`$tmp.nearRTRIC.trafficCapacityBPS / 1008000`' /> + </set> + <set> + <parameter name='tmp.nrcelldu.PRBPerImpactedCell' value='`$tmp.nrcelldu.totalPRBForSNSSAI / $tmp.cellDUList_length`' /> + </set> + <set> + <parameter name='tmp.rRMPolicyDedicatedRatio.CellDU1' value='`$tmp.nrcelldu.PRBPerImpactedCell * 100`' /> + </set> + <set> + <parameter name='tmp.rRMPolicyDedicatedRatio.CellDU' value='`$tmp.rRMPolicyDedicatedRatio.CellDU1 / $prop.nrcelldu.TotalPRBsPerCell`' /> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="rRMPolicyDedicatedRatio for CellDU "/> + <parameter name="field2" value="`$tmp.rRMPolicyDedicatedRatio.CellDU`"/> + <parameter name="field3" value="tmp.nearRTRIC.trafficCapacity1 "/> + <parameter name="field4" value="`$tmp.nearRTRIC.trafficCapacity1`"/> + <parameter name="field5" value="tmp.nearRTRIC.trafficCapacity "/> + <parameter name="field6" value="`$tmp.nearRTRIC.trafficCapacity`"/> + <parameter name="field7" value="tmp.nearRTRIC.trafficCapacityBPS"/> + <parameter name="field8" value="`$tmp.nearRTRIC.trafficCapacityBPS`"/> + <parameter name="field9" value="tmp.nrcelldu.totalPRBForSNSSAI "/> + <parameter name="field10" value="`$tmp.nrcelldu.totalPRBForSNSSAI`"/> + <parameter name="field11" value="tmp.nrcelldu.PRBPerImpactedCell "/> + <parameter name="field12" value="`$tmp.nrcelldu.PRBPerImpactedCell`"/> + <parameter name="field13" value="tmp.rRMPolicyDedicatedRatio.CellDU1 "/> + <parameter name="field14" value="`$tmp.rRMPolicyDedicatedRatio.CellDU1`"/> + </record> + </block> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBDU`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.RRMPolicyRatioEntry.ToGNBDU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> + <parameter name="target" value="{idGNBDUFunction}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.getRRMPolicyRatio-gNBDU.url`"/> + <parameter name="outputPath" value="tmp.getRRMPolicyRatio-gNBDU.url"/> + <parameter name="target" value="{idNRCellDU}"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.getRRMPolicyRatio-gNBDU.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="get-rrmpolicyratio-du-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'> <block atomic='true'> <set> - <parameter name='tmp.CellDURRMPolicyMember_id' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList['+ $iddu-rrm2 +'].idx'`" /> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="RRMPolicyMember id - "/> - <parameter name="field2" value="`$tmp.CellDURRMPolicyMember_id`"/> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> </record> - <switch test='`$prop.ransim-mounted`'> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellDU`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> </outcome> - <outcome value='true'> - <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellDU.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idNearRTRIC}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> </block> </outcome> - </switch> + </execute> </block> - </outcome> - </switch> - </block> - </outcome> - </switch> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idGNBDUFunction}"/> - <parameter name="replacement" value="`$tmp.GNBDUId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idNRCellDU}"/> - <parameter name="replacement" value="`$tmp.cellDULocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{id}"/> - <parameter name="replacement" value="`$tmp.cellDURRMPolicyRatio_id`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> - <parameter name="target" value="{idx}"/> - <parameter name="replacement" value="`$tmp.cellDURRMPolicyMember_sNSSAI`"/> - </execute> - </block> - </for> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Delete RRMPolicy URL - "/> - <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="field3" value="RRMPolicyRatio id"/> - <parameter name="field4" value="`$tmp.cellDURRMPolicyRatio_id`"/> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio-DU.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="DELETE"/> - <parameter name="responsePrefix" value="delete-cellDU-RRMPolicyRatio-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <outcome value='success'> - <block atomic='true'> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully removed - cellDU RRMpolicyRatio"/> - </record> - </block> - </outcome> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in retrieving RRMPolicyRatio. Aborting RPC executiopn'/> + </set> <return status='failure'> <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error in Fetching RRMPolicyRatio - CellDU. Aborting RPC executiopn'/> </return> </block> </outcome> <outcome value='success'> - <block> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/instantiateRANSliceModifyAllocate.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> + <parameter name="field1" value="Successfully Retrieved - RRMPolicyRatio"/> </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-instantiateRANSlice-configrsp-context.log' /> + </execute> </block> </outcome> </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.rrmPolicyRatioDUList_length' /> + <parameter name='source' value="`'get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyRatioList size"/> + <parameter name="field2" value="`$tmp.rrmPolicyRatioDUList_length`"/> + </record> + <for index='iddu-rrm' start='0' end='`$tmp.rrmPolicyRatioDUList_length`' > + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cellDURRMPolicyRatio_id' /> + <parameter name='source' value="`'get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].id'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.DURRMPolicyMembersLength' /> + <parameter name='source' value="`'get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPOLICYmemberslength"/> + <parameter name="field2" value="`$tmp.DURRMPolicyMembersLength`"/> + </record> + <for index='iddu-rrm2' start='0' end='`$tmp.DURRMPolicyMembersLength`' > + <block atomic='true'> + <switch test='`$tmp.DURRMPolicyMembersLength > 0`'> + <outcome value='true'> + <block atomic='true'> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellDU`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </block> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyRatio.ToNRCellDU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <set> + <parameter name='tmp.cellDURRMPolicyMember_sNSSAI' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList['+ $iddu-rrm2 +'].sNSSAI'`" /> + </set> + <switch test='`$tmp.cellDURRMPolicyMember_sNSSAI==$tmp.sNSSAI`'> + <outcome value='success'> + <block atomic='true'> + <set> + <parameter name='tmp.CellDURRMPolicyMember_id' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList['+ $iddu-rrm2 +'].idx'`" /> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RRMPolicyMember id - "/> + <parameter name="field2" value="`$tmp.CellDURRMPolicyMember_id`"/> + </record> + <switch test='`$prop.ransim-mounted`'> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellDU`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </outcome> + <outcome value='true'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.removeRRMPolicyMember.ToNRCellDU.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idNearRTRIC}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idGNBDUFunction}"/> + <parameter name="replacement" value="`$tmp.GNBDUId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idNRCellDU}"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{id}"/> + <parameter name="replacement" value="`$tmp.cellDURRMPolicyRatio_id`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicyRatio-DU.url"/> + <parameter name="target" value="{idx}"/> + <parameter name="replacement" value="`$tmp.cellDURRMPolicyMember_sNSSAI`"/> + </execute> + </block> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Delete RRMPolicy URL - "/> + <parameter name="field2" value="`$tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="field3" value="RRMPolicyRatio id"/> + <parameter name="field4" value="`$tmp.cellDURRMPolicyRatio_id`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.deleteRRMPolicyRatio-DU.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-cellDU-RRMPolicyRatio-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='success'> + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - cellDU RRMpolicyRatio"/> + </record> + </block> + </outcome> + <outcome value='failure'> + <block atomic='true'> + <block atomic='true'> + <set> + <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> + <parameter name="tmp.status" value="success"/> + <parameter name="tmp.reason" value="`$error-message`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$terminate-r-a-n-slice-instance-input.action`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$tmp.so.callbackURL`" /> + <parameter name='field3' value="`$tmp.status`" /> + <parameter name='field4' value="`$tmp.reason`" /> + <parameter name='field5' value="`$tmp.requestID`" /> + <parameter name='field6' value="`$tmp.action`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> + <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> + <parameter name="httpMethod" value="POST"/> + <parameter name="responsePrefix" value="so-callback-terminate-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='*/*' /> + <parameter name="convertResponse" value="true"/> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error sending SO Response" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing cellDU RRMPolicyRatio. Aborting RPC executiopn'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error removing RRMPolicyRatio for NRCellDU. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.DURRMPolicyMembersResourceType' /> + <parameter name='source' value="`'get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.resourceType'`" /> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.removenSSAICUUPRRMPOLICY`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{gnbCUUPId}"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{resourcetype}"/> + <parameter name="replacement" value="`$tmp.DURRMPolicyMembersResourceType`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="outputPath" value="tmp.deleteRRMPolicy-CUUP.configdb.url"/> + <parameter name="target" value="{sNSSAI}"/> + <parameter name="replacement" value="`$tmp.sNSSAI`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.deleteRRMPolicy-CUUP.configdb.url`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="delete-DU-rrmpolicy-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="convertResponse" value="true"/> + <outcome value='failure'> + <block atomic='true'></block> + </outcome> + <outcome value='success'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully removed - gNBDU rrmpolicy Entry from configdb"/> + </record> + </outcome> + </execute> + </block> + </for> </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing cellDU RRMPolicyRatio. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error removing RRMPolicyRatio for NRCellDU. Aborting RPC executiopn'/> - </return> </block> </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> - <parameter name='outputPath' value='tmp.NRCellDURRMPolicyMembersList' /> - <parameter name='source' value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`$tmp.NRCellDURRMPolicyMembersList`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.CellDURRMMembersList" value="`'$get-rrmpolicyratio-du-response.attributes.RRMPolicyRatio['+ $iddu-rrm+'].attributes.rRMPolicyMemberList'`" /> - </execute> + </switch> </block> </for> </block> + </outcome> + <outcome value='false'> <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxListRemove' > - <parameter name="list_pfx" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBDUList['+$id-du +'].cellCUList['+ $id-celldu +'].pLMNInfoList'`" /> - <parameter name="value" value="`$tmp.sNSSAI`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue' > - <parameter name="tmp.ceLLDUpLMNInfoList" value="`'$getNFNSSIRIC-configdb-response.[' +$idy +'].gNBDUList['+$id-du +'].cellCUList['+ $id-celldu +'].pLMNInfoList'`" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updategNBDU`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removegNBDU.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="delete-gNBDU-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating Config DB - NRCellDU. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating NRCellDU-PLMNInfo in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - NRCellCU pLMNinfo "/> - </record> - </block> - </outcome> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updateRRMPolicy`"/> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-removeRRMPolicy-DU.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="delete-gNBDU-rrmpolicy-configdb-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block atomic='true'> - <block atomic='true'> - <set> - <parameter name="tmp.so.callbackURL" value="`$payloadJson.input.callbackURL`"/> - <parameter name="tmp.status" value="`$error-code`"/> - <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$terminateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$terminateRANSlice-input.action`"/> - </set> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$tmp.so.callbackURL`" /> - <parameter name='field3' value="`$tmp.status`" /> - <parameter name='field4' value="`$tmp.reason`" /> - <parameter name='field5' value="`$tmp.requestID`" /> - <parameter name='field6' value="`$tmp.action`" /> - </record> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> - <parameter name="restapiUrl" value="`$tmp.so.callbackURL`"/> - <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-modify-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='*/*' /> - <parameter name="convertResponse" value="true"/> - <outcome value='failure'> - <block> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error sending SO Response" /> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> - </record> - </block> - </outcome> - </execute> - </block> - <set> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error in updating RRMPolicyRatio - NRCellDU. Aborting RPC executiopn'/> - </set> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error updating NRCellDU-RRMPolicyRatio in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully updated ConfigDB - NRCellDU RRMPolicyRatio "/> - </record> - </block> - </outcome> - </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/terminateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="plmninfolistnssailength in false in DU "/> + <parameter name="field2" value="`$tmp.sNssaiListLengthDU`"/> + </record> </block> - </block> - </outcome> - </switch> - </block> - </for> + </outcome> + </switch> + </block> + </for> + </block> </for> </block> </for> @@ -2542,10 +2536,10 @@ </return> <block atomic='true'> <set> - <parameter name="tmp.status" value="`$error-code`"/> + <parameter name="tmp.status" value="success"/> <parameter name="tmp.reason" value="`$error-message`"/> - <parameter name="tmp.requestID" value="`$instantiate-r-a-n-slice-input.common-header.request-id `"/> - <parameter name="tmp.action" value="`$instantiate-r-a-n-slice-input.action`"/> + <parameter name="tmp.requestID" value="`$terminate-r-a-n-slice-input.common-header.request-id `"/> + <parameter name="tmp.action" value="`$tmp.action`"/> </set> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > <parameter name="source" value="`$prop.restapi.so.callbackURL`"/> @@ -2567,7 +2561,7 @@ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-so-response.json'`" /> <parameter name="restapiUrl" value="`$payloadJson.input.callbackURL`"/> <parameter name="httpMethod" value="POST"/> - <parameter name="responsePrefix" value="so-callback-response"/> + <parameter name="responsePrefix" value="so-callback-termi-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='*/*' /> |