diff options
author | Mcblain, Thomas <tom.mcblain@att.com> | 2019-07-17 18:42:01 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-07-17 18:42:07 -0400 |
commit | 6e6fff1598e03d24e3b528049534d3dfb2280e99 (patch) | |
tree | 4c32a48da6e81dc18730ed69ba861257b5496efa /bpmn/so-bpmn-tasks/src/main | |
parent | 785c77ae295b287678d4842269222c31b3e4c330 (diff) |
Add requestContext to unassignVfModule tasks and
Add requestContext to unassignVfModule tasks and tests
Issue-ID: SO-2115
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Change-Id: Ifddfe32fab9406afb69ad9192351500cfbed3610
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
2 files changed, 5 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java index 7d5591af0f..4721bf56f1 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java @@ -91,16 +91,18 @@ public class SDNCUnassignTasks { public void unassignVfModule(BuildingBlockExecution execution) { try { + GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); + RequestContext requestContext = gBBInput.getRequestContext(); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); SDNCRequest sdncRequest = new SDNCRequest(); UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint")) .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue()); URI uri = builder.build(); GenericResourceApiVfModuleOperationInformation req = - sdncVfModuleResources.unassignVfModule(vfModule, vnf, serviceInstance, uri); + sdncVfModuleResources.unassignVfModule(vfModule, vnf, serviceInstance, requestContext, uri); sdncRequest.setSDNCPayload(req); sdncRequest.setTopology(SDNCTopology.VFMODULE); execution.setVariable(SDNC_REQUEST, sdncRequest); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java index b83a4d5628..b3ea18df58 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java @@ -60,9 +60,9 @@ public class SDNCVfModuleResources { } public GenericResourceApiVfModuleOperationInformation unassignVfModule(VfModule vfModule, GenericVnf vnf, - ServiceInstance serviceInstance, URI callbackURI) throws MapperException { + ServiceInstance serviceInstance, RequestContext requestContext, URI callbackURI) throws MapperException { return sdncRM.reqMapper(SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, - vnf, serviceInstance, null, null, null, null, callbackURI); + vnf, serviceInstance, null, null, requestContext, null, callbackURI); } public GenericResourceApiVfModuleOperationInformation deactivateVfModule(VfModule vfModule, GenericVnf vnf, |