summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java/org/onap
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 23:01:14 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 23:01:33 -0400
commitd638b2c18956ead1916ecb77780f34aec9297d0f (patch)
treef70dc144719898b24dd8301d484c39781ce27b5d /asdc-controller/src/main/java/org/onap
parent86f04e1d55b54a1a23bb274d211c6fca85980fef (diff)
vnf resource uuid null
- Moved VNFC code at the end of the VNF resource handling. Change-Id: I38087a3960d651d9b91e1642c030fda4435d09ca Issue-ID: SO-1732 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'asdc-controller/src/main/java/org/onap')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java25
1 files changed, 15 insertions, 10 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 e283fb2846..9f914c586e 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
@@ -952,6 +952,19 @@ public class ToscaResourceInstaller {
throw new Exception("Cannot find matching VFModule Customization in Csar for Vf_Modules_Metadata: " + vfMetadata.getVfModuleModelCustomizationUUID());
}
+
+
+ // Check for VNFC Instance Group info and add it if there is
+ List<Group> groupList = toscaResourceStruct.getSdcCsarHelper()
+ .getGroupsOfOriginOfNodeTemplateByToscaGroupType(nodeTemplate,
+ "org.openecomp.groups.VfcInstanceGroup");
+
+ for (Group group : groupList) {
+ VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(nodeTemplate, group, vnfResource, toscaResourceStruct);
+ vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
+ }
+
+
service.getVnfCustomizations().add(vnfResource);
} else{
logger.debug("Notification VF ResourceCustomizationUUID: " + vfNotificationResource.getResourceCustomizationUUID() + " doesn't match " +
@@ -1288,6 +1301,7 @@ public class ToscaResourceInstaller {
if(vnfcCustomization==null)
vnfcCustomization = vnfcCustomizationRepo.findOneByModelCustomizationUUID(customizationUUID);
+ //vnfcCustomization = new VnfcCustomization();
return vnfcCustomization;
}
@@ -1706,7 +1720,7 @@ public class ToscaResourceInstaller {
SdcTypes.CVFC);
for (NodeTemplate cvfcTemplate : cvfcList) {
-boolean cvnfcVfModuleNameMatch = false;
+ boolean cvnfcVfModuleNameMatch = false;
for(NodeTemplate node : groupMembers){
vfModuleMemberName = node.getName();
@@ -2094,15 +2108,6 @@ boolean cvnfcVfModuleNameMatch = false;
vnfResourceCustomization.setService(service);
vnfResource.getVnfResourceCustomizations().add(vnfResourceCustomization);
- // Fetch VNFC Instance Group Info
- List<Group> groupList = toscaResourceStructure.getSdcCsarHelper()
- .getGroupsOfOriginOfNodeTemplateByToscaGroupType(vfNodeTemplate,
- "org.openecomp.groups.VfcInstanceGroup");
-
- for (Group group : groupList) {
- VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(vfNodeTemplate, group, vnfResourceCustomization, toscaResourceStructure);
- vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
- }
}
return vnfResourceCustomization;
}