summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorShashikanth VH <shashikanth.vh@huawei.com>2022-06-06 06:43:27 +0000
committerGerrit Code Review <gerrit@onap.org>2022-06-06 06:43:27 +0000
commit366a173f798422b956625aa83d81fc863e0914a5 (patch)
tree30b760b757a0e1fe601e735b13ad666f46812397 /bpmn/so-bpmn-infrastructure-common
parent8d41d7c008d872dcca748657ae6467b06a25df9c (diff)
parent08e64b98fc5f2067e596c2c407370612c716f253 (diff)
Merge "Fix bugs found in TN Slicing integration involving OOF"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy2
6 files changed, 22 insertions, 8 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
index 71dd9b1426..eb7e89ce54 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
@@ -327,7 +327,7 @@ private SliceProfile createSliceProfile(String domainType, DelegateExecution exe
result.setExpDataRateDL(profile.get("expDataRateDL"))
result.setExpDataRateUL(profile.get("expDataRateUL"))
result.setSurvivalTime(profile.get("survivalTime"))
- result.setMaxNumberOfPDUSession(profile.get("maxNumberOfPDUSession"))
+ result.setMaxNumberOfPDUSession(profile.get("maxNumberofPDUSession"))
result.setAreaTrafficCapDL(profile.get("areaTrafficCapDL"))
result.setAreaTrafficCapUL(profile.get("areaTrafficCapUL"))
result.setOverallUserDensity(profile.get("overallUserDensity"))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
index a11270465a..54fa2abdd1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
@@ -575,7 +575,11 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANServiceInstance.setServiceRole(serviceRole)
List<String> snssaiList = execution.getVariable("snssaiList")
String snssai = snssaiList.get(0)
- //ANServiceInstance.setEnvironmentContext(snssai)
+ //ANServiceInstance.setEnvironmentContext(snssai)
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("modelUuid") as String
+ ANServiceInstance.setModelInvariantId(modelInvariantUuid)
+ ANServiceInstance.setModelVersionId(modelUuid)
ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType")) //Network Type
ANServiceInstance.setWorkloadContext("AN") //domain Type
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
index a784cbee6e..6981d94324 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
@@ -110,6 +110,7 @@ class DoAllocateNSSI extends AbstractServiceTaskProcessor {
execution.setVariable("nssiAllocateStatus", jobStatusResponse)
if (jobStatusResponse.getResponseDescriptor().getProgress() == 100) {
+ nssiAllocateResult.setNssiId(jobStatusResponse.getResponseDescriptor().getNssiId())
execution.setVariable("jobFinished", true)
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
index dd168519e5..d2ba28256f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
@@ -146,6 +146,11 @@ class DoCreateTnNssiInstance extends AbstractServiceTaskProcessor {
ss.setWorkloadContext(domainTypeStr)
}
+ String resourceSharingLevel = jsonUtil.getJsonValue(sliceProfileStr, "resourceSharingLevel")
+ if (isNotBlank(resourceSharingLevel)) {
+ ss.setServiceFunction(resourceSharingLevel)
+ }
+
AAIResourcesClient client = getAAIClient()
AAIResourceUri uri =
AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
index 6fd8080ef0..74a2d980f7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
@@ -40,6 +40,7 @@ import org.onap.so.beans.nsmf.DeAllocateNssi
import org.onap.so.beans.nsmf.EsrInfo
import org.onap.so.beans.nsmf.NetworkType
import org.onap.so.beans.nsmf.ServiceInfo
+import org.onap.so.beans.nsmf.oof.SubnetType
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
@@ -333,9 +334,9 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor {
logger.debug("Generated new job for Service Instance serviceId:" + serviceId + " operationId:" + modificationJobId)
ResourceOperationStatus initStatus = new ResourceOperationStatus()
- initStatus.setServiceId(serviceId)
+ initStatus.setServiceId(nsiId)
initStatus.setOperationId(modificationJobId)
- initStatus.setResourceTemplateUUID(nsiId)
+ initStatus.setResourceTemplateUUID(serviceId)
initStatus.setOperType("Modify-Deallocate")
requestDBUtil.prepareInitResourceOperationStatus(execution, initStatus)
@@ -347,13 +348,18 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor {
String responseId = "1"
String globalSubscriberId = execution.getVariable("globalSubscriberId")
String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ String anNssiId = execution.getVariable("anNssiId")
JsonObject esrInfo = new JsonObject()
esrInfo.addProperty("networkType", networkType)
esrInfo.addProperty("vendor", "ONAP_internal")
JsonObject serviceInfo = new JsonObject()
- serviceInfo.addProperty("nsiId", execution.getVariable("nsiId"))
+ if (networkType.equals(SubnetType.AN.getSubnetType())) {
+ serviceInfo.addProperty("nsiId", execution.getVariable("nsiId"))
+ } else {
+ serviceInfo.addProperty("nsiId", anNssiId)
+ }
serviceInfo.addProperty("nssiId", instanceId)
serviceInfo.addProperty("globalSubscriberId", globalSubscriberId)
serviceInfo.addProperty("subscriptionServiceType", subscriptionServiceType)
@@ -526,7 +532,7 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor {
Map<String, ServiceInstance> relatedSPs = execution.getVariable("relatedSPs")
DeAllocateNssi deallocateNssi = new DeAllocateNssi()
- deallocateNssi.setNsiId(execution.getVariable("nsiId"))
+ deallocateNssi.setNsiId(anNssiId)
ServiceInstance tnNssi = relatedNssis.get(serviceFunction)
String nssiId = tnNssi.getServiceInstanceId()
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
index b1436d5d06..9debd4011b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
@@ -283,8 +283,6 @@ class TnAllocateNssi extends AbstractServiceTaskProcessor {
void prepareModifyTnNssiInputs(DelegateExecution execution) {
logger.debug(Prefix + "prepareModifyTnNssiInputs method start")
- String jobId = UUID.randomUUID().toString()
- execution.setVariable("modifyTnNssiJobId", jobId)
String additionalPropJsonStr = execution.getVariable("sliceParams")
String sliceProfile = execution.getVariable("sliceProfile")
String snssaiList = jsonUtil.getJsonValue(sliceProfile, "snssaiList")