aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java28
4 files changed, 25 insertions, 19 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
index b2058b25a0..bc71fc6f67 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
@@ -91,8 +91,9 @@ public class ConfigAssignVnf {
configAssignRequestVnf.setResolutionKey(vnf.getVnfName());
configAssignRequestVnf.setConfigAssignPropertiesForVnf(configAssignPropertiesForVnf);
- String blueprintName = vnf.getBlueprintName();
- String blueprintVersion = vnf.getBlueprintVersion();
+ String blueprintName = vnf.getModelInfoGenericVnf().getBlueprintName();
+ String blueprintVersion = vnf.getModelInfoGenericVnf().getBlueprintVersion();
+ logger.debug(" BlueprintName : " + blueprintName + " BlueprintVersion : " + blueprintVersion);
AbstractCDSPropertiesBean abstractCDSPropertiesBean = new AbstractCDSPropertiesBean();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
index 359f19285f..6e7ca5f4e5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
@@ -92,8 +92,10 @@ public class ConfigDeployVnf {
configDeployRequestVnf.setResolutionKey(vnf.getVnfName());
configDeployRequestVnf.setConfigDeployPropertiesForVnf(configDeployPropertiesForVnf);
- String blueprintName = vnf.getBlueprintName();
- String blueprintVersion = vnf.getBlueprintVersion();
+ String blueprintName = vnf.getModelInfoGenericVnf().getBlueprintName();
+ String blueprintVersion = vnf.getModelInfoGenericVnf().getBlueprintVersion();
+ logger.debug(" BlueprintName : " + blueprintName + " BlueprintVersion : " + blueprintVersion);
+
AbstractCDSPropertiesBean abstractCDSPropertiesBean = new AbstractCDSPropertiesBean();
abstractCDSPropertiesBean.setBlueprintName(blueprintName);
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 f0a102dfeb..8ec283032f 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
@@ -87,11 +87,10 @@ public class WorkflowActionBBTasks {
if (ebb.getBuildingBlock().getBpmnFlowName().equals("ConfigAssignVnfBB")
|| ebb.getBuildingBlock().getBpmnFlowName().equals("ConfigDeployVnfBB")) {
- String serviceInstanceId = ebb.getWorkflowResourceIds().getServiceInstanceId();
String vnfCustomizationUUID = ebb.getBuildingBlock().getKey();
- List<VnfResourceCustomization> vnfResourceCustomizations =
- catalogDbClient.getVnfResourceCustomizationByModelUuid(serviceInstanceId);
+ List<VnfResourceCustomization> vnfResourceCustomizations = catalogDbClient
+ .getVnfResourceCustomizationByModelUuid(ebb.getRequestDetails().getModelInfo().getModelUuid());
if (vnfResourceCustomizations != null && vnfResourceCustomizations.size() >= 1) {
VnfResourceCustomization vrc = catalogDbClient.findVnfResourceCustomizationInList(vnfCustomizationUUID,
vnfResourceCustomizations);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
index a60927d694..1013cc8330 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
@@ -48,6 +48,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.serviceinstancebeans.ModelInfo;
+import org.onap.so.serviceinstancebeans.RequestDetails;
import org.springframework.core.env.Environment;
public class WorkflowActionBBTasksTest extends BaseTaskTest {
@@ -95,14 +97,16 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
ExecuteBuildingBlock ebb = new ExecuteBuildingBlock();
String vnfCustomizationUUID = "1234567";
- String serviceInstanceId = "1234567";
+ String modelUuid = "1234567";
BuildingBlock buildingBlock = new BuildingBlock();
buildingBlock.setBpmnFlowName("ConfigAssignVnfBB");
buildingBlock.setKey(vnfCustomizationUUID);
ebb.setBuildingBlock(buildingBlock);
- WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
- workflowResourceIds.setServiceInstanceId(serviceInstanceId);
- ebb.setWorkflowResourceIds(workflowResourceIds);
+ RequestDetails rd = new RequestDetails();
+ ModelInfo mi = new ModelInfo();
+ mi.setModelUuid(modelUuid);
+ rd.setModelInfo(mi);
+ ebb.setRequestDetails(rd);
flowsToExecute.add(ebb);
List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
@@ -112,8 +116,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
vnfResourceCustomizations.add(vrc);
GenericVnf genericVnf = new GenericVnf();
genericVnf.setModelCustomizationId(vnfCustomizationUUID);
- doReturn(vnfResourceCustomizations).when(catalogDbClient)
- .getVnfResourceCustomizationByModelUuid(serviceInstanceId);
+ doReturn(vnfResourceCustomizations).when(catalogDbClient).getVnfResourceCustomizationByModelUuid(modelUuid);
doReturn(vrc).when(catalogDbClient).findVnfResourceCustomizationInList(vnfCustomizationUUID,
vnfResourceCustomizations);
@@ -138,14 +141,16 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
ExecuteBuildingBlock ebb2 = new ExecuteBuildingBlock();
String vnfCustomizationUUID = "1234567";
- String serviceInstanceId = "1234567";
+ String modelUuid = "1234567";
BuildingBlock buildingBlock = new BuildingBlock();
buildingBlock.setBpmnFlowName("ConfigDeployVnfBB");
buildingBlock.setKey(vnfCustomizationUUID);
ebb.setBuildingBlock(buildingBlock);
- WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
- workflowResourceIds.setServiceInstanceId(serviceInstanceId);
- ebb.setWorkflowResourceIds(workflowResourceIds);
+ RequestDetails rd = new RequestDetails();
+ ModelInfo mi = new ModelInfo();
+ mi.setModelUuid(modelUuid);
+ rd.setModelInfo(mi);
+ ebb.setRequestDetails(rd);
flowsToExecute.add(ebb);
List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
@@ -155,8 +160,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
vnfResourceCustomizations.add(vrc);
GenericVnf genericVnf = new GenericVnf();
genericVnf.setModelCustomizationId(vnfCustomizationUUID);
- doReturn(vnfResourceCustomizations).when(catalogDbClient)
- .getVnfResourceCustomizationByModelUuid(serviceInstanceId);
+ doReturn(vnfResourceCustomizations).when(catalogDbClient).getVnfResourceCustomizationByModelUuid(modelUuid);
doReturn(vrc).when(catalogDbClient).findVnfResourceCustomizationInList(vnfCustomizationUUID,
vnfResourceCustomizations);