aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src
diff options
context:
space:
mode:
authorsanket12345 <SX00562924@techmahindra.com>2022-02-23 20:36:28 +0530
committerLukasz Rajewski <lukasz.rajewski@orange.com>2022-03-01 17:14:46 +0100
commit24a3f5ce8387ea861f7b8d8997d72032c18d7fb0 (patch)
treec9326f8cdd46e5178be4974f7f388cc12c7ce797 /bpmn/so-bpmn-tasks/src
parent8b0276d4f5b0d7a1a9167916b027b795f86d44e5 (diff)
CNF - Upgrade Functionality - BPMN Infra
-Adding new blocking UpgradeVfModuleBB -Integrating new block in bpmn-infra wih new macro-action in catalogDB. -Changes added in Workflow to call UpgradeVfModuleBB. Issue-ID: SO-3857 Change-Id: I98f81f325a311d723f62f0a802bcd8641b9a6cbc Signed-off-by: sanket12345 <SX00562924@techmahindra.com> Signed-off-by: Lukasz.Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java5
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java4
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java1
3 files changed, 10 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
index 920369784e..377d0bbf06 100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
@@ -55,6 +55,7 @@ public class ExecuteBuildingBlockBuilder {
private static final String VFMODULE = "VfModule";
private static final String NETWORK = "Network";
private static final String HEALTH_CHECK = "HealthCheckBB";
+ private static final String UPGRADE_CNF = "UpgradeVfModuleBB";
protected List<ExecuteBuildingBlock> buildExecuteBuildingBlockList(List<OrchestrationFlow> orchFlows,
List<Resource> originalResourceList, String requestId, String apiVersion, String resourceId,
@@ -124,6 +125,10 @@ public class ExecuteBuildingBlockBuilder {
&& (VNF).equalsIgnoreCase(orchFlow.getBpmnScope())) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
+ } else if ((orchFlow.getFlowName().equalsIgnoreCase(UPGRADE_CNF))
+ && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope())) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
+ resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
} else if (orchFlow.getFlowName().contains(PNF)
|| (orchFlow.getFlowName().contains(CONTROLLER) && (PNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.PNF, orchFlow, requestId, apiVersion,
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 10cea171ce..ef32ac5cbb 100755
--- 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
@@ -40,6 +40,7 @@ import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConst
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.UPDATE_INSTANCE;
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.HEALTH_CHECK;
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.WORKFLOW_ACTION_ERROR_MESSAGE;
+import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.UPGRADE_CNF;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -303,6 +304,9 @@ public class WorkflowAction {
} else if (resourceType == WorkflowType.VNF && HEALTH_CHECK.equalsIgnoreCase(requestAction)) {
vnfEBBLoader.customTraverseAAIVnf(execution, resourceList, workflowResourceIds.getServiceInstanceId(),
workflowResourceIds.getVnfId(), aaiResourceIds);
+ } else if (resourceType == WorkflowType.VNF && UPGRADE_CNF.equalsIgnoreCase(requestAction)) {
+ vnfEBBLoader.customTraverseAAIVnf(execution, resourceList, workflowResourceIds.getServiceInstanceId(),
+ workflowResourceIds.getVnfId(), aaiResourceIds);
} else {
buildAndThrowException(execution, "Current Macro Request is not supported");
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
index a41613982d..093bab66bf 100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
@@ -52,5 +52,6 @@ public final class WorkflowActionConstants {
public static final String VOLUMEGROUP = "VolumeGroup";
public static final String HEALTH_CHECK = "healthCheck";
public static final String WORKFLOW_ACTION_ERROR_MESSAGE = "WorkflowActionErrorMessage";
+ public static final String UPGRADE_CNF = "upgradeCnf";
}