summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-healing-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-healing-lib')
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-api/src/main/java/org/openecomp/sdc/healing/api/HealingManager.java3
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java72
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ComponentQuestionnaireHealer.java5
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/CompositionDataHealer.java6
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/FileDataStructureHealer.java5
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/HeatToToscaTranslationHealer.java27
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/SubEntitiesQuestionnaireHealer.java7
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ValidationStructureHealer.java4
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VlmVersionHealer.java3
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VspQuestionnaireHealer.java7
10 files changed, 90 insertions, 49 deletions
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-api/src/main/java/org/openecomp/sdc/healing/api/HealingManager.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-api/src/main/java/org/openecomp/sdc/healing/api/HealingManager.java
index a2ce153a82..211d9a21b2 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-api/src/main/java/org/openecomp/sdc/healing/api/HealingManager.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-api/src/main/java/org/openecomp/sdc/healing/api/HealingManager.java
@@ -23,6 +23,7 @@ package org.openecomp.sdc.healing.api;
import org.openecomp.sdc.healing.types.HealCode;
import java.util.Map;
+import java.util.Optional;
/**
* Created by Talio on 11/29/2016.
@@ -30,5 +31,5 @@ import java.util.Map;
public interface HealingManager {
Object heal(HealCode code, Map<String, Object> healParameters);
- void healAll(Map<String, Object> healParameters);
+ Optional<String> healAll(Map<String, Object> healParameters);
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
index 0f2c0e7ee1..16f9c60d7f 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
@@ -20,6 +20,7 @@
package org.openecomp.sdc.healing.impl;
+import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.core.utilities.json.JsonUtil;
import org.openecomp.sdc.common.errors.Messages;
@@ -33,8 +34,10 @@ import org.openecomp.sdc.logging.types.LoggerErrorCode;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
-import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Map;
+import java.util.Optional;
/**
* Created by Talio on 11/29/2016.
@@ -45,34 +48,53 @@ public class HealingManagerImpl implements HealingManager {
@Override
public Object heal(HealCode code, Map<String, Object> healParameters) {
- String implClassName = healerCodeToImplClass.get(code.name());
- try {
- Healer healerImpl = getHealerImplInstance(implClassName);
- return healerImpl.heal(healParameters);
+ ArrayList<String> healingFailureMessages = new ArrayList<>();
+
+ Object result =
+ heal(healParameters, healerCodeToImplClass.get(code.name()), healingFailureMessages);
+
+ if (!healingFailureMessages.isEmpty()) {
+ throw new RuntimeException(CommonMethods.listToSeparatedString(healingFailureMessages, '\n'));
+ }
+ return result;
+ }
+ @Override
+ public Optional<String> healAll(Map<String, Object> healParameters) {
+ ArrayList<String> healingFailureMessages = new ArrayList<>();
+
+ for (String implClassName : healerCodeToImplClass.values()) {
+ heal(healParameters, implClassName, healingFailureMessages);
+ }
+
+ return healingFailureMessages.isEmpty() ? Optional.empty()
+ : Optional.of(CommonMethods.listToSeparatedString(healingFailureMessages, '\n'));
+ }
+
+ private Object heal(Map<String, Object> healParameters, String healerImplClassName,
+ ArrayList<String> healingFailureMessages) {
+ Healer healerImpl;
+ try {
+ healerImpl = getHealerImplInstance(healerImplClassName);
} catch (Exception e) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.SELF_HEALING, ErrorLevel.ERROR.name(), LoggerErrorCode
.DATA_ERROR.getErrorCode(), LoggerErrorDescription.CANT_HEAL);
- throw new RuntimeException(String.format(Messages.CANT_LOAD_CLASS.getErrorMessage(),
- implClassName, e.getMessage()));
+ healingFailureMessages
+ .add(String.format(Messages.CANT_LOAD_HEALING_CLASS.getErrorMessage(),
+ healerImplClassName));
+ return null;
}
- }
- @Override
- public void healAll(Map<String, Object> healParameters) {
- for (String implClassName : healerCodeToImplClass.values()) {
- try {
- Healer healerImpl = getHealerImplInstance(implClassName);
- healerImpl.heal(healParameters);
- } catch (Exception e) {
- MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
- LoggerTragetServiceName.SELF_HEALING, ErrorLevel.ERROR.name(), LoggerErrorCode
- .DATA_ERROR.getErrorCode(), LoggerErrorDescription.CANT_HEAL);
- throw new RuntimeException(String.format(Messages.CANT_LOAD_CLASS.getErrorMessage(),
- implClassName, e.getMessage()));
- }
+ try {
+ return healerImpl.heal(healParameters);
+ } catch (Exception e) {
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerTragetServiceName.SELF_HEALING, ErrorLevel.ERROR.name(), LoggerErrorCode
+ .DATA_ERROR.getErrorCode(), LoggerErrorDescription.CANT_HEAL);
+ healingFailureMessages.add(e.getMessage());
}
+ return null;
}
private static Map<String, String> initHealers() {
@@ -80,10 +102,8 @@ public class HealingManagerImpl implements HealingManager {
}
private Healer getHealerImplInstance(String implClassName)
- throws ClassNotFoundException, NoSuchMethodException, InstantiationException,
- IllegalAccessException, java.lang.reflect.InvocationTargetException {
- Class<?> clazz = Class.forName(implClassName);
- Constructor<?> constructor = clazz.getConstructor();
- return (Healer) constructor.newInstance();
+ throws InstantiationException, IllegalAccessException, InvocationTargetException,
+ NoSuchMethodException, ClassNotFoundException {
+ return (Healer) Class.forName(implClassName).getConstructor().newInstance();
}
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ComponentQuestionnaireHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ComponentQuestionnaireHealer.java
index 2e63a8d50a..d061556e4c 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ComponentQuestionnaireHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ComponentQuestionnaireHealer.java
@@ -12,8 +12,6 @@ import org.openecomp.sdc.vendorsoftwareproduct.dao.ComputeDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComputeDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ImageDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ImageDaoFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDao;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
@@ -178,8 +176,7 @@ public class ComponentQuestionnaireHealer implements Healer {
JsonObject computeQuestionnaireJsonObject = new JsonObject();
computeQuestionnaireJsonObject.add(VM_SIZING, vmSizing);
- String computeQuestionnaire = computeQuestionnaireJsonObject != null ?
- computeQuestionnaireJsonObject.toString() : null;
+ String computeQuestionnaire = computeQuestionnaireJsonObject.toString();
computeDao.updateQuestionnaireData(computeEntity.getVspId(), computeEntity.getVersion(),
computeEntity.getComponentId(), computeEntity.getId(), computeQuestionnaire);
compute.remove(VM_SIZING);
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/CompositionDataHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/CompositionDataHealer.java
index 9800d02ba6..e3701743ec 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/CompositionDataHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/CompositionDataHealer.java
@@ -31,6 +31,8 @@ import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.common.utils.CommonUtil;
import org.openecomp.sdc.common.utils.SdcCommon;
import org.openecomp.sdc.healing.interfaces.Healer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
@@ -92,6 +94,8 @@ public class CompositionDataHealer implements Healer {
private static CompositionEntityDataManager compositionEntityDataManager =
CompositionEntityDataManagerFactory.getInstance().createInterface();
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
public CompositionDataHealer() {
}
@@ -288,6 +292,7 @@ public class CompositionDataHealer implements Healer {
serviceModelDao.storeServiceModel(vspId, version,
translatorOutput.getToscaServiceModel());
} catch (Exception e) {
+ log.debug("", e);
return Optional.empty();
}
@@ -304,6 +309,7 @@ public class CompositionDataHealer implements Healer {
OnboardingTypesEnum.ZIP, uploadData.getContentData().array());
return HeatToToscaUtil.loadAndTranslateTemplateData(fileContentHandler);
} catch (Exception e) {
+ log.debug("", e);
return null;
}
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/FileDataStructureHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/FileDataStructureHealer.java
index 0d484440cf..4a0a5f9d63 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/FileDataStructureHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/FileDataStructureHealer.java
@@ -27,6 +27,8 @@ import org.openecomp.sdc.common.utils.CommonUtil;
import org.openecomp.sdc.common.utils.SdcCommon;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.healing.interfaces.Healer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDaoFactory;
@@ -51,6 +53,8 @@ public class FileDataStructureHealer implements Healer {
CandidateServiceFactory.getInstance().createInterface();
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
public FileDataStructureHealer() {
}
@@ -104,6 +108,7 @@ public class FileDataStructureHealer implements Healer {
healingResult = getFileDataStructureFromJson(candidateDataEntity.getFilesDataStructure());
}catch (Exception e){
+ log.debug("", e);
return Optional.empty();
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/HeatToToscaTranslationHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/HeatToToscaTranslationHealer.java
index 44b6062e89..32cd8cbae3 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/HeatToToscaTranslationHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/HeatToToscaTranslationHealer.java
@@ -12,6 +12,8 @@ import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.common.utils.CommonUtil;
import org.openecomp.sdc.common.utils.SdcCommon;
import org.openecomp.sdc.healing.interfaces.Healer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
@@ -34,6 +36,8 @@ public class HeatToToscaTranslationHealer implements Healer {
templateDao = ServiceTemplateDaoFactory.getInstance().createInterface();
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
public HeatToToscaTranslationHealer(){
}
@@ -58,24 +62,25 @@ public class HeatToToscaTranslationHealer implements Healer {
.getContentData().array());
translatorOutput =
HeatToToscaUtil.loadAndTranslateTemplateData(fileContentHandler);
- }catch (Exception e){
+ } catch (Exception e) {
+ log.debug("", e);
return Optional.empty();
}
- if(Objects.isNull(translatorOutput)){
+ if (Objects.isNull(translatorOutput)) {
return Optional.empty();
- }
+ } else {
- if (translatorOutput != null && translatorOutput.getToscaServiceModel() == null) {
- return Optional.empty();
- }
+ if (translatorOutput.getToscaServiceModel() == null) {
+ return Optional.empty();
+ }
//templateDao.deleteAll(vspId, version);
- serviceModelDao.deleteAll(vspId,version);
- serviceModelDao.storeServiceModel(vspId, version,
- translatorOutput.getToscaServiceModel());
- mdcDataDebugMessage.debugExitMessage("VSP id", vspId);
+ serviceModelDao.deleteAll(vspId, version);
+ serviceModelDao.storeServiceModel(vspId, version, translatorOutput.getToscaServiceModel());
+ mdcDataDebugMessage.debugExitMessage("VSP id", vspId);
- return translatorOutput;
+ return translatorOutput;
+ }
}
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/SubEntitiesQuestionnaireHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/SubEntitiesQuestionnaireHealer.java
index 4e8de71ea3..130405be1d 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/SubEntitiesQuestionnaireHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/SubEntitiesQuestionnaireHealer.java
@@ -67,9 +67,9 @@ public class SubEntitiesQuestionnaireHealer implements Healer {
: (Version) healingParams.get(SdcCommon.VERSION);
Collection<ComponentEntity> componentEntities =
-
componentDao.listCompositionAndQuestionnaire(vspId, version);
- networkDao.list(new NetworkEntity(vspId, version,null));
+
+ networkDao.list(new NetworkEntity(vspId, version, null));
Collection<NicEntity> nicEntities = vendorSoftwareProductDao.listNicsByVsp(vspId, version);
@@ -90,7 +90,8 @@ public class SubEntitiesQuestionnaireHealer implements Healer {
for (Object entity : compositionEntities) {
CompositionEntity compositionEntity = (CompositionEntity) entity;
- if (Objects.isNull(compositionEntity.getQuestionnaireData())) {
+ if (Objects.isNull(compositionEntity.getQuestionnaireData()) ||
+ "".equals(compositionEntity.getQuestionnaireData())) {
compositionEntity.setVersion(newVersion);
updateNullQuestionnaire(compositionEntity, type);
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ValidationStructureHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ValidationStructureHealer.java
index f92fbd1730..58ba3b7c35 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ValidationStructureHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ValidationStructureHealer.java
@@ -9,6 +9,8 @@ import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.structure.Artifact;
import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
@@ -34,6 +36,7 @@ public class ValidationStructureHealer implements Healer {
VendorSoftwareProductInfoDaoFactory.getInstance().createInterface();
private static final OrchestrationTemplateDao orchestrationTemplateDao =
OrchestrationTemplateDaoFactory.getInstance().createInterface();
+ private static final Logger logger = LoggerFactory.getLogger(JsonUtil.class);
@Override
public Object heal(Map<String, Object> healingParams) throws Exception {
@@ -51,6 +54,7 @@ public class ValidationStructureHealer implements Healer {
JsonUtil.json2Object(orchestrationTemplate.getValidationData(), OldValidationStructureTree
.class);
} catch (Exception e){
+ logger.debug("",e);
return Optional.empty();
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VlmVersionHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VlmVersionHealer.java
index 6a82d8fa49..4accd790ab 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VlmVersionHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VlmVersionHealer.java
@@ -11,14 +11,12 @@ import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacadeFactory;
import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -55,6 +53,7 @@ public class VlmVersionHealer implements Healer {
vendorLicenseModel =
vendorLicenseFacade.getVendorLicenseModel(vspDetails.getVendorId(), null, user);
} catch (Exception e){
+ logger.debug("" + e);
logger.debug("No Vlm was found for Vsp " + vspDetails.getName());
return Optional.empty();
}
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VspQuestionnaireHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VspQuestionnaireHealer.java
index 78f2997660..0952a4c88f 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VspQuestionnaireHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/VspQuestionnaireHealer.java
@@ -23,9 +23,9 @@ package org.openecomp.sdc.healing.healers;
import org.openecomp.core.utilities.json.JsonSchemaDataGenerator;
import org.openecomp.sdc.common.utils.SdcCommon;
import org.openecomp.sdc.healing.interfaces.Healer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDao;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
@@ -44,6 +44,8 @@ public class VspQuestionnaireHealer implements Healer {
VendorSoftwareProductInfoDaoFactory.getInstance().createInterface();
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
public VspQuestionnaireHealer() {
}
@@ -80,6 +82,7 @@ public class VspQuestionnaireHealer implements Healer {
questionnaireData = new JsonSchemaDataGenerator(generatedSchema).generateData();
vspInfoDao.updateQuestionnaireData(vspId, version, questionnaireData);
}catch(Exception e){
+ log.debug("", e);
return Optional.empty();
}
mdcDataDebugMessage.debugExitMessage(null, null);