fixed subnet type in nsmf workflow 81/114581/3
authorhetengjiao <hetengjiao@chinamobile.com>
Wed, 4 Nov 2020 09:03:16 +0000 (17:03 +0800)
committerHE TENGJIAO <hetengjiao@chinamobile.com>
Thu, 5 Nov 2020 07:49:03 +0000 (07:49 +0000)
Issue-ID: SO-2963

Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: I7a955306529877c9006214da892deae34d81badb

bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy

index 37b3056..4eb9eed 100644 (file)
@@ -674,7 +674,7 @@ return json.toString()
         requestInfo.setCallbackUrl(callbackUrl)
         requestInfo.setSourceId("so")
         requestInfo.setTimeout(timeOut)
-        //requestInfo.setNumSolutions()
+        requestInfo.setNumSolutions(100)
 
         nsiReqBody.setRequestInfo(requestInfo)
         nsiReqBody.setNSTInfo(nstInfo)
@@ -703,7 +703,7 @@ return json.toString()
         requestInfo.setCallbackUrl(callbackUrl)
         requestInfo.setSourceId("so")
         requestInfo.setTimeout(timeOut)
-        //requestInfo.setNumSolutions()
+        requestInfo.setNumSolutions(100)
 
         nssiReqBody.setRequestInfo(requestInfo)
         nssiReqBody.setSliceProfile(sliceProfile)
index 70acadf..c136d52 100644 (file)
@@ -315,12 +315,14 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
         logger.debug("Start prepareSelectNSTRequest")
         String requestId = execution.getVariable("msoRequestId")
         String messageType = "NSTSelectionResponse"
-        Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") as Map<String, Object>
         execution.setVariable("nstSelectionUrl", "/api/oof/v1/selection/nst")
         execution.setVariable("nstSelection_messageType", messageType)
         execution.setVariable("nstSelection_correlator", requestId)
         String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution);
         execution.setVariable("nstSelection_timeout", timeout)
+
+        Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") as Map<String, Object>
+        serviceProfile.remove("profileId")
         String oofRequest = oofUtils.buildSelectNSTRequest(requestId, messageType, serviceProfile)
         execution.setVariable("nstSelection_oofRequest", oofRequest)
         logger.debug("Finish prepareSelectNSTRequest")
index 1c4bbdc..1d7acd3 100644 (file)
@@ -333,7 +333,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
 
         execution.setVariable("AnAllocateNssiNbiRequest", nbiRequest)
         execution.setVariable("anSliceTaskInfo", sliceTaskInfo)
-        execution.setVariable("anSubnetType", SubnetType.AN_NF)
+        execution.setVariable("anSubnetType", SubnetType.AN)
     }
 
 
index bc4060e..2cce68a 100644 (file)
@@ -43,7 +43,6 @@ import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.springframework.http.ResponseEntity
 import org.springframework.util.StringUtils
 
 class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
@@ -331,6 +330,7 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
                 execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
 
         Map<String, Object> profileInfo = sliceParams.getServiceProfile()
+        profileInfo.remove("profileId")
         TemplateInfo nstInfo = sliceParams.getNSTInfo()
 
         List<TemplateInfo> nsstInfos = execution.getVariable("nsstInfos") as List<TemplateInfo>
@@ -596,7 +596,8 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
         Map nssiNeedHandlerInfo = nssiNeedHandlerInfos.get(currNssiIndex) as Map
 
         TemplateInfo nsstInfo = nssiNeedHandlerInfo.get("nsstInfo") as TemplateInfo
-        Object profileInfo = nssiNeedHandlerInfo.get("sliceProfile")
+        Map<String, Object> profileInfo = nssiNeedHandlerInfo.get("sliceProfile") as Map
+        profileInfo.remove("profileId")
 
         String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution)
         logger.debug( "get NSI option OOF Url: " + urlString)