From 543853a673260b30ad8f4b34617984a232a4b12c Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Mon, 9 Apr 2018 14:49:31 +0000 Subject: Fix request inputs for vfc-adapter Fix request input for vfc-adapter. Change-Id: Id9dcff0df05302ea7d3779b7617238989cbb3fda Issue-ID: SO-422 Signed-off-by: subhash kumar singh --- .../mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 b520ca543e..b29c4dc101 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 @@ -103,7 +103,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { * } * } */ - String nsParameters = execution.getVariable("resourceParameters") + String nsParameters = jsonUtil.getJsonValue(resourceInput, "resourceParameters") utils.log("INFO", "nsParameters:" + nsParameters, isDebugEnabled) String nsOperationKey = """{ "globalSubscriberId":"${globalSubscriberId}", @@ -136,11 +136,16 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { String nsParameters = execution.getVariable("nsParameters"); String nsServiceName = execution.getVariable("nsServiceName") String nsServiceDescription = execution.getVariable("nsServiceDescription") + String locationConstraints = jsonUtil.getJsonValue(nsParameters, "locationConstraints") + String requestInputs = jsonUtil.getJsonValue(nsParameters, "requestInputs") String reqBody ="""{ "nsServiceName":"${nsServiceName}", "nsServiceDescription":"${nsServiceDescription}", "nsOperationKey":${nsOperationKey}, - "nsParameters":${nsParameters} + "nsParameters":{ + "locationConstraints":${locationConstraints}, + "additionalParamForNs":${requestInputs} + } }""" APIResponse apiResponse = postRequest(execution, host + vfcUrl + "/ns", reqBody) String returnCode = apiResponse.getStatusCode() -- cgit 1.2.3-korg