summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap
diff options
context:
space:
mode:
authordeepikasatheesh <deepika.s84@wipro.com>2021-07-30 17:06:18 +0000
committerdeepikasatheesh <deepika.s84@wipro.com>2021-07-30 17:06:18 +0000
commit10eef7b0bd5362eeda3a27275a476f0c462d30a6 (patch)
treeb55e23e5225922c459219a83d0f5c288a65bd596 /bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap
parent3d8768d468510462c85008ded35dddc272a1b060 (diff)
Fix issues in AN NSSMF for allocate &modify flow
Issue-ID: SO-3624 Signed-off-by: deepikasatheesh <deepika.s84@wipro.com> Change-Id: I3e11f1748706913621f54e8cd725ca00c71ba682
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy10
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy3
4 files changed, 11 insertions, 8 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
index 78cafa7be5..1e65c1a9dd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
@@ -114,7 +114,7 @@ class AllocateSliceSubnet extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
} else
{
- execution.setVariable("networkType", networkType.toUpperCase())
+ execution.setVariable("networkType", networkType.toLowerCase())
}
//requestParameters, subscriptionServiceType is 5G
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 f3fca050a2..a4d503a86c 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
@@ -565,7 +565,7 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
List<String> snssaiList = execution.getVariable("snssaiList")
String snssai = snssaiList.get(0)
//ANServiceInstance.setEnvironmentContext(snssai)
- ANServiceInstance.setEnvironmentContext("an") //Network Type
+ ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType")) //Network Type
ANServiceInstance.setWorkloadContext("AN") //domain Type
logger.debug("completed AN service instance build "+ ANServiceInstance.toString())
@@ -631,7 +631,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANServiceInstance.setServiceRole(serviceRole)
List<String> snssaiList = execution.getVariable("snssaiList")
String snssai = snssaiList.get(0)
- ANServiceInstance.setEnvironmentContext(snssai)
+ //ANServiceInstance.setEnvironmentContext(snssai)
+ ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType"))
String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
String modelUuid = execution.getVariable("modelUuid")
ANServiceInstance.setModelInvariantId(modelInvariantUuid)
@@ -651,7 +652,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANNFServiceInstance.setServiceRole(serviceRole)
snssaiList = execution.getVariable("snssaiList")
snssai = snssaiList.get(0)
- ANNFServiceInstance.setEnvironmentContext(snssai)
+ //ANNFServiceInstance.setEnvironmentContext(snssai)
+ ANNFServiceInstance.setEnvironmentContext(execution.getVariable("networkType"))
ANNFServiceInstance.setModelInvariantId(execution.getVariable("ANNF_modelInvariantUuid"))
ANNFServiceInstance.setModelVersionId(execution.getVariable("ANNF_modelUuid"))
ANNFServiceInstance.setWorkloadContext("AN_NF")
@@ -923,7 +925,7 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
JsonObject commonHeader = new JsonObject()
JsonObject payload = new JsonObject()
JsonObject payloadInput = new JsonObject()
- commonHeader.addProperty("timeStamp",new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault()))
+ commonHeader.addProperty("timestamp",new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault()))
commonHeader.addProperty("api-ver", "1.0")
commonHeader.addProperty("originator-id", "testing")
commonHeader.addProperty("request-id", requestId)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
index 8859af25f6..f6be861bde 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
@@ -388,12 +388,12 @@ class DoModifyAccessNSSI extends AbstractServiceTaskProcessor {
Optional<org.onap.aai.domain.yang.LogicalLink> resource = wrapper01.asBean(org.onap.aai.domain.yang.LogicalLink.class)
if (resource.isPresent()) {
org.onap.aai.domain.yang.LogicalLink logicalLinkInstance = resource.get()
- if(domainType.equalsIgnoreCase("TN-FH"))
+ if(domainType.equalsIgnoreCase("TN_FH"))
{
execution.setVariable("tranportEp_ID_RU",logicalLinkInstance.getLinkName())
execution.setVariable("tranportEp_ID_DUIN",logicalLinkInstance.getLinkName2())
}
- else if(domainType.equalsIgnoreCase("TN-MH"))
+ else if(domainType.equalsIgnoreCase("TN_MH"))
{
execution.setVariable("tranportEp_ID_DUEG",logicalLinkInstance.getLinkName())
execution.setVariable("tranportEp_ID_CUIN",logicalLinkInstance.getLinkName2())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
index 7e505d1912..146ceddab4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
@@ -142,7 +142,8 @@ class ModifySliceSubnet extends AbstractServiceTaskProcessor {
ResourceOperationStatus initStatus = new ResourceOperationStatus()
initStatus.setServiceId(nsiId)
initStatus.setOperationId(jobId)
- initStatus.setResourceTemplateUUID(modelUuid)
+ //initStatus.setResourceTemplateUUID(modelUuid)
+ initStatus.setResourceInstanceID(nssiId)
initStatus.setOperType("Modify")
requestDBUtil.prepareInitResourceOperationStatus(execution, initStatus)