From ea65e0397e030bbd0a685f473b1c8416dd0a82f3 Mon Sep 17 00:00:00 2001 From: Aleem Raja Date: Wed, 10 Aug 2022 21:20:12 +0530 Subject: Multiple PNFs with same ModelInfo but different instance name not able to be instantiated When instantiating a service with multiple PNFs, SO differentiates them using ModelCustomizationId. This causes issues when creating multiple instances of same model resource, and each lookup would return the same object. With this patch, Instead of using ModelCustomizationId, we enable SO to use instanceName parameter to differentiate the PNFs. Issue-ID: SO-3948 Signed-off-by: Aleem Raja Change-Id: I9dd039ac786a60f7cf4d4a9c456c7681f64d6786 --- .../org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bpmn/MSOCommonBPMN/src/test') diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index 7f066af080..803d2bf8a3 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -2123,6 +2123,7 @@ public class BBInputSetupTest { String vfModuleInstanceName = "vfModuleInstanceName"; String childServiceInstanceId = "childServiceInstanceId"; String childServiceInstanceName = "childServiceInstanceName"; + String pnfInstanceName = "pnfInstanceName"; expected.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstanceId); expected.put(ResourceKey.NETWORK_ID, networkId); @@ -2136,6 +2137,7 @@ public class BBInputSetupTest { expected.put(ResourceKey.VF_MODULE_INSTANCE_NAME, vfModuleInstanceName); expected.put(ResourceKey.CHILD_SERVICE_INSTANCE_ID, childServiceInstanceId); expected.put(ResourceKey.CHILD_SERVICE_INSTANCE_NAME, childServiceInstanceName); + expected.put(ResourceKey.PNF_INSTANCE_NAME, pnfInstanceName); WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds(); workflowResourceIds.setServiceInstanceId(serviceInstanceId); @@ -2150,6 +2152,7 @@ public class BBInputSetupTest { workflowResourceIds.setVfModuleInstanceName(vfModuleInstanceName); workflowResourceIds.setChildServiceInstanceId(childServiceInstanceId); workflowResourceIds.setChildServiceInstanceName(childServiceInstanceName); + workflowResourceIds.setPnfInstanceName(pnfInstanceName); SPY_bbInputSetup.populateLookupKeyMapWithIds(workflowResourceIds, actual); -- cgit 1.2.3-korg