aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authormharazin <mateusz.harazin@nokia.com>2020-10-13 16:21:59 +0200
committermharazin <mateusz.harazin@nokia.com>2020-10-14 13:53:09 +0200
commitc759aa4e6aaec556711522e6204a1b0af859d4c5 (patch)
tree90410c1047a9797c743a741138e1421b14b9307f /bpmn/so-bpmn-tasks/src/main
parent2c0e36593e9369ff8ad74a21c415cf502805f0d0 (diff)
Fix skipPostInstConf for PNF
Issue-ID: SO-3271 Signed-off-by: Mateusz Harazin <mateusz.harazin@nokia.com> Change-Id: I550a6582da1c7dd9d000ee9c7cfe421a293b9e59
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
index 682a0471ee..2119ced951 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
@@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.BBConstants;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
+import org.onap.so.db.catalog.beans.PnfResourceCustomization;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -48,6 +49,9 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator {
private Set<String> vFModuleAction =
new HashSet<String>(Arrays.asList("VfModuleConfigAssign", "VfModuleConfigDeploy"));
+ private Set<String> pnfActions =
+ new HashSet<>(Arrays.asList("config-assign", "config-deploy", "PnfConfigAssign", "PnfConfigDeploy"));
+
@Override
public boolean shouldRunFor(String currentBBName, boolean isFirst, BuildingBlockExecution execution) {
@@ -95,9 +99,17 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator {
boolean skipVfModule = vfc.isSkipPostInstConf();
currentSequenceSkipCheck(execution, skipVfModule);
}
- }
+ } else if (currentBB.getBuildingBlock().getBpmnScope().equalsIgnoreCase("PNF")
+ && containsIgnoreCaseAction(currentBB, pnfActions)) {
+ PnfResourceCustomization pnfResourceCustomization =
+ catalogDbClient.getPnfResourceCustomizationByModelCustomizationUUID(customizationUUID);
+ if (null != pnfResourceCustomization) {
+ boolean skipConfigPNF = pnfResourceCustomization.isSkipPostInstConf();
+ currentSequenceSkipCheck(execution, skipConfigPNF);
+ }
+ }
}
private boolean containsIgnoreCaseAction(ExecuteBuildingBlock currentBB, Set<String> actions) {