From c0a3146e78fff3f9c44fc2060098a404ef581f61 Mon Sep 17 00:00:00 2001 From: c00149107 Date: Thu, 2 Nov 2017 17:57:43 +0800 Subject: Fix Bad request to Sdnc Fix Bad request to Sdnc Change-Id: I88c109fc64808870e8ac5514cf0d199ae38ba3e8 Issue-ID:SO-299 Signed-off-by: c00149107 --- .../bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy | 4 ++++ .../infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso') 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 4d661c489a..11e31ef765 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 @@ -127,6 +127,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String uuiRequest = execution.getVariable("uuiRequest") String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId") String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId") + String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName") + execution.setVariable("serviceModelName", serviceModelName) //aai serviceType and Role can be setted as fixed value now. String aaiServiceType = "voLTE type" String aaiServiceRole = "voLTE role" @@ -416,8 +418,10 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String resourceName = jsonUtil.getJsonValue(resource, "resourceName") if(StringUtils.containsIgnoreCase(resourceName, resourceType)){ String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId") + String resourceInvariantUUID = jsonUtil.getJsonValue(resource, "resourceDefId") String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters") execution.setVariable("resourceUUID", resourceUUID) + execution.setVariable("resourceInvariantUUID", resourceInvariantUUID) execution.setVariable("resourceParameters", resourceParameters) utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled) utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled) 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 827cbf5783..41d7edbebc 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 @@ -234,8 +234,11 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces """ String endpoint = execution.getVariable("URN_aai_endpoint") + utils.log("INFO","Add Relationship req:\n" + addRelationPayload, isDebugEnabled) String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship" - executeAAIPutCall(execution, url, addRelationPayload) + APIResponse aaiRsp = executeAAIPutCall(execution, url, addRelationPayload) + utils.log("INFO","aai response status code:" + aaiRsp.getStatusCode(), isDebugEnabled) + utils.log("INFO","aai response content:" + aaiRsp.getResponseBodyAsString(), isDebugEnabled) utils.log("INFO"," *****Exit addNSRelationship *****", isDebugEnabled) } -- cgit 1.2.3-korg