aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy/org
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2017-11-02 17:57:43 +0800
committerc00149107 <chenchuanyu@huawei.com>2017-11-02 17:57:43 +0800
commitc0a3146e78fff3f9c44fc2060098a404ef581f61 (patch)
tree19cddb380f472e9a64e0fd8b0d88b60df4bd53fc /bpmn/MSOInfrastructureBPMN/src/main/groovy/org
parent2672c6dedb25d4c3173ea45cd8640f91ce9b1ff7 (diff)
Fix Bad request to Sdnc
Fix Bad request to Sdnc Change-Id: I88c109fc64808870e8ac5514cf0d199ae38ba3e8 Issue-ID:SO-299 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy5
2 files changed, 8 insertions, 1 deletions
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
</relationship-data>
</relationship>"""
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)
}