aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-04 18:46:01 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-04 18:09:33 +0000
commit2b959a7fcdbf82ec9534d4b860a6100643eb6447 (patch)
tree0caa5d8e15a064ca580b8aa9da5300040450f034 /openecomp-be/lib/openecomp-sdc-validation-lib
parent860f30050eac0e8e3846e5b74130206b9f610463 (diff)
Remove enter/exit debug #4
Change-Id: I99cef676015533d9cfe66f5a5371da49856500dc Issue-ID: SDC-875 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java8
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java19
6 files changed, 0 insertions, 136 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java
index c3c2ef2f6f..05f94df76b 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java
@@ -33,7 +33,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.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.Validator;
@@ -44,7 +43,6 @@ import java.util.Map;
import java.util.Set;
public class SharedResourceGuideLineValidator implements Validator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final Logger LOGGER = LoggerFactory.getLogger(
SharedResourceGuideLineValidator.class);
private static final ErrorMessageCode ERROR_CODE_SRG_1 = new ErrorMessageCode("SRG1");
@@ -78,7 +76,6 @@ public class SharedResourceGuideLineValidator implements Validator {
private Set<String> validateManifest(ManifestContent manifestContent,
GlobalValidationContext globalContext) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", SdcCommon.MANIFEST_NAME);
Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent);
if (baseFiles == null || baseFiles.isEmpty()) {
globalContext.addMessage(
@@ -101,7 +98,6 @@ public class SharedResourceGuideLineValidator implements Validator {
LoggerTragetServiceName.VALIDATE_BASE_FILE,
LoggerErrorDescription.MULTI_BASE_HEAT);
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", SdcCommon.MANIFEST_NAME);
return baseFiles;
}
@@ -129,19 +125,14 @@ public class SharedResourceGuideLineValidator implements Validator {
private void validateBaseFile(String fileName, Set<String> baseFiles,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
//if not base return
if (baseFiles == null || !baseFiles.contains(fileName)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
//if no resources exist return
if (heatOrchestrationTemplate.getResources() == null
|| heatOrchestrationTemplate.getResources().size() == 0) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
@@ -180,27 +171,19 @@ public class SharedResourceGuideLineValidator implements Validator {
LoggerTragetServiceName.VALIDATE_BASE_FILE,
LoggerErrorDescription.RESOURCE_NOT_DEFINED_AS_OUTPUT));
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateHeatVolumeFile(String fileName, Map<String, FileData.Type> fileTypeMap,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
//if not heat volume return
if (!fileTypeMap.get(fileName).equals(FileData.Type.HEAT_VOL)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
//if no resources exist return
if (heatOrchestrationTemplate.getResources() == null
|| heatOrchestrationTemplate.getResources().size() == 0) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
@@ -237,8 +220,6 @@ public class SharedResourceGuideLineValidator implements Validator {
LoggerTragetServiceName.VALIDATE_VOLUME_FILE,
LoggerErrorDescription.VOLUME_FILE_NOT_EXPOSED));
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java
index fbe05f07c7..28de94350c 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java
@@ -24,7 +24,6 @@ import org.openecomp.core.validation.types.GlobalValidationContext;
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
@@ -35,7 +34,6 @@ import java.util.Map;
public class ContrailServiceInstanceNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final String AVAILABILITY_ZONE = "availability_zone";
private static final ErrorMessageCode ERROR_CODE_NSI1 = new ErrorMessageCode("NSI1");
private static final ErrorMessageCode ERROR_CODE_NSI2 = new ErrorMessageCode("NSI2");
@@ -49,13 +47,8 @@ public class ContrailServiceInstanceNamingConventionValidator implements Resourc
private void validateAvailabilityZoneName(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String[] regexList = new String[]{"availability_zone_(\\d+)"};
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
@@ -90,7 +83,6 @@ public class ContrailServiceInstanceNamingConventionValidator implements Resourc
LoggerErrorDescription.MISSING_GET_PARAM);
}
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java
index 53defcd39a..f0c5011d9f 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java
@@ -27,7 +27,6 @@ import org.openecomp.core.validation.types.GlobalValidationContext;
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
@@ -43,7 +42,6 @@ import java.util.regex.Pattern;
public class ContrailServiceTemplateNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final ErrorMessageCode ERROR_CODE_NST1 = new ErrorMessageCode("NST1");
private static final ErrorMessageCode ERROR_CODE_NST2 = new ErrorMessageCode("NST2");
private static final ErrorMessageCode ERROR_CODE_NST3 = new ErrorMessageCode("NST3");
@@ -57,9 +55,6 @@ public class ContrailServiceTemplateNamingConventionValidator implements Resourc
private void validateServiceTemplateImageAndFlavor(String fileName,
Map.Entry<String, Resource> entry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(entry.getValue().getProperties())) {
return;
}
@@ -83,23 +78,16 @@ public class ContrailServiceTemplateNamingConventionValidator implements Resourc
validateServiceTemplatePropertiesValuesVmtypesAreIdentical(fileName, entry, globalContext,
propertiesMap);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateServiceTemplatePropertiesValuesVmtypesAreIdentical(String fileName,
Map.Entry<String, Resource> entry,
GlobalValidationContext globalContext,
Map<String, Object> propertiesMap) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Pair<String, String> vmTypeImagePair = new ImmutablePair<>("image_name", "\\_image\\_name");
Pair<String, String> vmTypeFlavorPair = new ImmutablePair<>("flavor", "\\_flavor\\_name");
validatePropertiesValuesVmtypesAreIdentical(Arrays.asList(vmTypeImagePair, vmTypeFlavorPair),
fileName, entry, propertiesMap, globalContext);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validatePropertiesValuesVmtypesAreIdentical(List<Pair> propertiesToMatch,
@@ -107,10 +95,6 @@ public class ContrailServiceTemplateNamingConventionValidator implements Resourc
Map.Entry<String, Resource> resourceEntry,
Map<String, Object> propertiesMap,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (CollectionUtils.isEmpty(propertiesToMatch)) {
return;
}
@@ -126,13 +110,10 @@ public class ContrailServiceTemplateNamingConventionValidator implements Resourc
handleFirstIteration(previousPropertyValueValue, currentPropVmType);
if (addWarningIfCurrentVmTypeIsDifferentFromPrevious(fileName, resourceEntry, globalContext,
previousPropertyValueValue, currentPropVmType)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private boolean addWarningIfCurrentVmTypeIsDifferentFromPrevious(String fileName,
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java
index a3821f2a21..c142ef4ec8 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java
@@ -26,7 +26,6 @@ import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
@@ -38,7 +37,6 @@ import java.util.List;
import java.util.Map;
public class NeutronPortNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final ErrorMessageCode ERROR_CODE_NNP1 = new ErrorMessageCode("NNP1");
private static final ErrorMessageCode ERROR_CODE_NNP2 = new ErrorMessageCode("NNP2");
private static final ErrorMessageCode ERROR_CODE_NNP3 = new ErrorMessageCode("NNP3");
@@ -56,11 +54,7 @@ public class NeutronPortNamingConventionValidator implements ResourceValidator {
private void validatePortNetworkNamingConvention(String fileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
String[] regexList = new String[]{".*_net_id", ".*_net_name", ".*_net_fqdn"};
@@ -81,18 +75,12 @@ public class NeutronPortNamingConventionValidator implements ResourceValidator {
.forEach(propertyEntry -> validateParamNamingConvention(fileName, entry.getKey(),
propertyEntry.getValue(), regexList,
Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES, globalContext)));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateFixedIpsNamingConvention(String fileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
@@ -103,8 +91,6 @@ public class NeutronPortNamingConventionValidator implements ResourceValidator {
.filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType())
.equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE))
.forEach(entry -> checkNeutronPortFixedIpsName(fileName, entry, globalContext));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void checkNeutronPortFixedIpsName(String fileName,
@@ -172,9 +158,6 @@ public class NeutronPortNamingConventionValidator implements ResourceValidator {
String[] regexList,
Messages message,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Object paramName;
if (propertyValue instanceof Map) {
paramName = ((Map) propertyValue).get("get_param");
@@ -200,7 +183,5 @@ public class NeutronPortNamingConventionValidator implements ResourceValidator {
LoggerTragetServiceName.VALIDATE_PORT_NETWORK_NAME,
LoggerErrorDescription.MISSING_GET_PARAM);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java
index fa87495b96..663f8fdccc 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java
@@ -31,7 +31,6 @@ import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
@@ -53,7 +52,6 @@ import java.util.TreeMap;
import static java.util.Objects.nonNull;
public class NovaServerNamingConventionGuideLineValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final String AVAILABILITY_ZONE = "availability_zone";
private static final String SERVER = "Server";
private static final ErrorMessageCode ERROR_CODE_NNS1 = new ErrorMessageCode("NNS1");
@@ -85,10 +83,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
private void validateHeatNovaResource(String fileName, String envFileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>();
//if no resources exist return
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
@@ -103,8 +97,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
.equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()))
.forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName,
entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerResourceType(String resourceId, String fileName,
@@ -113,26 +105,18 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
Map<String, String> uniqueResourcePortNetworkRole,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
validateNovaServerResourceMetaData(fileName, resourceId,
heatOrchestrationTemplate.getResources().get(resourceId), globalContext);
validateNovaServerResourceNetworkUniqueRole(fileName, resourceId, uniqueResourcePortNetworkRole,
heatOrchestrationTemplate, globalContext);
validateAvailabilityZoneName(fileName, resourceEntry, globalContext);
validateNovaServerNameImageAndFlavor(fileName, envFileName, resourceEntry, globalContext);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
@SuppressWarnings("unchecked")
private void validateNovaServerResourceMetaData(String fileName, String resourceId,
Resource resource,
GlobalValidationContext globalValidationContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Map<String, Object> novaServerProp = resource.getProperties();
Object novaServerPropMetadata;
if (MapUtils.isNotEmpty(novaServerProp)) {
@@ -172,19 +156,12 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerResourceNetworkUniqueRole(String fileName, String resourceId,
Map<String, String> uniqueResourcePortNetworkRole,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalValidationContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
-
Object propertyNetworkValue =
heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks");
if (propertyNetworkValue != null && propertyNetworkValue instanceof List) {
@@ -202,8 +179,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateUniqueResourcePortNetworkRole(String fileName, String resourceId,
@@ -293,14 +268,9 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
private void validateAvailabilityZoneName(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String[] regexList = new String[]{"availability_zone_(\\d+)"};
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
@@ -334,15 +304,11 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
LoggerErrorDescription.MISSING_GET_PARAM);
}
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerNameImageAndFlavor(String fileName, String envFileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String novaName =
validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, globalContext);
Map<String, String> legalNovaNamingConventionMap =
@@ -356,33 +322,21 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
validateNovaServerNameImageAndFlavorSync(fileName, resourceEntry,
legalNovaNamingConventionMap, globalContext);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private String validateNovaServerNamingConvention(String fileName, String envFileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return null;
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return checkIfNovaNameByGuidelines(fileName, envFileName, resourceEntry, globalContext);
}
private Map<String, String> validateImageAndFlavorFromNovaServer(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return null;
}
@@ -403,8 +357,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
imageAndFlavorLegalNames.put(imageOrFlavor.getKey(), imageOrFlavorName);
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return imageAndFlavorLegalNames;
}
@@ -572,9 +524,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
Map.Entry<String, Resource> resourceEntry,
Map<String, String> legalNovaNamingConventionNames,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
List<String> vmNames = new LinkedList<>();
for (Map.Entry<String, String> nameEntry : legalNovaNamingConventionNames.entrySet()) {
@@ -593,7 +542,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private String getVmName(String nameToGetVmNameFrom, String stringToGetIndexOf) {
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 925949bc69..cbbceabb62 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,7 +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.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
@@ -36,8 +35,6 @@ import java.util.regex.Pattern;
import static java.util.Objects.nonNull;
public class ValidationUtil {
-
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final Logger LOG = LoggerFactory.getLogger(ValidationUtil.class.getName());
private ValidationUtil(){}
@@ -125,9 +122,6 @@ public class ValidationUtil {
public static Environment validateEnvContent(String envFileName,
GlobalValidationContext globalContext) {
-
- mdcDataDebugMessage.debugEntryMessage("file", envFileName);
-
Environment envContent;
try {
Optional<InputStream> fileContent = globalContext.getFileContent(envFileName);
@@ -141,10 +135,8 @@ public class ValidationUtil {
}
} catch (Exception exception) {
LOG.debug("",exception);
- mdcDataDebugMessage.debugExitMessage("file", envFileName);
return null;
}
- mdcDataDebugMessage.debugExitMessage("file", envFileName);
return envContent;
}
@@ -153,9 +145,6 @@ public class ValidationUtil {
GlobalValidationContext globalContext,
String propertyName, Object nameValue,
String[] regexList) {
-
- mdcDataDebugMessage.debugEntryMessage("file", fileName);
-
String propertyValue = getWantedNameFromPropertyValueGetParam(nameValue);
if (nonNull(propertyValue) && !evalPattern(propertyValue, regexList)) {
globalContext.addMessage(
@@ -167,11 +156,8 @@ public class ValidationUtil {
resourceEntry.getKey()),
LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return true;
}
-
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return false;
}
@@ -212,9 +198,6 @@ public class ValidationUtil {
public static HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName,
GlobalValidationContext globalContext) {
-
- mdcDataDebugMessage.debugEntryMessage("file", fileName);
-
HeatOrchestrationTemplate heatOrchestrationTemplate;
try {
Optional<InputStream> fileContent = globalContext.getFileContent(fileName);
@@ -231,10 +214,8 @@ public class ValidationUtil {
, getParserExceptionReason(exception)),
LoggerTragetServiceName.VALIDATE_HEAT_FORMAT,
LoggerErrorDescription.INVALID_HEAT_FORMAT);
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return null;
}
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return heatOrchestrationTemplate;
}