From: subhash kumar singh Date: Mon, 9 Apr 2018 14:49:31 +0000 (+0000) Subject: Fix request inputs for vfc-adapter X-Git-Tag: v1.2.1~186^2~3 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F41745%2F2;p=so.git 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 --- 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()