aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordeepikasatheesh <deepika.s84@wipro.com>2021-06-10 19:42:00 +0000
committerdeepikasatheesh <deepika.s84@wipro.com>2021-06-10 19:53:33 +0000
commite7dc04d315cacbe219c9044dbfd4b3ccd078621f (patch)
treeb98bfc53d6fbb20b45d950eb9da3378d0110e63e
parentfd7f014ba55bfd973ac1b2854fdc236cb3cc348a (diff)
Fix issues in shared NSI flow in NSMF
Issue-ID: SO-3629 Signed-off-by: deepikasatheesh <deepika.s84@wipro.com> Change-Id: Ib67ffb8f0143549177e7b2776b219fab4d7f00eb
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AAISliceUtil.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy12
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java3
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java3
6 files changed, 16 insertions, 9 deletions
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 c91316ee5c..69c1c9f8ac 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
@@ -677,7 +677,7 @@ return json.toString()
requestInfo.setCallbackUrl(callbackUrl)
requestInfo.setSourceId("so")
requestInfo.setTimeout(timeOut)
- requestInfo.setNumSolutions(100)
+ requestInfo.setNumSolutions(1)
nsiReqBody.setRequestInfo(requestInfo)
nsiReqBody.setNSTInfo(nstInfo)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AAISliceUtil.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AAISliceUtil.groovy
index b2415e296f..1b09c49124 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AAISliceUtil.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AAISliceUtil.groovy
@@ -136,7 +136,7 @@ class AAISliceUtil {
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
}
AAIResultWrapper wrapper = getAAIClient().get(uri, NotFoundException.class)
- LOGGER.trace(" *****${PREFIX} Exit queryAAI *****")
+ LOGGER.trace(" ***** Exit queryAAI *****")
return wrapper
}
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 a3e245ffea..e4281045bd 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
@@ -428,7 +428,8 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID
serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID
serviceInfo.sST = sliceTaskInfo.sliceProfile.sST ?: sliceParams.serviceProfile.get("sST")
- serviceInfo.nssiName = allocateAnNssi.nssiName
+ serviceInfo.nssiName = sliceTaskInfo.suggestNssiId ? sliceTaskInfo.NSSTInfo.name : allocateAnNssi.nssiName
+ serviceInfo.nssiId = sliceTaskInfo.suggestNssiId
nbiRequest.setServiceInfo(serviceInfo)
nbiRequest.setEsrInfo(esrInfo)
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 91a69b3123..ac959543a2 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
@@ -374,14 +374,15 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
if (solution != null) {
if (execution.getVariable("queryNsiFirst")) {
if (solution.get("existingNSI")) {
+ processSharedNSI(solution, sliceTaskParams, execution)
execution.setVariable("needQuerySliceProfile", true)
} else {
- processNewNSI(solution, sliceTaskParams)
+ processNewSliceProfiles(solution, sliceTaskParams)
execution.setVariable("needQuerySliceProfile", false)
}
execution.setVariable("queryNsiFirst", false)
} else {
- processSharedNSI(solution, sliceTaskParams, execution)
+ processNewSliceProfiles(solution, sliceTaskParams)
execution.setVariable("needQuerySliceProfile", false)
}
}
@@ -400,18 +401,17 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
List<String> nssiId = aaiSliceUtil.getNSSIIdList(execution,nsiId)
List<ServiceInstance> nssiInstances = aaiSliceUtil.getNSSIListFromAAI(execution, nssiId)
- List<Map> sliceProfiles = sharedNSISolution.get("sliceProfiles") as List<Map>
- handleSliceProfiles(sliceProfiles, sliceParams)
Map<String, Object> nssiSolution = new HashMap<>()
for(ServiceInstance instance: nssiInstances){
nssiSolution.put("NSSIId", instance.getServiceInstanceId())
nssiSolution.put("NSSIName", instance.getServiceInstanceName())
- processNssiResult(sliceParams, instance.getEnvironmentContext(), nssiSolution)
+ SubnetType subnetType = instance.getWorkloadContext() as SubnetType
+ processNssiResult(sliceParams, subnetType, nssiSolution)
}
}
- private void processNewNSI(Map<String, Object> solution, SliceTaskParamsAdapter sliceParams) {
+ private void processNewSliceProfiles(Map<String, Object> solution, SliceTaskParamsAdapter sliceParams) {
Map<String, Object> newNSISolution = solution.get("newNSISolution") as Map
List<Map> sliceProfiles = newNSISolution.get("sliceProfiles") as List<Map>
handleSliceProfiles(sliceProfiles, sliceParams)
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
index 3d0f70805c..be4833a0c6 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
@@ -66,4 +66,7 @@ public class AnSliceProfile implements Serializable {
@JsonProperty(value = "resourceSharingLevel")
private ResourceSharingLevel resourceSharingLevel;
+ @JsonProperty(value = "maxNumberofPDUSession")
+ private int maxNumberOfPDUSession;
+
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
index 90cee2794a..0bd6d64dc3 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
@@ -131,6 +131,7 @@ public class SliceProfileAdapter implements Serializable {
anSliceProfile.setUeMobilityLevel(UeMobilityLevel.fromString(this.ueMobilityLevel));
anSliceProfile.setResourceSharingLevel(ResourceSharingLevel.fromString(this.resourceSharingLevel));
+ anSliceProfile.setMaxNumberOfPDUSession(this.maxNumberOfPDUSession);
anSliceProfile.setPerfReq(generatePerfReq());
return anSliceProfile;
@@ -158,6 +159,8 @@ public class SliceProfileAdapter implements Serializable {
List<PerfReqEmbb> perfReqEmbbs = new ArrayList<>();
PerfReqEmbb perfReqEmbb = new PerfReqEmbb();
BeanUtils.copyProperties(this, perfReqEmbb);
+ perfReqEmbb.setExpDataRateDL(this.expDataRateDL);
+ perfReqEmbb.setExpDataRateUL(this.expDataRateUL);
perfReqEmbbs.add(perfReqEmbb);
perfReq.setPerfReqEmbbList(perfReqEmbbs);
} else if ("ullc".equalsIgnoreCase(sST)) {