From 33758ea549f72864806420803fbca64041448943 Mon Sep 17 00:00:00 2001 From: c00149107 Date: Tue, 31 Oct 2017 17:25:40 +0800 Subject: Fix Result Code Check Error Fix Result Code Check Error Change-Id: I21f6a2c73e4846944e82c315aab380378b6c6be9 Issue-ID:SO-291 Signed-off-by: c00149107 --- .../bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy | 4 ++-- .../infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index ca67d5dcdd..4d661c489a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -358,7 +358,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources") List resourceList = jsonUtil.StringArrayToList(execution, resourcesStr) for(String resource : resourceList){ - resourceTemplateUUIDs = resourceTemplateUUIDs + jsonUtil.getJsonValue(resource, "resourceDefId") + ":" + resourceTemplateUUIDs = resourceTemplateUUIDs + jsonUtil.getJsonValue(resource, "resourceId") + ":" } def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter" @@ -415,7 +415,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { for(String resource : resourceList){ String resourceName = jsonUtil.getJsonValue(resource, "resourceName") if(StringUtils.containsIgnoreCase(resourceName, resourceType)){ - String resourceUUID = jsonUtil.getJsonValue(resource, "resourceDefId") + String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId") String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters") execution.setVariable("resourceUUID", resourceUUID) execution.setVariable("resourceParameters", resourceParameters) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy index 2e62abd6f5..827cbf5783 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy @@ -134,7 +134,7 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces String returnCode = apiResponse.getStatusCode() String aaiResponseAsString = apiResponse.getResponseBodyAsString() String nsInstanceId = ""; - if(returnCode== "200"){ + if(returnCode== "200" || returnCode == "201"){ nsInstanceId = jsonUtil.getJsonValue(aaiResponseAsString, "nsInstanceId") } execution.setVariable("nsInstanceId", nsInstanceId) @@ -163,7 +163,7 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces String returnCode = apiResponse.getStatusCode() String aaiResponseAsString = apiResponse.getResponseBodyAsString() String jobId = ""; - if(returnCode== "200"){ + if(returnCode== "200"|| returnCode == "201"){ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId") } execution.setVariable("jobId", jobId) @@ -183,7 +183,7 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces String returnCode = apiResponse.getStatusCode() String aaiResponseAsString = apiResponse.getResponseBodyAsString() String operationStatus = "error" - if(returnCode== "200"){ + if(returnCode== "200"|| returnCode == "201"){ operationStatus = jsonUtil.getJsonValue(aaiResponseAsString, "responseDescriptor.status") } execution.setVariable("operationStatus", operationStatus) -- cgit 1.2.3-korg