summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/PayloadConstants.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VfModuleCDSRequestProvider.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VnfCDSRequestProvider.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/GeneratePayloadForCdsTest.java4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ControllerExecutionBB.bpmn90
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecution.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java15
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java38
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java4
11 files changed, 123 insertions, 75 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/PayloadConstants.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/PayloadConstants.java
index 808d427d65..2812de799d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/PayloadConstants.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/PayloadConstants.java
@@ -6,6 +6,8 @@
* ================================================================================
* Modifications Copyright (C) 2020 Nordix
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -36,7 +38,7 @@ public final class PayloadConstants {
public static final String SEPARATOR = "-";
public static final String PNF_SCOPE = "pnf";
public static final String VNF_SCOPE = "vnf";
- public static final String VF_MODULE_SCOPE = "vfModule";
+ public static final String VF_MODULE_SCOPE = "vfmodule";
public static final String SERVICE_SCOPE = "service";
public static final String RESOLUTION_KEY = "resolution-key";
public static final String CDS_ACTOR = "cds";
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VfModuleCDSRequestProvider.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VfModuleCDSRequestProvider.java
index bba8925f21..4b35371594 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VfModuleCDSRequestProvider.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VfModuleCDSRequestProvider.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2019 Bell Canada
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -81,8 +83,8 @@ public class VfModuleCDSRequestProvider implements CDSRequestProvider {
final String modelCustomizationUuidForVnf = genericVnf.getModelInfoGenericVnf().getModelCustomizationUuid();
- blueprintName = genericVnf.getBlueprintName();
- blueprintVersion = genericVnf.getBlueprintVersion();
+ blueprintName = genericVnf.getModelInfoGenericVnf().getBlueprintName();
+ blueprintVersion = genericVnf.getModelInfoGenericVnf().getBlueprintVersion();
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
vfModuleName = vfModule.getVfModuleName();
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VnfCDSRequestProvider.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VnfCDSRequestProvider.java
index d33976d229..7425d09721 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VnfCDSRequestProvider.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/VnfCDSRequestProvider.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2019 Bell Canada
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -79,8 +81,8 @@ public class VnfCDSRequestProvider implements CDSRequestProvider {
final String modelCustomizationUuid = genericVnf.getModelInfoGenericVnf().getModelCustomizationUuid();
resolutionKey = genericVnf.getVnfName();
- blueprintName = genericVnf.getBlueprintName();
- blueprintVersion = genericVnf.getBlueprintVersion();
+ blueprintName = genericVnf.getModelInfoGenericVnf().getBlueprintName();
+ blueprintVersion = genericVnf.getModelInfoGenericVnf().getBlueprintVersion();
vnfObject.addProperty("service-instance-id", serviceInstance.getServiceInstanceId());
vnfObject.addProperty("service-model-uuid", serviceInstance.getModelInfoServiceInstance().getModelUuid());
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/GeneratePayloadForCdsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/GeneratePayloadForCdsTest.java
index 998976589c..20bd765338 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/GeneratePayloadForCdsTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/GeneratePayloadForCdsTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2019 Bell Canada.
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -52,7 +54,7 @@ public class GeneratePayloadForCdsTest {
private static final String VNF_SCOPE = "vnf";
private static final String SERVICE_SCOPE = "service";
private static final String SERVICE_ACTION = "create";
- private static final String VF_SCOPE = "vfModule";
+ private static final String VF_SCOPE = "vfmodule";
private static final String ASSIGN_ACTION = "configAssign";
private static final String DEPLOY_ACTION = "configDeploy";
private static final String DOWNLOAD_ACTION = "downloadNESw";
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ControllerExecutionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ControllerExecutionBB.bpmn
index f12a3d241f..836950e9be 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ControllerExecutionBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ControllerExecutionBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.14.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="ControllerExecutionBB" name="ControllerExecutionBB" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0gmfit3</bpmn:outgoing>
@@ -10,30 +10,20 @@
<bpmn:incoming>SequenceFlow_0no1qag</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_1mkhog2" sourceRef="Task_1hs1mn0" targetRef="EndEvent_0lgvk82" />
- <bpmn:callActivity id="CallActivity_1gfzi2g" name="Abstract CDS&#10;(CDS Call)&#10;" calledElement="AbstractCDSProcessingBB">
- <bpmn:extensionElements>
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="ControllerStatus" target="ControllerStatus" />
- <camunda:in source="executionObject" target="executionObject" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_05qembo</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0cvsnuu</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:serviceTask id="Task_1hs1mn0" name="Update AAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)),InjectExecution.execute(execution, execution.getVariable(&#34;scope&#34;)),InjectExecution.execute(execution, execution.getVariable(&#34;action&#34;)))}">
+ <bpmn:serviceTask id="Task_1hs1mn0" name="Update AAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), execution.getVariable(&#34;scope&#34;), execution.getVariable(&#34;action&#34;))}">
<bpmn:incoming>SequenceFlow_07tqu82</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1mkhog2</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_05qembo" sourceRef="Task_0bhf6tp" targetRef="CallActivity_1gfzi2g" />
- <bpmn:serviceTask id="Task_0bhf6tp" name="PreProcess Abstract CDS Processing" camunda:expression="${GenericCDSProcessing.buildPayloadBasedOnScopeAndAction(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:sequenceFlow id="SequenceFlow_05qembo" sourceRef="Task_0bhf6tp" targetRef="ExclusiveGateway_13q340y" />
+ <bpmn:serviceTask id="Task_0bhf6tp" name="Call ControllerExecutionBB" camunda:expression="${ControllerExecutionBB.execute(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_0vzx2yr</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_05qembo</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_13q340y" default="SequenceFlow_15gxql1">
- <bpmn:incoming>SequenceFlow_0cvsnuu</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_05qembo</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_07tqu82</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_15gxql1</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0cvsnuu" sourceRef="CallActivity_1gfzi2g" targetRef="ExclusiveGateway_13q340y" />
<bpmn:sequenceFlow id="SequenceFlow_07tqu82" name="success" sourceRef="ExclusiveGateway_13q340y" targetRef="Task_1hs1mn0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("ControllerStatus").equals("Success")}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
@@ -81,7 +71,7 @@
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_0op5irz" sourceRef="BBToExecute" targetRef="EndEvent_1lxwuh2" />
<bpmn:sequenceFlow id="SequenceFlow_0vzx2yr" name="Actor= CDS" sourceRef="ExclusiveGateway_0plxwkg" targetRef="Task_0bhf6tp">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("controller_actor") == "CDS"}</bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("actor") == "CDS"}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmn:error id="Error_0aovtfv" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -94,8 +84,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0gmfit3_di" bpmnElement="SequenceFlow_0gmfit3">
- <di:waypoint x="196" y="341" />
- <di:waypoint x="259" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="259" y="341" />
<bpmndi:BPMNLabel>
<dc:Bounds x="32.5" y="236" width="90" height="20" />
</bpmndi:BPMNLabel>
@@ -107,24 +97,21 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1mkhog2_di" bpmnElement="SequenceFlow_1mkhog2">
- <di:waypoint x="1079" y="462" />
- <di:waypoint x="1147" y="462" />
- <di:waypoint x="1147" y="359" />
+ <di:waypoint xsi:type="dc:Point" x="1079" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="359" />
<bpmndi:BPMNLabel>
<dc:Bounds x="918" y="357" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1gfzi2g_di" bpmnElement="CallActivity_1gfzi2g">
- <dc:Bounds x="725" y="422" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0404s6a_di" bpmnElement="Task_1hs1mn0">
<dc:Bounds x="979" y="422" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_05qembo_di" bpmnElement="SequenceFlow_05qembo">
- <di:waypoint x="672" y="462" />
- <di:waypoint x="725" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="868" y="462" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="503.5" y="357" width="90" height="20" />
+ <dc:Bounds x="725" y="437" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_01mv1si_di" bpmnElement="Task_0bhf6tp">
@@ -136,16 +123,9 @@
<dc:Bounds x="698" y="327" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0cvsnuu_di" bpmnElement="SequenceFlow_0cvsnuu">
- <di:waypoint x="825" y="462" />
- <di:waypoint x="868" y="462" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="651.5" y="357" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_07tqu82_di" bpmnElement="SequenceFlow_07tqu82">
- <di:waypoint x="918" y="462" />
- <di:waypoint x="979" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="918" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="979" y="462" />
<bpmndi:BPMNLabel>
<dc:Bounds x="856" y="409" width="41" height="14" />
</bpmndi:BPMNLabel>
@@ -157,8 +137,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15gxql1_di" bpmnElement="SequenceFlow_15gxql1">
- <di:waypoint x="893" y="487" />
- <di:waypoint x="893" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="893" y="487" />
+ <di:waypoint xsi:type="dc:Point" x="893" y="565" />
<bpmndi:BPMNLabel>
<dc:Bounds x="713" y="436" width="90" height="20" />
</bpmndi:BPMNLabel>
@@ -167,8 +147,8 @@
<dc:Bounds x="259" y="301" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_05j6hg6_di" bpmnElement="SequenceFlow_05j6hg6">
- <di:waypoint x="359" y="341" />
- <di:waypoint x="399" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="399" y="341" />
<bpmndi:BPMNLabel>
<dc:Bounds x="184" y="240" width="90" height="12" />
</bpmndi:BPMNLabel>
@@ -180,8 +160,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lspfyy_di" bpmnElement="SequenceFlow_1lspfyy">
- <di:waypoint x="359" y="341" />
- <di:waypoint x="399" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="399" y="341" />
<bpmndi:BPMNLabel>
<dc:Bounds x="229" y="240" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -190,24 +170,24 @@
<dc:Bounds x="824" y="168" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1t7hs4k_di" bpmnElement="SequenceFlow_1t7hs4k">
- <di:waypoint x="424" y="316" />
- <di:waypoint x="424" y="208" />
- <di:waypoint x="572" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="424" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="424" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="208" />
<bpmndi:BPMNLabel>
<dc:Bounds x="271" y="89" width="83" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0no1qag_di" bpmnElement="SequenceFlow_0no1qag">
- <di:waypoint x="924" y="208" />
- <di:waypoint x="1147" y="208" />
- <di:waypoint x="1147" y="323" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="323" />
<bpmndi:BPMNLabel>
<dc:Bounds x="840.5" y="107" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0fv03vt_di" bpmnElement="SequenceFlow_0fv03vt">
- <di:waypoint x="672" y="208" />
- <di:waypoint x="824" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="824" y="208" />
<bpmndi:BPMNLabel>
<dc:Bounds x="598" y="107" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -222,16 +202,16 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0op5irz_di" bpmnElement="SequenceFlow_0op5irz">
- <di:waypoint x="874" y="168" />
- <di:waypoint x="874" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="168" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="739" y="58" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vzx2yr_di" bpmnElement="SequenceFlow_0vzx2yr">
- <di:waypoint x="424" y="366" />
- <di:waypoint x="424" y="462" />
- <di:waypoint x="572" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="424" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="424" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="462" />
<bpmndi:BPMNLabel>
<dc:Bounds x="455" y="436" width="60" height="12" />
</bpmndi:BPMNLabel>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index b6ab9d0ce6..d8184da87a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -7,6 +7,7 @@
* Modifications Copyright (c) 2019 Samsung
* Modifications Copyright (c) 2019 Bell Canada.
* Modifications Copyright (c) 2020 Nokia
+ * Modifications Copyright (c) 2020 Tech Mahindra
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -569,6 +570,21 @@ public class AAIUpdateTasks {
updateOrchestrationStatusForVnf(execution, OrchestrationStatus.CONFIGURED);
}
+ /**
+ * BPMN access method to update status of Vnf/vfmodule to configAssigned/ConfigDeployed in AAI
+ */
+ public void updateOrchestrationStatus(BuildingBlockExecution execution, String scope, String action) {
+ if (scope.equalsIgnoreCase("vnf") && action.equalsIgnoreCase("config-assign")) {
+ updateOrchestrationStatusForVnf(execution, OrchestrationStatus.CONFIGASSIGNED);
+ } else if (scope.equalsIgnoreCase("vnf") && action.equalsIgnoreCase("config-deploy")) {
+ updateOrchestrationStatusForVnf(execution, OrchestrationStatus.CONFIGDEPLOYED);
+ } else if (scope.equalsIgnoreCase("vfModule") && action.equalsIgnoreCase("config-assign")) {
+ updateOrchestrationStatusForVfModule(execution, OrchestrationStatus.CONFIGASSIGNED);
+ } else if (scope.equalsIgnoreCase("vfModule") && action.equalsIgnoreCase("config-deploy")) {
+ updateOrchestrationStatusForVfModule(execution, OrchestrationStatus.CONFIGDEPLOYED);
+ }
+ }
+
private void updateOrchestrationStatusForService(BuildingBlockExecution execution, OrchestrationStatus status) {
try {
ServiceInstance serviceInstance =
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecution.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecution.java
index 86d56005f6..754c377914 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecution.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecution.java
@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
@Component
public class ControllerExecution {
private static final Logger logger = LoggerFactory.getLogger(ControllerExecution.class);
- private static final String CONTROLLER_ACTOR = "controllerActor";
+ private static final String CONTROLLER_ACTOR = "actor";
private static final String BUILDING_BLOCK = "buildingBlock";
private static final String SCOPE = "scope";
private static final String ACTION = "action";
@@ -59,9 +59,9 @@ public class ControllerExecution {
public void setControllerActorScopeAction(BuildingBlockExecution execution) {
try {
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
- String modleUuid = genericVnf.getModelInfoGenericVnf().getModelCustomizationUuid();
+ String modelUuid = genericVnf.getModelInfoGenericVnf().getModelCustomizationUuid();
VnfResourceCustomization vnfResourceCustomization =
- catalogDbClient.getVnfResourceCustomizationByModelCustomizationUUID(modleUuid);
+ catalogDbClient.getVnfResourceCustomizationByModelCustomizationUUID(modelUuid);
// Fetching Controller Actor at VNF level if null then Controller Actor is set as "APPC"
String controllerActor = Optional.ofNullable(vnfResourceCustomization.getControllerActor()).orElse("APPC");
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java
index f568026aa5..854678a6a6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2019 Bell Canada
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -34,7 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
- * For Vnf/Vf-Module/Service BuildingBlockExecution is being used.
+ * This class is used in context of Building Block flow for configuration of vnf/vfmodule/service.
*
* @param - BuildingBlockExecution
*/
@@ -44,15 +46,12 @@ public class GenericCDSProcessingBB implements ControllerRunnable<BuildingBlockE
private static final String EXECUTION_OBJECT = "executionObject";
public static final String CDS_ACTOR = "cds";
public static final String VNF_SCOPE = "vnf";
- public static final String VF_MODULE_SCOPE = "vf-module";
+ public static final String VF_MODULE_SCOPE = "vfmodule";
@Autowired
private ExceptionBuilder exceptionBuilder;
@Autowired
- private ExtractPojosForBB extractPojosForBB;
-
- @Autowired
private AbstractCDSProcessingBBUtils cdsDispather;
@Autowired
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 eead1761ea..5bb199a1f4 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
@@ -8,6 +8,8 @@
* ================================================================================
* Modifications Copyright (c) 2020 Nokia
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -140,6 +142,7 @@ public class WorkflowAction {
private static final String ACTIVATENETWORKBB = "ActivateNetworkBB";
private static final String VOLUMEGROUP_DELETE_PATTERN = "(Un|De)(.*)Volume(.*)";
private static final String VOLUMEGROUP_CREATE_PATTERN = "(A|C)(.*)Volume(.*)";
+ private static final String CONTROLLER = "Controller";
@Autowired
protected BBInputSetup bbInputSetup;
@@ -698,8 +701,10 @@ public class WorkflowAction {
resourceId = UUID.randomUUID().toString();
}
for (ExecuteBuildingBlock ebb : flowsToExecute) {
- if (key != null && key.equalsIgnoreCase(ebb.getBuildingBlock().getKey())
- && ebb.getBuildingBlock().getBpmnFlowName().contains(resourceType.toString())) {
+ if (key != null && key.equalsIgnoreCase(ebb.getBuildingBlock().getKey()) && (ebb.getBuildingBlock()
+ .getBpmnFlowName().contains(resourceType.toString())
+ || (ebb.getBuildingBlock().getBpmnFlowName().contains(CONTROLLER)
+ && ebb.getBuildingBlock().getBpmnScope().equalsIgnoreCase(resourceType.toString())))) {
WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
workflowResourceIds.setServiceInstanceId(serviceInstanceId);
WorkflowResourceIdsUtils.setResourceIdByWorkflowType(workflowResourceIds, resourceType, resourceId);
@@ -1366,7 +1371,8 @@ public class WorkflowAction {
addBuildingBlockToExecuteBBList(flowsToExecute, resourceList, WorkflowType.SERVICE, orchFlow, requestId,
apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false,
false);
- } else if (orchFlow.getFlowName().contains(VNF)) {
+ } else if (orchFlow.getFlowName().contains(VNF) || (orchFlow.getFlowName().contains(CONTROLLER)
+ && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resourceList, WorkflowType.VNF, orchFlow, requestId,
apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false,
false);
@@ -1382,7 +1388,8 @@ public class WorkflowAction {
addBuildingBlockToExecuteBBList(flowsToExecute, resourceList, WorkflowType.VIRTUAL_LINK, orchFlow,
requestId, apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails,
true, false);
- } else if (orchFlow.getFlowName().contains(VFMODULE)) {
+ } else if (orchFlow.getFlowName().contains(VFMODULE) || (orchFlow.getFlowName().contains(CONTROLLER)
+ && (VFMODULE).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
List<Resource> vfModuleResourcesSorted = null;
if (requestAction.equals(CREATEINSTANCE) || requestAction.equals(ASSIGNINSTANCE)
|| requestAction.equals("activateInstance")) {
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
index e5b003a437..a7dfe7f7a4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2020 Tech Mahindra
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -753,4 +755,40 @@ public class AAIUpdateTasksTest extends BaseTaskTest {
when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf);
return pnf;
}
+
+ @Test
+ public void updateOrchestrationStatusVnfConfigAssignedTest() throws Exception {
+ doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED);
+
+ aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-assign");
+
+ verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED);
+ }
+
+ @Test
+ public void updateOrchestrationStatusVnfConfigDeployedTest() throws Exception {
+ doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED);
+
+ aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-deploy");
+
+ verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED);
+ }
+
+ @Test
+ public void updateOrchestrationStatusVfModuleConfigDeployedTest() throws Exception {
+ doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf,
+ OrchestrationStatus.CONFIGDEPLOYED);
+ aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-deploy");
+ verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf,
+ OrchestrationStatus.CONFIGDEPLOYED);
+ }
+
+ @Test
+ public void updateOrchestrationStatusVfModuleConfigAssignedTest() throws Exception {
+ doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf,
+ OrchestrationStatus.CONFIGASSIGNED);
+ aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-assign");
+ verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf,
+ OrchestrationStatus.CONFIGASSIGNED);
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java
index 72a987c395..f35939ec39 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java
@@ -99,7 +99,7 @@ public class ControllerExecutionTest extends BaseTaskTest {
controllerExecution.setControllerActorScopeAction(execution);
assertEquals(TEST_SCOPE, execution.getVariable("scope"));
assertEquals(TEST_ACTION, execution.getVariable("action"));
- assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("controllerActor"));
+ assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("actor"));
}
@@ -114,7 +114,7 @@ public class ControllerExecutionTest extends BaseTaskTest {
bbNameSelectionReference.setScope(TEST_SCOPE);
doReturn(bbNameSelectionReference).when(catalogDbClient).getBBNameSelectionReference(TEST_CONTROLLER_ACTOR,
TEST_SCOPE, TEST_ACTION);
- execution.setVariable("controllerActor", TEST_CONTROLLER_ACTOR);
+ execution.setVariable("actor", TEST_CONTROLLER_ACTOR);
execution.setVariable("scope", TEST_SCOPE);
execution.setVariable("action", TEST_ACTION);