From d54cb8ce3f19d37a8aa30d73cbc40629e88efef3 Mon Sep 17 00:00:00 2001 From: Yulian Han Date: Fri, 27 Apr 2018 18:05:39 +0800 Subject: createvfcns serviceInstanceid is null bug fix deleteResource bugs fix Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f06430a Issue-ID: SO-578 Signed-off-by: Yulian Han --- .../infrastructure/scripts/CreateVFCNSResource.groovy | 2 +- .../scripts/DeleteSDNCNetworkResource.groovy | 16 ++++++++-------- .../infrastructure/scripts/DoDeleteResourcesV1.groovy | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy index 5390ee92db..1ec1df1f0e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy @@ -238,7 +238,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { } String globalSubscriberId = execution.getVariable("globalSubscriberId") String serviceType = execution.getVariable("serviceType") - String serviceId = execution.getVariable("serviceId") + String serviceId = execution.getVariable("serviceInstanceId") String addRelationPayload = """ service-instance /aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId} 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 3943e30211..9a12a699f9 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 @@ -83,7 +83,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { String resourceModelName = resourceInputObj.getResourceModelInfo().getModelName() //For sdnc requestAction default is "NetworkInstance" String operationType = "Network" - if(!StringUtils.isBlank(recipeParamsFromRequest)){ + if(!StringUtils.isBlank(recipeParamsFromRequest) && "null" != recipeParamsFromRequest){ //the operationType from worflow(first node) is second priority. operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType") } @@ -227,13 +227,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") String operType = resourceInputObj.getOperationType() String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() - String ServiceInstanceId = resourceInputObj.getServiceInstanceId() + String serviceInstanceId = resourceInputObj.getServiceInstanceId() String operationId = resourceInputObj.getOperationId() String progress = "20" String status = "processing" String statusDescription = "SDCN resource delete invoked" - execution.getVariable("operationId") + //String operationId = execution.getVariable("operationId") String body = """ ${operationId} ${progress} ${resourceCustomizationUuid} - ${ServiceInstanceId} + ${serviceInstanceId} ${status} ${statusDescription} @@ -256,17 +256,17 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { } - public void prepareUpdateAfterDeleteSDNCResource(execution) { + public void prepareUpdateAfterDeleteSDNCResource(DelegateExecution execution) { ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") String operType = resourceInputObj.getOperationType() String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() - String ServiceInstanceId = resourceInputObj.getServiceInstanceId() + String serviceInstanceId = resourceInputObj.getServiceInstanceId() String operationId = resourceInputObj.getOperationId() String progress = "100" String status = "finished" String statusDescription = "SDCN resource delete completed" - execution.getVariable("operationId") + //String operationId = execution.getVariable("operationId") String body = """ ${operationId} ${progress} ${resourceCustomizationUuid} - ${ServiceInstanceId} + ${serviceInstanceId} ${status} ${statusDescription} 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 92e7fdded5..80dec232f9 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 @@ -273,7 +273,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled) } - public void prepareFinishedProgressForResource(execution) { + public void prepareFinishedProgressForResource(DelegateExecution execution) { String serviceInstanceId = execution.getVariable("serviceInstanceId") String serviceType = execution.getVariable("serviceType") @@ -297,7 +297,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor { ${operationId} ${progress} ${resourceCustomizationUuid} - ${ServiceInstanceId} + ${serviceInstanceId} ${status} ${statusDescription} -- cgit 1.2.3-korg