From e53e4bc3703c704f905d96a2526f209bce759e2d Mon Sep 17 00:00:00 2001 From: c00149107 Date: Thu, 26 Apr 2018 11:53:15 +0800 Subject: Remove operation status set in api-handler Remove operation status set in api-handler Change-Id: I579d25044130b0701231c0a2d42534e8c63e3ebd Issue-ID: SO-587 Signed-off-by: c00149107 --- .../infrastructure/scripts/DeleteSDNCNetworkResource.groovy | 6 +++--- .../bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy index 447fa63baf..3943e30211 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy @@ -80,7 +80,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { //Deal with recipeParams String recipeParamsFromWf = execution.getVariable("recipeParamXsd") - String resourceName = resourceInputObj.getResourceInstanceName() + String resourceModelName = resourceInputObj.getResourceModelInfo().getModelName() //For sdnc requestAction default is "NetworkInstance" String operationType = "Network" if(!StringUtils.isBlank(recipeParamsFromRequest)){ @@ -95,12 +95,12 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { //For sdnc, generate svc_action and request_action String sdnc_svcAction = "delete" - if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){ + if(StringUtils.containsIgnoreCase(resourceModelName, "overlay")){ //This will be resolved in R3. sdnc_svcAction ="deactivate" operationType = "NCINetwork" } - if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){ + if(StringUtils.containsIgnoreCase(resourceModelName, "underlay")){ //This will be resolved in R3. operationType ="Network" } 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 8508f07765..92e7fdded5 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 @@ -313,12 +313,11 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { 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()) + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + execution.setVariable("modelInvariantUuid", serviceDecomposition.getModelInfo().getModelInvariantUuid()) + execution.setVariable("modelVersion", serviceDecomposition.getModelInfo().getModelVersion()) + execution.setVariable("modelUuid", serviceDecomposition.getModelInfo().getModelUuid()) + execution.setVariable("serviceModelName", serviceDecomposition.getModelInfo().getModelName()) // set operation type and resource type is required to form request body execution.setVariable("operationType", "DELETE") -- cgit 1.2.3-korg