From da23b3c92d1f6e48ce16c0d14ae234b9badf310b Mon Sep 17 00:00:00 2001 From: "Parthasarathy, Ramesh" Date: Mon, 27 Jul 2020 21:34:25 -0400 Subject: Address vf module missing configuration property Address vf module missing configuration property added unit tests to handle missing vnfc configuration Issue-ID: SO-3102 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Id5f471177afe78569d435ad28f3c4c6a09bfdcca --- .../onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bpmn/so-bpmn-tasks/src/main/java/org') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index 75d3ddf2e6..84f5c680c0 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -568,6 +568,10 @@ public class WorkflowAction { WorkflowResourceIds workflowIdsCopy = SerializationUtils.clone(dataObj.getWorkflowResourceIds()); org.onap.aai.domain.yang.Configuration configuration = getRelatedResourcesInVnfc(vnfc, org.onap.aai.domain.yang.Configuration.class, AAIObjectType.CONFIGURATION); + if (configuration == null) { + logger.warn(String.format("No configuration found for VNFC %s in AAI", vnfc.getVnfcName())); + continue; + } workflowIdsCopy.setConfigurationId(configuration.getConfigurationId()); for (OrchestrationFlow orchFlow : result) { dataObj.getResourceKey().setVfModuleCustomizationId(vfModuleCustomizationUUID); @@ -584,7 +588,6 @@ public class WorkflowAction { dataObj.getRequestAction(), dataObj.isaLaCarte(), dataObj.getVnfType(), workflowIdsCopy, dataObj.getRequestDetails(), false, null, vnfcName, true, null); flowsToExecuteConfigs.add(ebb); - } } return flowsToExecuteConfigs; -- cgit 1.2.3-korg