From 95fd7ba6c80038182957430073a98e713a1b5b3d Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Wed, 25 Apr 2018 09:19:43 +0000 Subject: Fix service topology deletion Fix request body for service topology deletion. Issue-ID: SO-422 Change-Id: Ic2e7cc74dd45dbc4b4a190a159f3ebb852e02b84 Signed-off-by: subhash kumar singh --- .../scripts/DoDeleteResourcesV1.groovy | 19 ++++++++++++ .../resources/subprocess/DoDeleteResourcesV1.bpmn | 34 +++++++++++++++++----- 2 files changed, 45 insertions(+), 8 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy index 3591243c3f..b2a7bb6fdf 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy @@ -272,6 +272,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { } public void prepareFinishedProgressForResource(execution) { + String serviceInstanceId = execution.getVariable("serviceInstanceId") String serviceType = execution.getVariable("serviceType") String resourceInstanceId = execution.getVariable("resourceInstanceId") @@ -305,4 +306,22 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) execution.setVariable("CVFMI_updateResOperStatusRequest", body) } + + public void prepareServiceTopologyDeletion(DelegateExecution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** prepareServiceTopologyDeletion " + " *****", isDebugEnabled) + + ModelInfo serviceModelInfo = execution.getVariable("serviceModelInfo") + + execution.setVariable("modelInvariantUuid", serviceModelInfo.getModelInvariantUuid()) + execution.setVariable("modelVersion", serviceModelInfo.getModelVersion()) + execution.setVariable("modelUuid", serviceModelInfo.getModelUuid()) + execution.setVariable("serviceModelName", serviceModelInfo.getModelName()) + + // set operation type and resource type is required to form request body + execution.setVariable("operationType", "DELETE") + execution.setVariable("resourceType", "SDNC-SERVICE-TOPOLOGY") + + utils.log("INFO"," ***** prepareServiceTopologyDeletion " + " *****", isDebugEnabled) + } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn index 8da0ae01cd..b74c169d26 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_0stqur4 @@ -58,7 +58,7 @@ ex.processJavaException(execution)]]> - SequenceFlow_1s1nnmj + SequenceFlow_11h5pba SequenceFlow_174yrgl @@ -70,7 +70,7 @@ ex.processJavaException(execution)]]> SequenceFlow_0o21fg8 - + @@ -148,6 +148,14 @@ dcsi.prepareFinishedProgressForResource(execution)]]> + + + SequenceFlow_1s1nnmj + SequenceFlow_11h5pba + + @@ -242,7 +250,7 @@ dcsi.prepareFinishedProgressForResource(execution)]]> - + @@ -265,16 +273,16 @@ dcsi.prepareFinishedProgressForResource(execution)]]> - + - + - + - + @@ -381,6 +389,16 @@ dcsi.prepareFinishedProgressForResource(execution)]]> + + + + + + + + + + -- cgit 1.2.3-korg