From: Alexis de Talhouët Date: Mon, 3 Jun 2019 13:58:07 +0000 (-0400) Subject: Fix ConfigAssignVnfBB and ConfigDeployVnfBB X-Git-Tag: 1.4.3~8 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d6d76e63c5eeaf1090efa4f28f5a8e3d6beb3781;p=so.git Fix ConfigAssignVnfBB and ConfigDeployVnfBB Change-Id: If5a175ee26e279cf71e38c996a75fa627e5e2c00 Issue-ID: SO-1981 Signed-off-by: Alexis de Talhouët --- diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql index 2183d3b6d3..3d19b3a471 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql @@ -806,3 +806,8 @@ VALUES ('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM'); UPDATE northbound_request_ref_lookup SET SERVICE_TYPE = '*' WHERE SERVICE_TYPE = NULL; + +INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) +VALUES +('ConfigAssignVnfBB', 'NO_VALIDATE', 'CUSTOM'), +('ConfigDeployVnfBB', 'NO_VALIDATE', 'CUSTOM'); diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn index 9892fbdd91..11d77bf97a 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_0gmfit3 @@ -23,7 +23,7 @@ SequenceFlow_1mkhog2 - + SequenceFlow_0gmfit3 SequenceFlow_05qembo @@ -34,7 +34,7 @@ - #{execution.getVariable("CDSStatus").equals("Success")} + SequenceFlow_15gxql1 @@ -49,15 +49,15 @@ - - + + - - + + @@ -66,8 +66,8 @@ - - + + @@ -76,12 +76,12 @@ - - + + - - + + @@ -90,8 +90,8 @@ - - + + 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 8a24330093..b2058b25a0 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 @@ -20,6 +20,7 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks; +import java.util.List; import java.util.Map; import java.util.UUID; import org.onap.so.bpmn.common.BuildingBlockExecution; @@ -68,7 +69,8 @@ public class ConfigAssignVnf { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); - Map userParams = execution.getGeneralBuildingBlock().getRequestContext().getUserParams(); + List> userParams = + execution.getGeneralBuildingBlock().getRequestContext().getRequestParameters().getUserParams(); ConfigAssignPropertiesForVnf configAssignPropertiesForVnf = new ConfigAssignPropertiesForVnf(); configAssignPropertiesForVnf.setServiceInstanceId(serviceInstance.getServiceInstanceId()); @@ -79,8 +81,10 @@ public class ConfigAssignVnf { configAssignPropertiesForVnf.setVnfId(vnf.getVnfId()); configAssignPropertiesForVnf.setVnfName(vnf.getVnfName()); - for (Map.Entry entry : userParams.entrySet()) { - configAssignPropertiesForVnf.setUserParam(entry.getKey(), entry.getValue()); + for (Map params : userParams) { + for (Map.Entry entry : params.entrySet()) { + configAssignPropertiesForVnf.setUserParam(entry.getKey(), entry.getValue()); + } } ConfigAssignRequestVnf configAssignRequestVnf = new ConfigAssignRequestVnf();