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 --- .../infrastructure/scripts/DoDeleteResourcesV1.groovy | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org') 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) + } } -- cgit 1.2.3-korg