From 623dbe5cf31cec13c3c6eec7b74791682eb3b731 Mon Sep 17 00:00:00 2001 From: hyu2010 Date: Tue, 20 Oct 2020 20:49:00 -0400 Subject: Fixes for bugs found in Transport Slicing integration This update contains for the fix for the following JIRA: SO-3321: Transport Slicing integration: SO sets wrong subscription-service-type in SDNC payload Issue-ID: SO-3321 Signed-off-by: hyu2010 Change-Id: I81bf95d2604e92335f8295fdc8d8beb596fb305e --- .../so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy | 10 ++++------ .../so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy | 4 ++-- .../onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy index e5c9514fa5..05996d3671 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy @@ -25,11 +25,9 @@ import groovy.json.JsonSlurper import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution import org.onap.aai.domain.yang.ServiceInstance -import org.onap.aaiclient.client.aai.AAIObjectType import org.onap.aaiclient.client.aai.AAIResourcesClient import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory -import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil @@ -39,7 +37,6 @@ import org.onap.so.db.request.beans.ResourceOperationStatus import org.slf4j.Logger import org.slf4j.LoggerFactory - public class DoActivateTnNssi extends AbstractServiceTaskProcessor { String Prefix = "TNACT_" @@ -114,13 +111,14 @@ public class DoActivateTnNssi extends AbstractServiceTaskProcessor { void validateSDNCResponse(DelegateExecution execution, String response) { - tnNssmfUtils.validateSDNCResponse(execution, response, method) + String actionType = execution.getVariable("actionType") + tnNssmfUtils.validateSDNCResponse(execution, response, actionType) } void updateAAIOrchStatus(DelegateExecution execution) { logger.debug("Start updateAAIOrchStatus") - String tnNssiId = execution.getVariable("tnNssiId") + String tnNssiId = execution.getVariable("sliceServiceInstanceId") String orchStatus = execution.getVariable("orchestrationStatus") try { @@ -144,7 +142,7 @@ public class DoActivateTnNssi extends AbstractServiceTaskProcessor { String status, String progress, String statusDescription) { - String serviceId = execution.getVariable("serviceInstanceID") + String serviceId = execution.getVariable("sliceServiceInstanceId") String jobId = execution.getVariable("jobId") String nsiId = execution.getVariable("nsiId") String operType = execution.getVariable("actionType") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy index fbb2b00854..c817eaad61 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy @@ -126,7 +126,7 @@ class DoDeallocateTnNssi extends AbstractServiceTaskProcessor { public void updateAAIOrchStatus(DelegateExecution execution) { logger.debug("Start updateAAIOrchStatus") - String tnNssiId = execution.getVariable("serviceInstanceID") + String tnNssiId = execution.getVariable("sliceServiceInstanceId") String orchStatus = execution.getVariable("orchestrationStatus") try { @@ -150,7 +150,7 @@ class DoDeallocateTnNssi extends AbstractServiceTaskProcessor { String status, String progress, String statusDescription) { - String serviceId = execution.getVariable("serviceInstanceID") + String serviceId = execution.getVariable("sliceServiceInstanceId") String jobId = execution.getVariable("jobId") String nsiId = execution.getVariable("nsiId") 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 92953fd60b..869b55b5d2 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 @@ -98,6 +98,7 @@ class TnNssmfUtils { def callbackURL = execution.getVariable("sdncCallbackUrl") def requestId = execution.getVariable("msoRequestId") def serviceId = execution.getVariable("sliceServiceInstanceId") + def subServiceType = execution.getVariable("subscriptionServiceType") def vnfType = execution.getVariable("serviceType") def vnfName = execution.getVariable("sliceServiceInstanceName") def tenantId = execution.getVariable("sliceServiceInstanceId") @@ -143,7 +144,7 @@ class TnNssmfUtils { ${MsoUtils.xmlEscape(serviceId)} - ${MsoUtils.xmlEscape(serviceId)} + ${MsoUtils.xmlEscape(subServiceType)} ${serviceEcompModelInformation} ${MsoUtils.xmlEscape(svcInstId)} ${MsoUtils.xmlEscape(globalSubscriberId)} -- cgit 1.2.3-korg