summaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-11-06 15:15:35 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-06 15:15:35 +0000
commit2c9a77e893d414b8af81668dc9945691f4466528 (patch)
treefb1acd7bdfb2bdf34962c3f4b5d43e95d0239908 /asdc-controller
parent89f384164a2712f7515497fe16b55e585266c79b (diff)
parentfb6ab40a64e74876ba1f08c4d3bdb6a040c21b94 (diff)
Merge "Bug fixes November 5th" into casablanca
Diffstat (limited to 'asdc-controller')
-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;
}