summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
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.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy1
7 files changed, 22 insertions, 16 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 f17bfc2938..71dd9b1426 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
@@ -254,7 +254,7 @@ else{
//TNFH slice profile instance creation
TNFH_sliceProfileInstance.setServiceInstanceId(TNFH_sliceProfileInstanceId)
- sliceInstanceName = "sliceprofile _ "+TNFH_sliceProfileId
+ sliceInstanceName = "sliceprofile_"+TNFH_sliceProfileId
TNFH_sliceProfileInstance.setServiceInstanceName(sliceInstanceName)
serviceType = jsonUtil.getJsonValue(execution.getVariable("tnFhSliceProfile"), "sST")
TNFH_sliceProfileInstance.setServiceType(serviceType)
@@ -271,7 +271,7 @@ else{
//TNMH slice profile instance creation
TNMH_sliceProfileInstance.setServiceInstanceId(TNMH_sliceProfileInstanceId)
- sliceInstanceName = "sliceprofile _ "+TNMH_sliceProfileId
+ sliceInstanceName = "sliceprofile_"+TNMH_sliceProfileId
TNMH_sliceProfileInstance.setServiceInstanceName(sliceInstanceName)
serviceType = jsonUtil.getJsonValue(execution.getVariable("tnMhSliceProfile"), "sST")
TNMH_sliceProfileInstance.setServiceType(serviceType)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
index 5d243437e0..2aaec9f164 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
@@ -141,7 +141,11 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
execution.setVariable("relatedSPs", getRelatedInstancesByRole(execution, ROLE_SLICE_PROFILE,KEY_SLICE_PROFILE, anSliceProfileId))
Map<String,ServiceInstance> relatedNssis = new HashMap<>()
- execution.setVariable("relatedNssis", getRelatedInstancesByRole(execution, ROLE_NSSI,KEY_NSSI, anNssiId))
+ relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI,KEY_NSSI, anNssiId)
+ if(relatedNssis.size() == 1) {
+ execution.setVariable("IsRANNfAlonePresent", true)
+ }
+ execution.setVariable("relatedNssis", relatedNssis)
logger.trace("${Prefix} - Exit Get Related instances")
}
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 9e59f733b5..9800428c68 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
@@ -654,7 +654,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
logger.debug("completed AN service instance build " + ANServiceInstance.toString())
//create RAN NF NSSI
ANNFServiceInstance.setServiceInstanceId(execution.getVariable("RANNFServiceInstanceId") as String)
- sliceInstanceName = "nssi_"+execution.getVariable("ANNF_modelName")
+ String ANNF_nssiInstanceId = UUID.randomUUID().toString()
+ sliceInstanceName = "nssi_an_nf_" + ANNF_nssiInstanceId
ANNFServiceInstance.setServiceInstanceName(sliceInstanceName)
ANNFServiceInstance.setServiceType(execution.getVariable("sst") as String)
ANNFServiceInstance.setOrchestrationStatus(serviceStatus)
@@ -663,7 +664,7 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANNFServiceInstance.setServiceRole(serviceRole)
snssaiList = jsonUtil.StringArrayToList(execution.getVariable("snssaiList") as String)
snssai = snssaiList.get(0)
- ANNFServiceInstance.setEnvironmentContext(snssai)
+ ANNFServiceInstance.setEnvironmentContext(execution.getVariable("networkType") as String)
ANNFServiceInstance.setModelInvariantId(execution.getVariable("ANNF_modelInvariantUuid"))
ANNFServiceInstance.setModelVersionId(execution.getVariable("ANNF_modelUuid"))
ANNFServiceInstance.setWorkloadContext("AN_NF")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
index 35b4199909..5476cb5afa 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
@@ -117,7 +117,7 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{
String modelUuid = modelInfo.getModelUuid()
ss.setModelInvariantId(modelInvariantUuid)
ss.setModelVersionId(modelUuid)
- String serviceInstanceLocationid = serviceProfile.get("pLMNIdList")
+ String serviceInstanceLocationid = serviceProfile.get("plmnIdList")
ss.setServiceInstanceLocationId(serviceInstanceLocationid)
String snssai = serviceProfile.get("sNSSAI")
ss.setEnvironmentContext(snssai)
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 fc86f35236..7571f07081 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
@@ -272,24 +272,22 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
* @return
*/
private SubnetType convertServiceCategory(String serviceCategory){
- if("CN NSST".equals(serviceCategory)){
+ if(serviceCategory ==~ /CN.*/){
return SubnetType.CN
}
- if ("AN NF NSST".equals(serviceCategory)){
- return SubnetType.AN_NF
- }
- if ("AN NSST".equals(serviceCategory)){
+ if (serviceCategory ==~ /AN.*/){
return SubnetType.AN
}
- if ("TN BH NSST".equals(serviceCategory)){
+ if (serviceCategory ==~ /TN.*BH.*/){
return SubnetType.TN_BH
}
- if("TN MH NSST".equals(serviceCategory)){
+ if(serviceCategory ==~ /TN.*MH.*/){
return SubnetType.TN_MH
}
- if("TN FH NSST".equals(serviceCategory)){
+ if(serviceCategory ==~ /TN.*FH.*/){
return SubnetType.TN_FH
}
+
return null
}
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 4cc6e6d478..6fd8080ef0 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
@@ -126,7 +126,11 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor {
execution.setVariable("anNfSliceProfileId", getInstanceIdByWorkloadContext(execution.getVariable("relatedSPs"), AN_NF))
Map<String,ServiceInstance> relatedNssis = new HashMap<>()
- execution.setVariable("relatedNssis", getRelatedInstancesByRole(execution, ROLE_NSSI, anNssiId))
+ relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI, anNssiId)
+ if(relatedNssis.size() == 1) {
+ execution.setVariable("IsRANNfAlonePresent", true)
+ }
+ execution.setVariable("relatedNssis", relatedNssis)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
index e0c2b776fe..d6e94efea1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
@@ -377,7 +377,6 @@ class TnNssmfUtils {
logger.debug("mso.workflow.TnNssmf.enableSDNCNetworkConfig is undefined, so use default value (true)")
enableSdnc = "true"
}
- enableSdnc = "false"
logger.debug("setEnableSdncConfig: enableSdnc=" + enableSdnc)
execution.setVariable("enableSdnc", enableSdnc)