aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src/main/java')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java9
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java34
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java3
3 files changed, 14 insertions, 32 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
index 565ddf42b5..8353f708a9 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
@@ -65,7 +65,6 @@ public class ToscaResourceStructure {
String envHeatTemplateUUID;
String heatFilesUUID;
String workloadPerformance;
- boolean isVnfAlreadyInstalled = false;
String serviceVersion;
private boolean isDeployedSuccessfully=false;
@@ -314,14 +313,6 @@ public class ToscaResourceStructure {
this.toscaCsar = toscaCsar;
}
- public boolean isVnfAlreadyInstalled() {
- return isVnfAlreadyInstalled;
- }
-
- public void setVnfAlreadyInstalled(boolean isVnfAlreadyInstalled) {
- this.isVnfAlreadyInstalled = isVnfAlreadyInstalled;
- }
-
public String getVolHeatTemplateUUID() {
return volHeatTemplateUUID;
}
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 ea952f6daf..87df2648d1 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
@@ -440,33 +440,13 @@ public class ToscaResourceInstaller {
VfModuleCustomization vfModuleCustomization = createVFModuleResource(matchingObject.get(), nodeTemplate, toscaResourceStruct, vfResourceStructure,vfMetadata, vnfResource);
vfModuleCustomization.getVfModule().setVnfResources(vnfResource.getVnfResources());
}else
- throw (new Exception("Cannot find matching VFModule Customization"));
+ throw new Exception("Cannot find matching VFModule Customization for VF Module Metadata: " + vfMetadata.getVfModuleModelCustomizationUUID());
}
service.getVnfCustomizations().add(vnfResource);
}
}
- protected void processFlexware(ToscaResourceStructure toscaResourceStruct, Service service, NodeTemplate nodeTemplate,
- String serviceType) {
- if (serviceType != null && serviceType.equalsIgnoreCase("Flexware")) {
-
- createVnfResource(nodeTemplate, toscaResourceStruct, service);
- String modelName = toscaResourceStruct.getVnfResourceCustomization().getVnfResources().getModelName();
-
- String modelVersion = BigDecimalVersion.castAndCheckNotificationVersionToString(
- toscaResourceStruct.getCatalogVnfResourceCustomization().getVnfResources().getModelVersion());
- // check for duplicate record already in the database
- VnfResource vnfResource = vnfRepo.findByModelNameAndModelVersion(modelName, modelVersion);
-
- if (vnfResource != null) {
- toscaResourceStruct.setVnfAlreadyInstalled(true);
- }
-
- vnfCustomizationRepo.saveAndFlush(toscaResourceStruct.getCatalogVnfResourceCustomization());
- }
- }
-
public void processWatchdog(String distributionId, String servideUUID) {
WatchdogServiceModVerIdLookup modVerIdLookup = new WatchdogServiceModVerIdLookup(distributionId,servideUUID);
watchdogModVerIdLookupRepository.saveAndFlush(modVerIdLookup);
@@ -1263,12 +1243,20 @@ public class ToscaResourceInstaller {
// Set all Child Templates related to HEAT_VOLUME
if(!volumeHeatChildTemplates.isEmpty()){
- vfModule.getVolumeHeatTemplate().setChildTemplates(volumeHeatChildTemplates);
+ if(vfModule.getVolumeHeatTemplate() != null){
+ vfModule.getVolumeHeatTemplate().setChildTemplates(volumeHeatChildTemplates);
+ }else{
+ logger.debug("VolumeHeatTemplate not set in setHeatInformationForVfModule()");
+ }
}
// Set all Child Templates related to HEAT
if(!heatChildTemplates.isEmpty()){
- vfModule.getVolumeHeatTemplate().setChildTemplates(heatChildTemplates);
+ if(vfModule.getModuleHeatTemplate() != null){
+ vfModule.getModuleHeatTemplate().setChildTemplates(heatChildTemplates);
+ }else{
+ logger.debug("ModuleHeatTemplate not set in setHeatInformationForVfModule()");
+ }
}
}
}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
index ef5b889d09..13af95a8fc 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
@@ -212,6 +212,9 @@ public class ASDCNotificationLogging {
buffer.append("Model Name:");
buffer.append(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
buffer.append(System.lineSeparator());
+ buffer.append("Model UUID:");
+ buffer.append(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)));
+ buffer.append(System.lineSeparator());
buffer.append("Description:");
buffer.append(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
buffer.append(System.lineSeparator());