From 077f84ba5c385a65783e252dcdbdcd3366015523 Mon Sep 17 00:00:00 2001 From: hetengjiao Date: Wed, 4 Nov 2020 17:03:16 +0800 Subject: fixed subnet type in nsmf workflow Issue-ID: SO-2963 Signed-off-by: hetengjiao Change-Id: I7a955306529877c9006214da892deae34d81badb --- .../src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy | 4 ++-- .../onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy | 4 +++- .../onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy | 2 +- .../so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'bpmn') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 37b30567c7..4eb9eedad5 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -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) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy index 70acadf0d8..c136d52b13 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy @@ -315,12 +315,14 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("Start prepareSelectNSTRequest") String requestId = execution.getVariable("msoRequestId") String messageType = "NSTSelectionResponse" - Map serviceProfile = execution.getVariable("serviceProfile") as Map 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 serviceProfile = execution.getVariable("serviceProfile") as Map + serviceProfile.remove("profileId") String oofRequest = oofUtils.buildSelectNSTRequest(requestId, messageType, serviceProfile) execution.setVariable("nstSelection_oofRequest", oofRequest) logger.debug("Finish prepareSelectNSTRequest") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy index 1c4bbdcd26..1d7acd31c1 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy @@ -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) } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy index bc4060e10d..2cce68a2b6 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy @@ -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 profileInfo = sliceParams.getServiceProfile() + profileInfo.remove("profileId") TemplateInfo nstInfo = sliceParams.getNSTInfo() List nsstInfos = execution.getVariable("nsstInfos") as List @@ -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 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) -- cgit 1.2.3-korg