diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2021-08-11 10:27:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-08-11 10:27:54 +0000 |
commit | 7a563119f95848d8b4c7129546ccb7d9a7275237 (patch) | |
tree | f2028f20d19ea12816aa90302691fde46dbfa340 /bpmn/so-bpmn-infrastructure-common/src/main | |
parent | b71c2de811d00f4e0b8e22a06d22824bb3c00851 (diff) | |
parent | 10eef7b0bd5362eeda3a27275a476f0c462d30a6 (diff) |
Merge "Fix issues in AN NSSMF for allocate &modify flow"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
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) |