diff options
author | krishnaa96 <krishna981996@gmail.com> | 2021-11-24 16:37:55 +0530 |
---|---|---|
committer | krishnaa96 <krishna981996@gmail.com> | 2021-11-24 16:37:55 +0530 |
commit | 41d0ae77473eb39199dc21dbc8ff8e4b327bf5fe (patch) | |
tree | 7078873e977f026ca1780987dab11b4c81cd4f63 /bpmn/so-bpmn-infrastructure-common | |
parent | 634473225cfa557fde97ba507805db7621462742 (diff) |
Fix bugs in Allocate flow
Issue-ID: SO-3764
Signed-off-by: krishnaa96 <krishna981996@gmail.com>
Change-Id: I899191a47a3c50ac7fe6f0633c658fef09a3ad5c
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
5 files changed, 12 insertions, 14 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/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy index ed1c2b24d5..10acd6ef50 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 2588d07e50..90dd831308 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 @@ -271,24 +271,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/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) |