summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java
diff options
context:
space:
mode:
authorKuleshov, Elena <evn@att.com>2020-03-31 12:45:03 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-03-31 12:45:04 -0400
commit46aa5031d876e715335d3c55c479aca3901f9429 (patch)
tree110416d17457f97e98f86ebad97f111f583ff275 /bpmn/so-bpmn-tasks/src/main/java
parentbbbc6d3ff6d0126bec9cb86b0d12b401f734c839 (diff)
simplify fabric into add/delete steps
Implement AddFabricConfigurationBB and supporting functionality. Add verifications for Add/Delete FabricConfigurationBBs. Implement DeleteFabricConfigurationBB and related functionality Issue-ID: SO-2774 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I58ad9b6155750c73b0c83fed9ca7b35a7e12b617
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java12
2 files changed, 8 insertions, 8 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
index 56cd9fd70f..8d9e020f67 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
@@ -41,6 +41,7 @@ public class WorkflowActionBBFailure {
private static final String DEACTIVATE_FABRIC_CONFIGURATION_FLOW = "DeactivateFabricConfigurationBB";
private static final String UNASSIGN_FABRIC_CONFIGURATION_FLOW = "UnassignFabricConfigurationBB";
+ private static final String DELETE_FABRIC_CONFIGURATION_FLOW = "DeleteFabricConfigurationBB";
private static final Logger logger = LoggerFactory.getLogger(WorkflowActionBBFailure.class);
public static final String ROLLBACK_TARGET_STATE = "rollbackTargetState";
@Autowired
@@ -101,7 +102,8 @@ public class WorkflowActionBBFailure {
if (ebb != null && ebb.getBuildingBlock() != null && ebb.getBuildingBlock().getBpmnFlowName() != null) {
String flowName = ebb.getBuildingBlock().getBpmnFlowName();
if (DEACTIVATE_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)
- || UNASSIGN_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)) {
+ || UNASSIGN_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)
+ || DELETE_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)) {
String statusMessage = String.format(
"%s Warning: The vf-module is active but configuration was not removed completely for one or more VMs.",
request.getStatusMessage());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index ba5d283c01..5edb2b9dd8 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -70,8 +70,7 @@ public class WorkflowActionBBTasks {
private static final String G_ACTION = "requestAction";
private static final String RETRY_COUNT = "retryCount";
private static final String FABRIC_CONFIGURATION = "FabricConfiguration";
- private static final String ASSIGN_FABRIC_CONFIGURATION_BB = "AssignFabricConfigurationBB";
- private static final String ACTIVATE_FABRIC_CONFIGURATION_BB = "ActivateFabricConfigurationBB";
+ private static final String ADD_FABRIC_CONFIGURATION_BB = "AddFabricConfigurationBB";
private static final String COMPLETED = "completed";
private static final String HANDLINGCODE = "handlingCode";
private static final String ROLLBACKTOCREATED = "RollbackToCreated";
@@ -304,6 +303,8 @@ public class WorkflowActionBBTasks {
flowName = flowName.replaceFirst("Create", "Delete");
} else if (flowName.startsWith("Activate")) {
flowName = flowName.replaceFirst("Activate", "Deactivate");
+ } else if (flowName.startsWith("Add")) {
+ flowName = flowName.replaceFirst("Add", "Delete");
} else {
continue;
}
@@ -415,12 +416,9 @@ public class WorkflowActionBBTasks {
configurationResourceKeys.setVfModuleCustomizationUUID(vfModuleCustomizationUUID);
configurationResourceKeys.setVnfResourceCustomizationUUID(vnfCustomizationUUID);
configurationResourceKeys.setVnfcName(vnfc.getVnfcName());
- ExecuteBuildingBlock assignConfigBB = getExecuteBBForConfig(ASSIGN_FABRIC_CONFIGURATION_BB, ebb,
+ ExecuteBuildingBlock addConfigBB = getExecuteBBForConfig(ADD_FABRIC_CONFIGURATION_BB, ebb,
configurationId, configurationResourceKeys);
- ExecuteBuildingBlock activateConfigBB = getExecuteBBForConfig(ACTIVATE_FABRIC_CONFIGURATION_BB, ebb,
- configurationId, configurationResourceKeys);
- flowsToExecute.add(assignConfigBB);
- flowsToExecute.add(activateConfigBB);
+ flowsToExecute.add(addConfigBB);
flowsToExecute.stream()
.forEach(executeBB -> logger.info("Flows to Execute After Post Processing: {}",
executeBB.getBuildingBlock().getBpmnFlowName()));