summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java36
1 files changed, 5 insertions, 31 deletions
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<VnfcInstanceGroupCustomization> 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<CvnfcCustomization> existingCvnfcSet, Set<VnfcCustomization> 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;
}