summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java10
2 files changed, 6 insertions, 15 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
index 5013283c8f..76b63d5498 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
@@ -16,8 +16,6 @@ import org.openecomp.sdc.heat.services.HeatStructureUtil;
import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.types.LoggerErrorDescription;
-import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
import org.openecomp.sdc.validation.ValidationContext;
import org.openecomp.sdc.validation.Validator;
@@ -33,8 +31,8 @@ import java.util.Objects;
*/
public class ResourceBaseValidator implements Validator {
- protected Map<String, ImplementationConfiguration> resourceTypeToImpl = new HashMap<>();
- private static Logger logger = LoggerFactory.getLogger(ResourceBaseValidator.class);
+ protected final Map<String, ImplementationConfiguration> resourceTypeToImpl = new HashMap<>();
+ private static final Logger LOGGER = LoggerFactory.getLogger(ResourceBaseValidator.class);
private static final ErrorMessageCode ERROR_CODE_RBV_1 = new ErrorMessageCode("RBV1");
private static final ErrorMessageCode ERROR_CODE_RBV_2 = new ErrorMessageCode("RBV2");
@@ -56,7 +54,7 @@ public class ResourceBaseValidator implements Validator {
try {
manifestContent = ValidationUtil.validateManifest(globalContext);
} catch (Exception exception) {
- logger.debug("",exception);
+ LOGGER.debug("",exception);
return;
}
@@ -94,8 +92,7 @@ public class ResourceBaseValidator implements Validator {
globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
.getErrorWithParameters(ERROR_CODE_RBV_1,
Messages.INVALID_RESOURCE_TYPE.getErrorMessage(),"null",
- resourceEntry.getKey()), LoggerTragetServiceName.VALIDATE_RESOURCE_TYPE,
- LoggerErrorDescription.INVALID_RESOURCE_TYPE);
+ resourceEntry.getKey()));
} else {
ResourceValidator
resourceValidatorImpl = getResourceValidatorInstance(resourceType, resourceTypeToImpl);
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java
index db1d9eac88..a2826e4871 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java
@@ -18,8 +18,6 @@ import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.types.LoggerErrorDescription;
-import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.tosca.services.YamlUtil;
import java.io.InputStream;
@@ -147,9 +145,7 @@ public class ValidationUtil {
ErrorMessagesFormatBuilder.getErrorWithParameters(globalContext.getMessageCode(),
Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
getMessagePartAccordingToResourceType(resourceEntry), propertyName, propertyValue,
- resourceEntry.getKey()),
- LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
- LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+ resourceEntry.getKey()));
return true;
}
return false;
@@ -199,9 +195,7 @@ public class ValidationUtil {
globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
.getErrorWithParameters(globalContext.getMessageCode(),
Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage()
- , getParserExceptionReason(exception)),
- LoggerTragetServiceName.VALIDATE_HEAT_FORMAT,
- LoggerErrorDescription.INVALID_HEAT_FORMAT);
+ , getParserExceptionReason(exception)));
return null;
}
return heatOrchestrationTemplate;