diff options
Diffstat (limited to 'platform-logic/ran-slice-api/src/main/xml')
3 files changed, 1126 insertions, 479 deletions
diff --git a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_activateRANSliceInstance.xml b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_activateRANSliceInstance.xml index f2af89f8..c77357cf 100644 --- a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_activateRANSliceInstance.xml +++ b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_activateRANSliceInstance.xml @@ -6,32 +6,32 @@ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/activateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="RPC to handle terminateRANSlice.: "/> - <parameter name="field2" value="`$activate-r-a-n-slice-input.action`"/> - <parameter name="field3" value="`$activate-r-a-n-slice-input.common-header.timestamp`"/> - <parameter name="field4" value="`$activate-r-a-n-slice-input.common-header.request-id`"/> - <parameter name="field5" value="`$activate-r-a-n-slice-input.common-header.originator-id`"/> + <parameter name="field1" value="RPC to handle activateRANSlice.: "/> + <parameter name="field2" value="`$activate-r-a-n-slice-instance-input.action`"/> + <parameter name="field3" value="`$activate-r-a-n-slice-instance-input.timestamp`"/> + <parameter name="field4" value="`$activate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="field5" value="`$activate-r-a-n-slice-instance-input.common-header.originator-id`"/> <parameter name="field6" value="RPC Payload String "/> - <parameter name="field7" value="`$activate-r-a-n-slice-input.payload`"/> + <parameter name="field7" value="`$activate-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' /> + <parameter name='error-message' value='Successful execution of activateRANSice RPC' /> </set> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'> - <parameter name='source' value='activate-r-a-n-slice-input.payload' /> + <parameter name='source' value='activate-r-a-n-slice-instance-input.payload' /> <parameter name='outputPath' value='payloadJson' /> <parameter name='isEscaped' value='false' /> <outcome value='success'> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-terminateRANSlice-context.log' /> + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-activateRANSlice-context.log' /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/activateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Payload for terminateRANSlice.: "/> - <parameter name="field2" value="`$tmp.sNSSAI`"/> + <parameter name="field1" value="Payload for activateRANSlice.: "/> + <parameter name="field2" value="`$payloadJson.input.sNSSAI`"/> <parameter name="field3" value="`$payloadJson.input.RANNFNSSIId`"/> <parameter name="field4" value="`$payloadJson.input.callbackURL`"/> <parameter name="field5" value="`$payloadJson.input.sliceProfileId`"/> @@ -39,12 +39,11 @@ </block> </outcome> </execute> - <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> + <set> + <parameter name='tmp.sNSSAI' value="`$payloadJson.input.sNSSAI`" /> + </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' /> + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-activateRANSlice-context.log' /> </execute> <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > <parameter name='fileName' value='/opt/onap/ccsdk/data/properties/ran-slice-api-dg.properties' /> @@ -62,9 +61,22 @@ <parameter name="field7" value="config DB deployed (true/false): "/> <parameter name="field8" value="`$prop.configdb-deployed`"/> </record> - <set> - <parameter name='tmp.status' value='ACTIVE' /> - </set> + <switch test='`$activate-r-a-n-slice-instance-input.action == activate`'> + <outcome value='true'> + <block atomic='true'> + <set> + <parameter name='tmp.status' value='ACTIVE' /> + </set> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <set> + <parameter name='tmp.status' value='INACTIVE' /> + </set> + </block> + </outcome> + </switch> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > <parameter name="source" value="`$prop.restapi.configdb.getNearRTRICByNSSI`"/> <parameter name="outputPath" value="tmp.configdb.getNearRTRICByNSSI.url"/> @@ -97,8 +109,8 @@ <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="`$instantiateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$instantiateRANSlice-input.action`"/> + <parameter name="tmp.requestID" value="`$activate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$activate-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" /> @@ -114,7 +126,7 @@ <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="responsePrefix" value="so-callback-activate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> @@ -150,7 +162,7 @@ <parameter name="field2" value="`$getNFNSSIRIC-configdb-response._length`"/> </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' /> + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-activateRANSlice-context.log' /> </execute> </block> </outcome> @@ -178,7 +190,7 @@ </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`" /> + <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`" /> @@ -198,14 +210,23 @@ <parameter name="field2" value="`$tmp.mcc`"/> <parameter name="field3" value="`$tmp.mnc`"/> </record> - <for index='idy' start='0' end='`$getNFNSSIRIC-configdb-response._length`' > + <set> + <parameter name='tmp.RICList_length' value="`$getNFNSSIRIC-configdb-response._length`"/> + </set> + <for index='idy' start='0' end='`$tmp.RICList_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> + </block> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> <parameter name='outputPath' value='tmp.CUCPList_length' /> <parameter name='source' value="`'getNFNSSIRIC-configdb-response.[' + $idy +'].gNBCUCPList_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/activateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="Number of CUCP List Entries "/> <parameter name="field2" value="`$tmp.CUCPList_length`"/> @@ -219,7 +240,7 @@ <parameter name='source' value="`'getNFNSSIRIC-configdb-response.['+ $idy +'].gNBCUCPList['+ $idz +'].gNBCUName'`" /> </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/activateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="CUCPName "/> <parameter name="field2" value="`$tmp.CUCPName`"/> @@ -231,8 +252,12 @@ <for index='idcu' start='0' end='`$tmp.cellCUList_length`' > <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cellLocalId' /> + <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.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'> @@ -241,7 +266,7 @@ <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/instantiateRANSliceModifyAllocate.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/activateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="sNSSAI - getNFNSSIRIC-configdb-response"/> <parameter name="field2" value="`$tmp.configDBSNSSAI`"/> @@ -252,7 +277,7 @@ <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="file" value="/opt/opendaylight/current/data/log/activateRANSlice.log" /> <parameter name="level" value="info" /> <parameter name="field1" value="CellCU is applicable for the NSSAI "/> </record> @@ -347,8 +372,8 @@ <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="`$instantiateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$instantiateRANSlice-input.action`"/> + <parameter name="tmp.requestID" value="`$activate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$activate-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" /> @@ -364,7 +389,7 @@ <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="responsePrefix" value="so-callback-activate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> @@ -442,19 +467,56 @@ </execute> <for index='id-plmn' start='0' end='`$tmp.pLMNInfoList`'> <block atomic='true'> - <switch test='`$prop.ransim-mounted`'> + <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 +'].gNBCUUPList['+ $idz +'].pLMNInfoList['+ $id-plmn +'].sNSSAI.sNSSAI'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/activateRANSlice.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='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.patchPLMNInfoListEntry.ToGNBCUUP`"/> - <parameter name="outputPath" value="tmp.patchPLMNInfoList-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/activateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="sNSSAI doesn't match"/> + </record> </outcome> <outcome value='true'> <block atomic='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.patchPLMNInfoListEntry.ToGNBCUUP`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoList-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.patchPLMNInfoListEntry.ToGNBCUUP.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoList-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.patchPLMNInfoList-CUUP.url`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoList-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="`$prop.restapi.patchPLMNInfoListEntry.ToGNBCUUP.ransim-mounted`"/> + <parameter name="source" value="`$tmp.patchPLMNInfoList-CUUP.url`"/> <parameter name="outputPath" value="tmp.patchPLMNInfoList-CUUP.url"/> <parameter name="target" value="{idNearRTRIC}"/> <parameter name="replacement" value="`$tmp.nearRTRICId`"/> @@ -462,98 +524,104 @@ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > <parameter name="source" value="`$tmp.patchPLMNInfoList-CUUP.url`"/> <parameter name="outputPath" value="tmp.patchPLMNInfoList-CUUP.url"/> - <parameter name="target" value="{mountName}"/> + <parameter name="target" value="{idGNBCUUPFunction}"/> <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.patchPLMNInfoList-CUUP.url`"/> - <parameter name="outputPath" value="tmp.patchPLMNInfoList-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="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-patch-sNSSAI-status.json'`" /> - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.patchPLMNInfoList-CUUP.url`"/> - <parameter name="restapiUser" value="`$prop.controller.user`" /> - <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="PATCH"/> - <parameter name="responsePrefix" value="activate-gNBCUUP-PLMNInfoList-response"/> - <parameter name='contentType' value='application/yang.patch+json' /> - <parameter name='accept' value='application/yang.patch-status+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 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 patching 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="`$instantiateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$instantiateRANSlice-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='application/json' /> - <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.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.patchPLMNInfoList-CUUP.url`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoList-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.patchPLMNInfoList-CUUP.url`"/> + <parameter name="outputPath" value="tmp.patchPLMNInfoList-CUUP.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-patch-sNSSAI-status.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.patchPLMNInfoList-CUUP.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="PATCH"/> + <parameter name="responsePrefix" value="activate-gNBCUUP-PLMNInfoList-response"/> + <parameter name='contentType' value='application/yang.patch+json' /> + <parameter name='accept' value='application/yang.patch-status+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 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 patching 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="`$activate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$activate-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/activateRANSlice.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="SO Response Sent "/> + <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-activate-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> + <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/activateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> </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/activateRANSlice.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Patched - gNBCUUP PLMNInfo List"/> - </record> + </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/activateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully Patched - gNBCUUP PLMNInfo List"/> + </record> + </block> + </outcome> + </execute> </block> </outcome> - </execute> + </switch> </block> </for> </block> @@ -591,31 +659,28 @@ <for index='id-celldu' start='0' end='`$tmp.cellDUList_length`' > <block> <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> + <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 '`" /> + <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/activateRANSlice.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`"/> + <parameter name="field1" value="DUpLMNInfoList_length"/> + <parameter name="field2" value="`$tmp.DUpLMNInfoList_length`"/> </record> + <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> <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/activateRANSlice.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' > @@ -642,10 +707,6 @@ </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.patchPLMNInfoListEntry-cellDU.url`"/> <parameter name="outputPath" value="tmp.patchPLMNInfoListEntry-cellDU.url"/> @@ -656,7 +717,7 @@ <parameter name="source" value="`$tmp.patchPLMNInfoListEntry-cellDU.url`"/> <parameter name="outputPath" value="tmp.patchPLMNInfoListEntry-cellDU.url"/> <parameter name="target" value="{idNRCellDU}"/> - <parameter name="replacement" value="`$tmp.cellCULocalId`"/> + <parameter name="replacement" value="`$tmp.cellDULocalId`"/> </execute> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > <parameter name="source" value="`$tmp.patchPLMNInfoListEntry-cellDU.url`"/> @@ -673,7 +734,7 @@ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/activateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="patch cellCU NSSAI parameters"/> + <parameter name="field1" value="patch cellDU NSSAI parameters"/> <parameter name="field2" value="`$tmp.nearRTRICId`"/> <parameter name="field3" value="`$tmp.GNBDUId`"/> <parameter name="field4" value="`$tmp.cellDULocalId`"/> @@ -698,8 +759,8 @@ <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="`$instantiateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$instantiateRANSlice-input.action`"/> + <parameter name="tmp.requestID" value="`$activate-r-a-n-slice-instance-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$activate-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" /> @@ -715,7 +776,7 @@ <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="responsePrefix" value="so-callback-activate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> @@ -804,7 +865,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-activate-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> diff --git a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceAllocate.xml b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceAllocate.xml index 12b0a024..46228255 100644 --- a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceAllocate.xml +++ b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceAllocate.xml @@ -59,12 +59,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -161,12 +163,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -413,12 +417,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -555,6 +561,21 @@ <switch test="`$tmp.gNBCUCPList.cellLocalId == $tmp.cellLocalId`"> <outcome value='true'> <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setPropertiesForList'> + <parameter name='prefixKey' value='tmp.CUCPList.response' /> + <parameter name='keyName' value='gNBCUName' /> + <parameter name='keyValue' value="`$tmp.gNBCUCPList.gNBCUName`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='CUCPListEntries_size' /> + <parameter name='source' value="`tmp.CUCPList.response_length`" /> + </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="level" value="info" /> + <parameter name="field1" value="CUCPList length"/> + <parameter name="field2" value="`$CUCPListEntries_size`"/> + </record> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> <parameter name='outputPath' value='tmp.pLMNInfoListEntries' /> @@ -634,6 +655,9 @@ <parameter name="target" value="{mnc}"/> <parameter name="replacement" value="`$tmp.mnc`"/> </execute> + <set> + <parameter name='tmp.maxNumberOfConns' value='`$tmp.payload.maxNumberofConns/$tmp.cellCUListEntries`'/> + </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" /> @@ -690,12 +714,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -774,6 +800,9 @@ <parameter name="target" value="{id}"/> <parameter name="replacement" value="`$tmp.RRMPolicyRatioID.NRCellCU`"/> </execute> + <set> + <parameter name='tmp.resourceID' value='`$tmp.cellLocalId`'/> + </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" /> @@ -830,12 +859,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -912,12 +943,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -950,98 +983,100 @@ </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-updateRRMPolicy-CUCP.json'`" /> + <parameter name="httpMethod" value="PUT"/> + <parameter name="responsePrefix" value="update-gNBCUCP-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> + <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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/instantiateRANSlice.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 updating RRMPolicy CUCP 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 RRMPolicy CUCP info in ConfigDB. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <set> + <parameter name='prop.configDB.rrmPolicyID' value='`$prop.configDB.rrmPolicyID + 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="level" value="info" /> + <parameter name="field1" value="Successfully Updated RRMPolicy CUCP info in ConfigDB"/> + <parameter name="field2" value="Incremented ConfigDB rrmPolicyID"/> + <parameter name="field3" value='`$prop.configDB.rrmPolicyID`' /> + </record> + </block> + </outcome> + </execute> </block> </outcome> </switch> </block> </for> </for> - <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-updateRRMPolicy-CUCP.json'`" /> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="update-gNBCUCP-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> - <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="`$instantiateRANSlice-input.common-header.request-id`"/> - <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> - <parameter name='field7' value="`$tmp.CUCPList`" /> - <parameter name='field8' value="`$tmp.CUUPList`" /> - <parameter name='field9' value="`$tmp.DUList`" /> - </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-response"/> - <parameter name='contentType' value='application/json' /> - <parameter name='format' value='json' /> - <parameter name='accept' value='application/json' /> - <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/instantiateRANSlice.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 updating RRMPolicy CUCP 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 RRMPolicy CUCP info in ConfigDB. Aborting RPC executiopn'/> - </return> - </block> - </outcome> - <outcome value='success'> - <block> - <set> - <parameter name='prop.configDB.rrmPolicyID' value='`$prop.configDB.rrmPolicyID + 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="level" value="info" /> - <parameter name="field1" value="Successfully Updated RRMPolicy CUCP info in ConfigDB"/> - <parameter name="field2" value="Incremented ConfigDB rrmPolicyID"/> - <parameter name="field3" value='`$prop.configDB.rrmPolicyID`' /> - </record> - </block> - </outcome> - </execute> </for> </block> <block atomic='true'> @@ -1057,10 +1092,16 @@ </record> <block atomic='true'> <set> - <parameter name='tmp.maxNumberOfConns' value='`$payloadJson.input.sliceProfile.maxNumberOfConns`' /> + <parameter name='tmp.maxNumberOfConns-CUUP' value='`$tmp.payload.maxNumberofConns/$tmp.cellCUListEntries`' /> </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="maxNumberOfConns.CUUP "/> + <parameter name="field2" value="`$tmp.maxNumberOfConns-CUUP`"/> + </record> <set> - <parameter name='tmp.TotalNumberOfDRBForNSSAI' value='`$tmp.maxNumberOfConns*4`' /> + <parameter name='tmp.TotalNumberOfDRBForNSSAI' value='`$tmp.maxNumberOfConns-CUUP*4`' /> </set> <set> <parameter name='tmp.DRBPerCUUPForSNSSAI' value='`$tmp.TotalNumberOfDRBForNSSAI / $tmp.CUUPListEntries`' /> @@ -1085,7 +1126,7 @@ <parameter name="field9" value="tmp.rRMPolicyDedicatedRatio.CUUP"/> <parameter name="field10" value="`$tmp.rRMPolicyDedicatedRatio.CUUP`"/> <parameter name="field11" value="tmp.maxNumberOfConns"/> - <parameter name="field12" value="`$tmp.maxNumberOfConns`"/> + <parameter name="field12" value="`$tmp.maxNumberOfConns-CUUP`"/> </record> </block> <for index='id2' start='0' end='`$tmp.CUUPListEntries `' > @@ -1188,6 +1229,9 @@ <parameter name="target" value="{mnc}"/> <parameter name="replacement" value="`$tmp.mnc`"/> </execute> + <set> + <parameter name='tmp.maxNumberOfConns' value='`$tmp.payload.maxNumberofConns/$tmp.cellCUListEntries`'/> + </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" /> @@ -1239,12 +1283,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -1282,6 +1328,11 @@ </block> </outcome> </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setPropertiesForList'> + <parameter name='prefixKey' value='tmp.CUUPList.response' /> + <parameter name='keyName' value='gNBCUUPId' /> + <parameter name='keyValue' value="`$tmp.gNBCUUPList.gNBCUUPId`"/> + </execute> </block> <block atomic='true'> <switch test='`$prop.ransim-mounted`'> @@ -1322,6 +1373,9 @@ <parameter name="target" value="{id}"/> <parameter name="replacement" value="`$tmp.RRMPolicyRatioID.GNBCUUPFunction`"/> </execute> + <set> + <parameter name='tmp.resourceID' value='`$tmp.gNBCUUPList.gNBCUUPId`'/> + </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" /> @@ -1373,12 +1427,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -1451,12 +1507,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -1532,12 +1590,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -1795,6 +1855,10 @@ <parameter name="target" value="{mnc}"/> <parameter name="replacement" value="`$tmp.mnc`"/> </execute> + <set> + <parameter name='tmp.uLThptPerSlice' value='`$tmp.payload.uLThptPerSlice/$tmp.cellDUListEntries`'/> + <parameter name='tmp.dLThptPerSlice' value='`$tmp.payload.dLThptPerSlice/$tmp.cellDUListEntries`'/> + </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" /> @@ -1846,12 +1910,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -1889,6 +1955,11 @@ </block> </outcome> </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setPropertiesForList'> + <parameter name='prefixKey' value='tmp.DUList.response' /> + <parameter name='keyName' value='gNBDUId' /> + <parameter name='keyValue' value="`$tmp.gNBDUList.gNBDUId`"/> + </execute> </block> <block atomic='true'> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > @@ -1972,6 +2043,9 @@ </block> </outcome> </execute> + <set> + <parameter name='tmp.resourceID-DU' value='`$tmp.cellLocalId`'/> + </set> <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-updateRRMPolicy-DU.json'`" /> @@ -2155,12 +2229,14 @@ </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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> <outcome value='failure'> <block> <return status='failure'> @@ -2222,42 +2298,82 @@ </for> </block> </for> - </block> - <block atomic='true'> <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/instantiateRANSlice.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="URL for SO Callback Response"/> - <parameter name='field2' value="`$payloadJson.input.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='field7' value="`$tmp.CUCPList`" /> - <parameter name='field8' value="`$tmp.CUUPList`" /> - <parameter name='field9' value="`$tmp.DUList`" /> + <parameter name="field1" value="Update inventory in ConfigDB"/> </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-response"/> + <parameter name="restapiUrl" value="`$prop.configdb.url + $prop.restapi.configdb.updateRANSliceInventory`"/> + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-configDB-updateRANSliceInventory.json'`" /> + <parameter name="httpMethod" value="PUT"/> + <parameter name="responsePrefix" value="update-inventory-configdb-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> - <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> - <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <parameter name="convertResponse" value="true"/> <outcome value='failure'> <block> <set> <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error sending SO response. Aborting RPC executiopn'/> + <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 sending SO Response" /> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error updating inventory 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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/instantiateRANSlice.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> </block> </outcome> <outcome value='success'> @@ -2265,17 +2381,80 @@ <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="SO Response Sent "/> + <parameter name="field1" value="Successfully Updated inventory in ConfigDB"/> </record> </block> </outcome> </execute> + <block atomic='true'> + <set> + <parameter name="tmp.status" value="`$error-code`"/> + <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`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.so.callbackURL`"/> + <parameter name="outputPath" value="tmp.so.callbackURL"/> + <parameter name="target" value="{requestId}"/> + <parameter name="replacement" value="`$tmp.requestID`"/> + </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="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$payloadJson.input.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='field7' value="`$prop.restapi.so.user`" /> + <parameter name='field8' value="`$prop.restapi.so.password`" /> + <parameter name='field9' value="`$tmp.DUList.response_length`" /> + <parameter name='field10' value="`$tmp.CUCPList.response`" /> + <parameter name='field11' value="`$tmp.CUUPList.response`" /> + <parameter name='field12' value="`$tmp.DUList.response`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error sending SO response. 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" /> + </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/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + <return status='success'> + <parameter name="ack-final" value="N" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="SUCCESSFUL Execution" /> + </return> </block> - <return status='success'> - <parameter name="ack-final" value="N" /> - <parameter name="error-code" value="200" /> - <parameter name="error-message" value="SUCCESSFUL Execution" /> - </return> </block> </method> </service-logic>
\ No newline at end of file diff --git a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceReconfigure.xml b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceReconfigure.xml index 5b199fd1..1ae327fe 100644 --- a/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceReconfigure.xml +++ b/platform-logic/ran-slice-api/src/main/xml/ran-slice-api_instantiateRANSliceReconfigure.xml @@ -22,6 +22,7 @@ <set> <parameter name='tmp.payload.numberUpdates' value='`$payloadJson.input.additionalproperties.resourceConfig.data_length`'/> <parameter name="tmp.sliceProfileId" value="`$payloadJson.input.sliceProfile.sliceProfileId`"/> + <parameter name='tmp.payload.sNSSAI' value='`$payloadJson.input.sliceProfile.sNSSAI`'/> </set> <for index='id1' start='0' end="`$tmp.payload.numberUpdates`" > <set> @@ -107,6 +108,55 @@ <parameter name='error-code' value='500'/> <parameter name='error-message' value='Error Patching slice profile parms for close loop. Exiting close loop operation'/> </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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> </block> </outcome> <outcome value='success'> @@ -123,261 +173,558 @@ </outcome> </execute> </block> - </for> - </block> - </block> - </outcome> - <outcome value='false'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' > - <parameter name='source' value='`$instantiate-r-a-n-slice-input.payload`' /> - <parameter name='target' value='maxNumberofConns' /> - <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/intelligentSlicing.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="PAYLOAD contains maxNumberofConns...Inntelligent Slicing "/> - </record> - <block atomic="true"> - <set> - <parameter name='tmp.payload.dataPoints' value='`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data_length`'/> - <parameter name="tmp.sNssai" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.snssai`"/> - <parameter name="tmp.sliceProfileId" value="`$payloadJson.input.sliceProfile.sliceProfileId`"/> - </set> - <for index='id1' start='0' end="`$tmp.payload.dataPoints`" > - <block atomic='true'> - <set> - <parameter name="tmp.cellCUListNumbers" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].cellCUList_length`"/> - <parameter name="tmp.gNBCUName" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].gNBCUName`"/> - <parameter name="tmp.nearRTRICId" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].nearRTRICId`"/> - </set> - <for index='id2' start='0' end="`$tmp.cellCUListNumbers`" > - <set> - <parameter name="tmp.maxNumberofConns" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].cellCUList[$id2].configData.maxNumberofConns`"/> - <parameter name="tmp.cellLocalId" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].cellCUList[$id2].cellLocalId`"/> - <parameter name="tmp.lastUpdatedTS" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].cellCUList[$id2].configData.lastUpdatedTS`"/> - <parameter name="tmp.predictedMaxNumberofConns" value="`$payloadJson.input.additionalproperties.resourceConfig.maxNumberofConns.data[$id1].cellCUList[$id2].configData.predictedMaxNumberofConns`"/> - </set> - <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.addnSSAIEntry.ToNRCellCU`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.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.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{idGNBCUCPFunction}"/> - <parameter name="replacement" value="`$tmp.gNBCUName`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{idNRCellCU}"/> - <parameter name="replacement" value="`$tmp.cellLocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{sNssai}"/> - <parameter name="replacement" value="`$tmp.sNssai`"/> - </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.addSliceProfile.ToNearRTRIC.ransim-mounted`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.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.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{idGNBCUCPFunction}"/> - <parameter name="replacement" value="`$tmp.gNBCUName`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{mountName}"/> - <parameter name="replacement" value="`$tmp.nearRTRICId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{idNRCellCU}"/> - <parameter name="replacement" value="`$tmp.cellLocalId`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{sNssai}"/> - <parameter name="replacement" value="`$tmp.sNssai`"/> - </execute> - </block> - </outcome> - </switch> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Update NRCELLCU config url for Intelligent slicing:"/> - <parameter name="field2" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - </record> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <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="`$tmp.sliceProfileId`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Get PLMN from SliceProfileId URL: "/> + <parameter name="field2" value="`$tmp.configdb.getPLMNId.url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.getPLMNId.url`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="getPLMN-CL-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='success'> + <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Setting variables for updating NRCELLCU - Intelligent Slicing"/> - <parameter name="field2" value="`$prop.controller.url + $tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="field3" value="`$tmp.nearRTRICId`"/> - <parameter name="field4" value="`$tmp.gNBCUName`"/> - <parameter name="field5" value="`$tmp.sNssai`"/> - <parameter name="field6" value="`$tmp.maxNumberofConns`"/> - <parameter name="field7" value="`$tmp.cellLocalId`"/> - <parameter name="field8" value="`$tmp.lastUpdatedTS`"/> - <parameter name="field9" value="`$tmp.predictedMaxNumberofConns`"/> + <parameter name="field1" value="Successfully Obtained PLMNId info from ConfigDB"/> + <parameter name="field2" value="`$getPLMN-CL-configdb-response`"/> </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> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error Getting Info from 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 Getting Info from ConfigDB. Aborting RPC executiopn'/> + </return> <block atomic='true'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.configdb.getplmn`"/> - <parameter name="outputPath" value="tmp.configdb.getplmn.url"/> - <parameter name="target" value="{sliceProfileId}"/> - <parameter name="replacement" value="`$tmp.sliceProfileId`"/> - </execute> + <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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-input.action`"/> + </set> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="URL for configDB Get PLMN for slice profile ID"/> - <parameter name='field2' value="`$prop.configdb.url + $tmp.configdb.getplmn.url`" /> - <parameter name='field3' value="`$tmp.sliceProfileId`" /> + <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='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> </record> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.getplmn.url`"/> - <parameter name="httpMethod" value="GET"/> - <parameter name="responsePrefix" value="getplmn-configdb-response"/> + <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-response"/> <parameter name='contentType' value='application/json' /> <parameter name='format' value='json' /> <parameter name='accept' value='application/json' /> - <parameter name="convertResponse" value="false"/> <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> - <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Failed to Obtain PLMN from configDB"/> - </record> <return status='failure'> <parameter name='ack-final' value='Y'/> - <parameter name='error-code' value='500'/> - <parameter name='error-message' value='Error Getting Info from ConfigDB. Aborting RPC executiopn'/> + <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/intelligentSlicing.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="Successfully Obtained PLMN from configDB"/> - <parameter name="field2" value="`$getplmn-configdb-response.httpResponse`"/> + <parameter name="field1" value="SO Response Sent "/> </record> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-intelligentslicing-configrsp-context.log' /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring'> - <parameter name="string" value="`$getplmn-configdb-response.httpResponse`" /> - <parameter name="result" value="tmp.mcc"/> - <parameter name="begin-index" value="0" /> - <parameter name="end-index" value="3" /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring'> - <parameter name="string" value="`$getplmn-configdb-response.httpResponse`" /> - <parameter name="result" value="tmp.mnc"/> - <parameter name="begin-index" value="4" /> - </execute> + </block> + </outcome> + </execute> + </block> + </block> + </outcome> + </execute> + <set> + <parameter name='tmp.pLMNId' value='`$getPLMN-CL-configdb-response.plmnId`'/> + </set> + <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" /> + </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> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="`$tmp.pLMNId`"/> + <parameter name="field2" value="`$tmp.mcc`"/> + <parameter name="field3" value="`$tmp.mnc`"/> + </record> + </block> + <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.addnSSAIEntry.ToNearRTRIC`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.addnSSAIEntry.ToNearRTRIC.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Closed loop API params"/> + <parameter name="field2" value="`$tmp.nearRTRICId`"/> + <parameter name="field3" value="`$tmp.mcc`"/> + <parameter name="field4" value="`$tmp.mnc`"/> + <parameter name="field5" value="`$tmp.payload.sNSSAI`"/> + <parameter name="field6" value="`$tmp.uLThptPerSlice`"/> + <parameter name="field7" value="`$tmp.dLThptPerSlice`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-closed-loop-nearRTRIC-config-patch.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="PATCH"/> + <parameter name="responsePrefix" value="patch-nearRTRIC-config-response"/> + <parameter name='contentType' value='application/yang.patch+json' /> + <parameter name='accept' value='application/yang.patch-status+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/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully patched NearRTRIC configuration"/> + </record> + </block> + </outcome> + <outcome value='failure'> + <block> + <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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/intelligentSlicing.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/so-callback-response.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="mcc: "/> - <parameter name="field2" value="`$tmp.mcc`"/> - <parameter name="field3" value="mnc: "/> - <parameter name="field4" value="`$tmp.mnc`"/> + <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 Getting Info from 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 Getting Info from ConfigDB. Aborting RPC executiopn'/> + </return> + </block> + </outcome> + </execute> + </block> + </for> + </block> + </block> + </outcome> + <outcome value='false'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' > + <parameter name='source' value='`$instantiate-r-a-n-slice-input.payload`' /> + <parameter name='target' value='maxNumberofConns' /> + <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/intelligentSlicing.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="PAYLOAD contains maxNumberofConns...Inntelligent Slicing "/> + </record> + <set> + <parameter name='tmp.payload.dataPoints' value='`$payloadJson.input.additionalproperties.resourceConfig.data_length`'/> + <parameter name="tmp.payload.sNSSAI" value="`$payloadJson.input.additionalproperties.resourceConfig.snssai`"/> + <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/intelligentSlicing.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Data length "/> + <parameter name="field2" value="`$tmp.payload.dataPoints`"/> + </record> + <block atomic="true"> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <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="`$tmp.sliceProfileId`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Get PLMN from SliceProfileId URL: "/> + <parameter name="field2" value="`$tmp.configdb.getPLMNId.url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.getPLMNId.url`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="getPLMN-CL-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='success'> <block atomic='true'> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> - <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="mcc: "/> - <parameter name="field2" value="`$tmp.mcc`"/> - <parameter name="field3" value="mnc: "/> - <parameter name="field4" value="`$tmp.mnc`"/> + <parameter name="field1" value="Successfully Obtained PLMNId info from ConfigDB"/> + <parameter name="field2" value="`$getPLMN-CL-configdb-response`"/> </record> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-intelligent-nearRTRIC-context2.log' /> + <parameter name='filename' value='/opt/opendaylight/current/data/log/ranSlice-instantiateRANSlice-configrsp-context.log' /> </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{mcc}"/> - <parameter name="replacement" value="`$tmp.mcc`"/> + </block> + </outcome> + <outcome value='failure'> + <block atomic='true'> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error Getting Info from 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 Getting Info from 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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> + </block> + </outcome> + </execute> + <set> + <parameter name='tmp.pLMNId' value='`$getPLMN-CL-configdb-response.plmnId`'/> + </set> + <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" /> + </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> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="`$tmp.pLMNId`"/> + <parameter name="field2" value="`$tmp.mcc`"/> + <parameter name="field3" value="`$tmp.mnc`"/> + </record> + </block> + <for index='id-is' start='0' end="`$tmp.payload.dataPoints`" > + <block atomic="true"> + <set> + <parameter name="tmp.nearRTRICId" value="`$payloadJson.input.additionalproperties.resourceConfig.data[$id-is].nearRTRICId`"/> + </set> + <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.addnSSAIEntry.ToNearRTRIC`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.addnSSAIEntry.ToNearRTRIC.ransim-mounted`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.url"/> + <parameter name="target" value="{mountName}"/> + <parameter name="replacement" value="`$tmp.nearRTRICId`"/> + </execute> + </block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.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.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> + <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNearRTRIC.url"/> + <parameter name="target" value="{mnc}"/> + <parameter name="replacement" value="`$tmp.mnc`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.CUCellListEntries' /> + <parameter name='source' value="`'payloadJson.input.additionalproperties.resourceConfig.data['+$id-is+'].cellCUList_length'`" /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="CUCEll List length "/> + <parameter name="field2" value="`$tmp.CUCellListEntries`"/> + </record> + <for index='id2' start='0' end="`$tmp.CUCellListEntries`" > + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.cellLocalId' /> + <parameter name='source' value="`'payloadJson.input.additionalproperties.resourceConfig.data['+$id-is+'].cellCUList['+$id2+'].cellLocalId'`" /> </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="outputPath" value="tmp.restapi.addnSSAIEntry.ToNRCellCU.url"/> - <parameter name="target" value="{mnc}"/> - <parameter name="replacement" value="`$tmp.mnc`"/> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'> + <parameter name='outputPath' value='tmp.predictedMaxNumberofConns' /> + <parameter name='source' value="`'payloadJson.input.additionalproperties.resourceConfig.data['+$id-is+'].cellCUList['+$id2+'].configData.predictedMaxNumberofConns'`" /> </execute> <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> <parameter name="file" value="/opt/opendaylight/current/data/log/intelligentSlicing.log" /> <parameter name="level" value="info" /> - <parameter name="field1" value="URL for update NRCELLCU "/> - <parameter name="field2" value="`$prop.controller.url + $tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> - <parameter name="field3" value="sNSSAI: "/> - <parameter name="field4" value="`$payloadJson.input.sliceProfile.sNSSAI`"/> - <parameter name="field5" value="maxNumberOfConns: "/> - <parameter name="field6" value="`$tmp.maxNumberOfConns`"/> - <parameter name="field7" value="predictedMaxNumberofConns: "/> - <parameter name="field8" value="`$tmp.predictedMaxNumberofConns`"/> + <parameter name="field1" value="cellLocalId"/> + <parameter name="field2" value="`$tmp.cellLocalId`"/> </record> <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-intelligent-update-NRCellCU-configData.json'`" /> - <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.restapi.addnSSAIEntry.ToNRCellCU.url`"/> + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/ranSlice-closed-loop-nearRTRIC-config-patch.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.restapi.addnSSAIEntry.ToNearRTRIC.url`"/> <parameter name="restapiUser" value="`$prop.controller.user`" /> <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> - <parameter name="httpMethod" value="PUT"/> - <parameter name="responsePrefix" value="nrcellcu-response"/> - <parameter name='contentType' value='application/json' /> + <parameter name="httpMethod" value="PATCH"/> + <parameter name="responsePrefix" value="patch-nearRTRIC-config-response"/> + <parameter name='contentType' value='application/yang.patch+json' /> + <parameter name='accept' value='application/yang.patch-status+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/closedLoop.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Successfully patched NearRTRIC configuration"/> + </record> + </block> + </outcome> <outcome value='failure'> <block> + <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="`$instantiateRANSlice-input.common-header.request-id`"/> + <parameter name="tmp.action" value="`$instantiateRANSlice-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`" /> + <parameter name='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <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/so-callback-response.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 Getting Info from 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 NRCellCU config for intelligent slicing" /> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error Getting Info from 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/intelligentSlicing.log" /> - <parameter name="level" value="info" /> - <parameter name="field1" value="Update NRCellCU config for intelligent slicing Executed Successfully "/> - </record> - </block> - </outcome> </execute> </block> </for> @@ -389,6 +736,66 @@ </execute> </outcome> </execute> + <block atomic='true'> + <set> + <parameter name="tmp.status" value="`$error-code`"/> + <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`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.so.callbackURL`"/> + <parameter name="outputPath" value="tmp.so.callbackURL"/> + <parameter name="target" value="{requestId}"/> + <parameter name="replacement" value="`$tmp.requestID`"/> + </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="level" value="info" /> + <parameter name="field1" value="URL for SO Callback Response"/> + <parameter name='field2' value="`$payloadJson.input.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='field7' value="`$tmp.CUCPList`" /> + <parameter name='field8' value="`$tmp.CUUPList`" /> + <parameter name='field9' value="`$tmp.DUList`" /> + </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-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <parameter name="restapiUser" value="`$prop.restapi.so.user`" /> + <parameter name="restapiPassword" value="`$prop.restapi.so.password`"/> + <outcome value='failure'> + <block> + <set> + <parameter name='error-code' value='500'/> + <parameter name='error-message' value='Error sending SO response. 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" /> + </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/so-callback-response.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="SO Response Sent "/> + </record> + </block> + </outcome> + </execute> + </block> <return status='success'> <parameter name="ack-final" value="N" /> <parameter name="error-code" value="200" /> |