fixed subnet type in nsmf workflow

Issue-ID: SO-2963

Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: I7a955306529877c9006214da892deae34d81badb
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 37b3056..4eb9eed 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 @@
         requestInfo.setCallbackUrl(callbackUrl)
         requestInfo.setSourceId("so")
         requestInfo.setTimeout(timeOut)
-        //requestInfo.setNumSolutions()
+        requestInfo.setNumSolutions(100)
 
         nsiReqBody.setRequestInfo(requestInfo)
         nsiReqBody.setNSTInfo(nstInfo)
@@ -703,7 +703,7 @@
         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 70acadf..c136d52 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 @@
         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")
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 1c4bbdc..1d7acd3 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 @@
 
         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 bc4060e..2cce68a 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.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 @@
                 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 @@
         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)