From fb6ab40a64e74876ba1f08c4d3bdb6a040c21b94 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Mon, 5 Nov 2018 19:12:02 -0500 Subject: Bug fixes November 5th building block validator test now passes added buildingblockvalidator process instance test Retrieve actual error from WorkflowExceptionErrorMessage when the error message is empty, not only when null. Propagate orchestrationStatusValidationResult values from BB to BB. corrected use of constructor for AaiUtil use AaiUtil method to create path for get call modified how allotted resource urls are constructed - Removed the findExistingVnfcInstanceGroup method. It is not required to check this because the vnfResourceCustomization is always a new object at this location. Enable multiStage VF Module Create processing only when aLaCarte flag is on. Change-Id: If8cf397a84abc290e67e287d5b2264dd226398bc Issue-ID: SO-1188 Signed-off-by: Benjamin, Max (mb388a) --- .../installer/heat/ToscaResourceInstaller.java | 36 +++------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'asdc-controller') diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index f77a48a1f8..06da4e7e03 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -1170,27 +1170,7 @@ public class ToscaResourceInstaller { return vfcInstanceGroupCustom; } - - protected VFCInstanceGroup findExistingVnfcInstanceGroup(VnfResourceCustomization vnfResourceCustomization, - String modelUUID) { - VFCInstanceGroup vfcInstanceGroup = null; - List vnfInstanceGroupCustomizations = vnfResourceCustomization - .getVnfcInstanceGroupCustomizations(); - if(vnfInstanceGroupCustomizations != null){ - for (VnfcInstanceGroupCustomization vnfcInstanceGroupCustom : vnfResourceCustomization - .getVnfcInstanceGroupCustomizations()) { - if (vnfcInstanceGroupCustom.getInstanceGroup() != null - && vnfcInstanceGroupCustom.getInstanceGroup().getModelUUID().equals(modelUUID)) { - vfcInstanceGroup = (VFCInstanceGroup)vnfcInstanceGroupCustom.getInstanceGroup(); - } - } - } - if (vfcInstanceGroup == null) - vfcInstanceGroup = (VFCInstanceGroup) instanceGroupRepo.findByModelUUID(modelUUID); - - return vfcInstanceGroup; - } - + protected VfModuleCustomization createVFModuleResource(Group group, NodeTemplate nodeTemplate, ToscaResourceStructure toscaResourceStructure, VfResourceStructure vfResourceStructure, IVfModuleData vfModuleData, VnfResourceCustomization vnfResource, Service service, Set existingCvnfcSet, Set existingVnfcSet) { @@ -1606,16 +1586,10 @@ public class ToscaResourceInstaller { for (Group group : groupList) { - VFCInstanceGroup vfcInstanceGroup = findExistingVnfcInstanceGroup(vnfResourceCustomization, - group.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)); - if(vfcInstanceGroup == null){ - VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup( - vfNodeTemplate, group, vnfResourceCustomization); - - vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization); - } - } - + VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(vfNodeTemplate, group, vnfResourceCustomization); + + vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization); + } } return vnfResourceCustomization; } -- cgit 1.2.3-korg