From 9484ccd079c2818f040a9b15fe744f6845efb76a Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 20 Feb 2019 16:48:49 -0500 Subject: assignvfmodulebb must send use-preload Corrections to JUnit data to account for usePreload usage. Resurrect usage of usePreload value and pass fromPreload to SDNC. Change-Id: I6fb52f6abf09ec501e90335a01e37db1c10ae2b3 Issue-ID: SO-1539 Signed-off-by: Benjamin, Max (mb388a) --- .../so/client/sdnc/mapper/GeneralTopologyObjectMapper.java | 10 ++++++++-- .../sdnc/mapper/VfModuleTopologyOperationRequestMapper.java | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java index 9bbd665e4c..d7a9ff1cf7 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java @@ -115,7 +115,7 @@ public class GeneralTopologyObjectMapper { /* * Build GenericResourceApiVfModuleinformationVfModuleInformation */ - public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, boolean includeModelInformation) throws MapperException { + public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, RequestContext requestContext, boolean includeModelInformation) throws MapperException { GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = new GenericResourceApiVfmoduleinformationVfModuleInformation(); if (includeModelInformation) { if (vfModule.getModelInfoVfModule() == null) { @@ -135,7 +135,13 @@ public class GeneralTopologyObjectMapper { vfModuleInformation.setVfModuleType(vfModule.getModelInfoVfModule().getModelName()); } vfModuleInformation.setVfModuleId(vfModule.getVfModuleId()); - vfModuleInformation.setFromPreload(null); + if (requestContext != null && requestContext.getRequestParameters() != null) { + vfModuleInformation.setFromPreload(requestContext.getRequestParameters().getUsePreload()); + } + else { + vfModuleInformation.setFromPreload(null); + } + return vfModuleInformation; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java index a6ef02bd4d..b656579c69 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java @@ -95,7 +95,7 @@ public class VfModuleTopologyOperationRequestMapper { requestAction); GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, includeModelInformation); GenericResourceApiVnfinformationVnfInformation vnfInformation = generalTopologyObjectMapper.buildVnfInformation(vnf, serviceInstance, includeModelInformation); - GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = generalTopologyObjectMapper.buildVfModuleInformation(vfModule, vnf, serviceInstance, includeModelInformation); + GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = generalTopologyObjectMapper.buildVfModuleInformation(vfModule, vnf, serviceInstance, requestContext, includeModelInformation); GenericResourceApiVfmodulerequestinputVfModuleRequestInput vfModuleRequestInput = buildVfModuleRequestInput(vfModule, volumeGroup, cloudRegion, requestContext); GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = buildVfModuleSdncRequestHeader(sdncReqId, genericResourceApiSvcAction); -- cgit 1.2.3-korg