aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-04 18:46:18 +0200
committervempo <vitaliy.emporopulo@amdocs.com>2018-01-04 18:46:18 +0200
commit2a98583ab8a211566ec8cfd7b70a014c682401c2 (patch)
tree7ea0971f3e63e6a396bbddae4526868e50a10e00 /openecomp-be/lib
parent355e929f93fd5280392c783de346684839a81148 (diff)
Remove enter/exit debug #6
Change-Id: Ic9d9ebfabc52c6d1bd785e6b0f9d1ecc177f996e Issue-ID: SDC-875 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java33
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java140
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java55
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationCinderVolumeAttachmentImpl.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationDefaultImpl.java6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java22
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java8
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java192
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java14
12 files changed, 0 insertions, 549 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
index 15e9ceeee7..4341899d8a 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
@@ -27,7 +27,6 @@ import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import java.util.Optional;
@@ -37,8 +36,6 @@ public class UniqueValueUtil {
private static final UniqueValueDao uniqueValueDao =
UniqueValueDaoFactory.getInstance().createInterface();
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
/**
* Create unique value.
*
@@ -46,16 +43,12 @@ public class UniqueValueUtil {
* @param uniqueCombination the unique combination
*/
public static void createUniqueValue(String type, String... uniqueCombination) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
Optional<String> value = formatValue(uniqueCombination);
if (!value.isPresent()) {
return;
}
validateUniqueValue(type, value.get(), uniqueCombination);
uniqueValueDao.create(new UniqueValueEntity(type, value.get()));
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -65,17 +58,11 @@ public class UniqueValueUtil {
* @param uniqueCombination the unique combination
*/
public static void deleteUniqueValue(String type, String... uniqueCombination) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Optional<String> value = formatValue(uniqueCombination);
if (!value.isPresent()) {
return;
}
uniqueValueDao.delete(new UniqueValueEntity(type, value.get()));
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -88,16 +75,10 @@ public class UniqueValueUtil {
*/
public static void updateUniqueValue(String type, String oldValue, String newValue,
String... uniqueContext) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (newValue == null || oldValue == null || !newValue.equalsIgnoreCase(oldValue)) {
createUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{newValue}));
deleteUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{oldValue}));
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -107,20 +88,14 @@ public class UniqueValueUtil {
* @param uniqueCombination the unique combination
*/
public static void validateUniqueValue(String type, String... uniqueCombination) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
Optional<String> value = formatValue(uniqueCombination);
if (!value.isPresent()) {
return;
}
validateUniqueValue(type, value.get(), uniqueCombination);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private static void validateUniqueValue(String type, String value, String... uniqueCombination) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (uniqueValueDao.get(new UniqueValueEntity(type, value)) != null) {
throw new CoreException(new ErrorCode.ErrorCodeBuilder()
.withCategory(ErrorCategory.APPLICATION)
@@ -128,15 +103,9 @@ public class UniqueValueUtil {
.withMessage(String.format(UNIQUE_VALUE_VIOLATION_MSG, type,
uniqueCombination[uniqueCombination.length - 1])).build());
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private static Optional<String> formatValue(String[] uniqueCombination) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (uniqueCombination == null || uniqueCombination.length == 0
|| uniqueCombination[uniqueCombination.length - 1] == null) {
return Optional.empty();
@@ -144,8 +113,6 @@ public class UniqueValueUtil {
uniqueCombination[uniqueCombination.length - 1] =
uniqueCombination[uniqueCombination.length - 1].toLowerCase();
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(CommonMethods.arrayToSeparatedString(uniqueCombination, '_'));
}
}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java
index 3749846626..607319906d 100644
--- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java
@@ -29,7 +29,6 @@ import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
import org.openecomp.sdc.heat.datatypes.model.PropertiesMapKeyTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import java.util.Collection;
@@ -41,7 +40,6 @@ import java.util.Set;
public class HeatTreeManagerUtil {
private static final String TYPE = "type";
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private HeatTreeManagerUtil() {
}
@@ -71,9 +69,6 @@ public class HeatTreeManagerUtil {
*/
public static Set<String> getNestedFiles(String filename, HeatOrchestrationTemplate hot,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
Set<String> nestedFileList = new HashSet<>();
hot.getResources().values().stream().filter(
resource -> resource.getType().endsWith(".yaml") || resource.getType().endsWith(".yml"))
@@ -81,8 +76,6 @@ public class HeatTreeManagerUtil {
Set<String> resourceDefNestedFiles = getResourceDefNestedFiles(hot);
nestedFileList.addAll(resourceDefNestedFiles);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return nestedFileList;
}
@@ -96,9 +89,6 @@ public class HeatTreeManagerUtil {
*/
public static Set<String> getArtifactFiles(String filename, HeatOrchestrationTemplate hot,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
Set<String> artifactSet = new HashSet<>();
Collection<Resource> resourcesValue =
hot.getResources() == null ? null : hot.getResources().values();
@@ -111,8 +101,6 @@ public class HeatTreeManagerUtil {
filename, globalContext);
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return artifactSet;
}
@@ -134,9 +122,6 @@ public class HeatTreeManagerUtil {
}
private static Set<String> getResourceDefNestedFiles(HeatOrchestrationTemplate hot) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
Set<String> resourceDefNestedFiles = new HashSet<>();
hot.getResources()
.entrySet().stream().filter(entry -> entry.getValue().getType()
@@ -148,8 +133,6 @@ public class HeatTreeManagerUtil {
.getType()))
.forEach(entry -> resourceDefNestedFiles.add(
getResourceDef( entry.getValue()).getType()));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return resourceDefNestedFiles;
}
@@ -161,9 +144,6 @@ public class HeatTreeManagerUtil {
*/
@SuppressWarnings("unchecked")
public static Resource getResourceDef( Resource resource) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
Resource resourceDef = null;
Map<String, Object> resourceDefValueMap = resource.getProperties() == null ? null
: (Map<String, Object>) resource.getProperties().get(
@@ -178,8 +158,6 @@ public class HeatTreeManagerUtil {
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return resourceDef;
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
index 0902af3eb0..990a9032c7 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
@@ -43,7 +43,6 @@ import org.openecomp.sdc.heat.services.tree.HeatTreeManager;
import org.openecomp.sdc.heat.services.tree.HeatTreeManagerUtil;
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;
@@ -106,7 +105,6 @@ public class HeatToToscaUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(HeatToToscaUtil.class);
public static final String FQ_NAME = "fq_name";
public static final String GET_PARAM = "get_param";
- protected static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final String FORWARDER = "forwarder";
private static final String GET_ATTR = "get_attr";
private static final String GET_RESOURCE = "get_resource";
@@ -119,7 +117,6 @@ public class HeatToToscaUtil {
*/
public static TranslatorOutput loadAndTranslateTemplateData(
FileContentHandler fileNameContentMap) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
HeatToToscaTranslator heatToToscaTranslator =
HeatToToscaTranslatorFactory.getInstance().createInterface();
@@ -144,8 +141,6 @@ public class HeatToToscaUtil {
try (InputStream structureFile = getHeatStructureTreeFile(fileNameContentMap)) {
heatToToscaTranslator.addExternalArtifacts(SdcCommon.HEAT_META, structureFile);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return heatToToscaTranslator.translate();
} catch (IOException e) {
// rethrow as a RuntimeException to keep the signature backward compatible
@@ -309,15 +304,9 @@ public class HeatToToscaUtil {
FileDataCollection fileDataCollection,
Map<String, FileData> filteredFiles, Set<String> referenced,
String nestedFileName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
referenced.add(nestedFileName);
fileDataCollection.addNestedFiles(filteredFiles.get(nestedFileName));
translationContext.getNestedHeatsFiles().add(nestedFileName);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private static Map<String, FileData> filterFileDataListByType(List<FileData> fileDataList,
@@ -341,16 +330,10 @@ public class HeatToToscaUtil {
*/
public static Optional<AttachedResourceId> extractAttachedResourceId(TranslateTo translateTo,
String propertyName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Object propertyValue = translateTo.getResource().getProperties().get(propertyName);
if (propertyValue == null) {
return Optional.empty();
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return extractAttachedResourceId(translateTo.getHeatFileName(),
translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(), propertyValue);
}
@@ -433,10 +416,6 @@ public class HeatToToscaUtil {
*/
public static Optional<String> getContrailAttachedHeatResourceId(
AttachedResourceId attachedResource) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (attachedResource == null) {
return Optional.empty();
}
@@ -448,8 +427,6 @@ public class HeatToToscaUtil {
if (attachedResource.isGetAttr()) {
return getResourceId(attachedResource.getEntityId());
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.empty();
}
@@ -460,8 +437,6 @@ public class HeatToToscaUtil {
* @return the optional
*/
public static Optional<AttachedPropertyVal> extractProperty(Object propertyValue) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
Object attachedPropertyVal;
if (Objects.isNull(propertyValue)) {
return Optional.empty();
@@ -490,8 +465,6 @@ public class HeatToToscaUtil {
} else {
attachedPropertyVal = propertyValue;
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.of(new AttachedPropertyVal(attachedPropertyVal, referenceType));
}
@@ -502,14 +475,10 @@ public class HeatToToscaUtil {
* @param propertyKey the property key
*/
public static void mapBoolean(NodeTemplate nodeTemplate, String propertyKey) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Object value = nodeTemplate.getProperties().get(propertyKey);
if (value != null && !(value instanceof Map)) {
nodeTemplate.getProperties().put(propertyKey, HeatBoolean.eval(value));
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
/**
@@ -551,8 +520,6 @@ public class HeatToToscaUtil {
* @return the boolean
*/
public static boolean isNestedResource(Resource resource) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
String resourceType = resource.getType();
if (resourceType.equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource())) {
@@ -569,8 +536,6 @@ public class HeatToToscaUtil {
} else if (isYamlFile(resourceType)) {
return true;
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return false;
}
@@ -583,7 +548,6 @@ public class HeatToToscaUtil {
* @return true if the resource represents a VFC and false otherwise.
*/
public static boolean isNestedVfcResource(Resource resource, TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
Optional<String> nestedHeatFileName = HeatToToscaUtil.getNestedHeatFileName(resource);
HeatOrchestrationTemplate nestedHeatOrchestrationTemplate = new YamlUtil()
.yamlToObject(context.getFileContent(nestedHeatFileName.get()),
@@ -596,7 +560,6 @@ public class HeatToToscaUtil {
}
}
}
- mdcDataDebugMessage.debugExitMessage(null, null);
return false;
}
@@ -607,8 +570,6 @@ public class HeatToToscaUtil {
* @return the nested heat file name
*/
public static Optional<String> getNestedHeatFileName(Resource resource) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (!isNestedResource(resource)) {
return Optional.empty();
}
@@ -620,8 +581,6 @@ public class HeatToToscaUtil {
String internalResourceType = (String) ((Map) resourceDef).get("type");
return Optional.of(internalResourceType);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.of(resourceType);
}
@@ -632,10 +591,6 @@ public class HeatToToscaUtil {
* @return the nested file
*/
public static Optional<String> getNestedFile(Resource resource) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (!isNestedResource(resource)) {
return Optional.empty();
}
@@ -643,11 +598,8 @@ public class HeatToToscaUtil {
if (resourceType.equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource())) {
Object resourceDef = resource.getProperties().get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME);
String internalResourceType = (String) ((Map) resourceDef).get("type");
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.of(internalResourceType);
} else {
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.of(resourceType);
}
}
@@ -666,10 +618,6 @@ public class HeatToToscaUtil {
*/
public static Resource getResource(HeatOrchestrationTemplate heatOrchestrationTemplate,
String resourceId, String heatFileName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Resource resource = heatOrchestrationTemplate.getResources().get(resourceId);
if (resource == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
@@ -678,8 +626,6 @@ public class HeatToToscaUtil {
throw new CoreException(
new ResourceNotFoundInHeatFileErrorBuilder(resourceId, heatFileName).build());
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return resource;
}
@@ -695,11 +641,6 @@ public class HeatToToscaUtil {
public static String getResourceType(String resourceId,
HeatOrchestrationTemplate heatOrchestrationTemplate,
String heatFileName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return HeatToToscaUtil.getResource(heatOrchestrationTemplate, resourceId, heatFileName)
.getType();
}
@@ -723,10 +664,6 @@ public class HeatToToscaUtil {
*/
public static Optional<String> extractContrailGetResourceAttachedHeatResourceId(
Object propertyValue) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (propertyValue instanceof Map) {
if (((Map) propertyValue).containsKey(GET_ATTR)) {
return getResourceId(((Map) propertyValue).get(GET_ATTR));
@@ -739,8 +676,6 @@ public class HeatToToscaUtil {
} else if (propertyValue instanceof List) {
return evaluateHeatResourceId((List) propertyValue);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.empty();
}
@@ -781,9 +716,6 @@ public class HeatToToscaUtil {
* @return the tosca service model
*/
public static ToscaServiceModel getToscaServiceModel(TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
- mdcDataDebugMessage.debugExitMessage(null, null);
-
Map<String, String> metadata = new HashMap<>();
metadata.put(ToscaConstants.ST_METADATA_TEMPLATE_NAME, Constants.MAIN_TEMPLATE_NAME);
return getToscaServiceModel(context, metadata);
@@ -799,8 +731,6 @@ public class HeatToToscaUtil {
public static ToscaServiceModel getToscaServiceModel(
TranslationContext context,
Map<String, String> entryDefinitionMetadata) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, ServiceTemplate> serviceTemplates =
new HashMap<>(context.getGlobalServiceTemplates());
Collection<ServiceTemplate> tmpServiceTemplates =
@@ -808,8 +738,6 @@ public class HeatToToscaUtil {
for (ServiceTemplate serviceTemplate : tmpServiceTemplates) {
ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates, serviceTemplate);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return new ToscaServiceModel(null, serviceTemplates,
ToscaUtil.getServiceTemplateFileName(entryDefinitionMetadata));
}
@@ -823,18 +751,11 @@ public class HeatToToscaUtil {
*/
public static Optional<ServiceTemplate> getServiceTemplateFromContext(
String serviceTemplateFileName, TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
for (ServiceTemplate serviceTemplate : context.getTranslatedServiceTemplates().values()) {
if (ToscaUtil.getServiceTemplateFileName(serviceTemplate).equals(serviceTemplateFileName)) {
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.of(serviceTemplate);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.empty();
}
@@ -846,19 +767,12 @@ public class HeatToToscaUtil {
*/
public static RequirementAssignment addLinkReqFromPortToNetwork(NodeTemplate portNodeTemplate,
String networkTranslatedId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
RequirementAssignment requirement = new RequirementAssignment();
requirement.setCapability(ToscaCapabilityType.NATIVE_NETWORK_LINKABLE);
requirement.setRelationship(ToscaRelationshipType.NATIVE_NETWORK_LINK_TO);
requirement.setNode(networkTranslatedId);
DataModelUtil.addRequirementAssignment(portNodeTemplate,
ToscaConstants.LINK_REQUIREMENT_ID, requirement);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
-
return requirement;
}
@@ -870,10 +784,6 @@ public class HeatToToscaUtil {
*/
public static void addBindingReqFromSubInterfaceToInterface(
NodeTemplate subInterfaceNodeTemplate, String interfaceTranslatedId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
RequirementAssignment requirement = new RequirementAssignment();
requirement.setCapability(ToscaCapabilityType.NATIVE_NETWORK_BINDABLE);
requirement.setRelationship(ToscaRelationshipType.NATIVE_NETWORK_BINDS_TO);
@@ -881,8 +791,6 @@ public class HeatToToscaUtil {
DataModelUtil
.addRequirementAssignment(subInterfaceNodeTemplate,
ToscaConstants.BINDING_REQUIREMENT_ID, requirement);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
/**
@@ -1015,13 +923,10 @@ public class HeatToToscaUtil {
private Map<String, PropertyDefinition> manageSubstitutionNodeTypeProperties(
ServiceTemplate substitutionServiceTemplate) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, PropertyDefinition> substitutionNodeTypeProperties = new HashMap<>();
Map<String, ParameterDefinition> properties =
substitutionServiceTemplate.getTopology_template().getInputs();
if (properties == null) {
- mdcDataDebugMessage.debugExitMessage(null, null);
return null;
}
@@ -1041,22 +946,15 @@ public class HeatToToscaUtil {
propertyDefinition.setStatus(parameterDefinition.getStatus());
substitutionNodeTypeProperties.put(toscaPropertyName, propertyDefinition);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return substitutionNodeTypeProperties;
}
private Map<String, AttributeDefinition> manageSubstitutionNodeTypeAttributes(
ServiceTemplate substitutionServiceTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, AttributeDefinition> substitutionNodeTypeAttributes = new HashMap<>();
Map<String, ParameterDefinition> attributes =
substitutionServiceTemplate.getTopology_template().getOutputs();
if (attributes == null) {
- mdcDataDebugMessage.debugExitMessage(null, null);
return null;
}
AttributeDefinition attributeDefinition;
@@ -1078,8 +976,6 @@ public class HeatToToscaUtil {
attributeDefinition.setStatus(parameterDefinition.getStatus());
substitutionNodeTypeAttributes.put(toscaAttributeName, attributeDefinition);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return substitutionNodeTypeAttributes;
}
@@ -1199,8 +1095,6 @@ public class HeatToToscaUtil {
TranslateTo translateTo,
Template template,
String templateName) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, Object> substitutionProperties = new HashMap<>();
Map<String, Object> heatProperties = translateTo.getResource().getProperties();
if (Objects.nonNull(heatProperties)) {
@@ -1213,24 +1107,16 @@ public class HeatToToscaUtil {
substitutionProperties.put(entry.getKey(), property);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return addAbstractSubstitutionProperty(templateName, substitutionProperties);
}
private static Map<String, Object> addAbstractSubstitutionProperty(String templateName,
Map<String, Object>
substitutionProperties) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, Object> innerProps = new HashMap<>();
innerProps.put(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME,
ToscaUtil.getServiceTemplateFileName(templateName));
substitutionProperties.put(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME, innerProps);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return substitutionProperties;
}
@@ -1238,8 +1124,6 @@ public class HeatToToscaUtil {
getSubstitutionNodeTypeExposedConnectionPoints(NodeType substitutionNodeType,
ServiceTemplate substitutionServiceTemplate,
TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Map<String, NodeTemplate> nodeTemplates =
substitutionServiceTemplate.getTopology_template().getNode_templates();
String nodeTemplateId;
@@ -1292,8 +1176,6 @@ public class HeatToToscaUtil {
toscaAnalyzerService.calculateExposedCapabilities(nodeTypeCapabilitiesDefinition,
fullFilledRequirementsDefinition);
DataModelUtil.addNodeTypeCapabilitiesDef(substitutionNodeType, exposedCapabilitiesDefinition);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return substitutionMapping;
}
@@ -1301,8 +1183,6 @@ public class HeatToToscaUtil {
Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
Map<String, List<String>> capabilitySubstitutionMapping, String type, String templateName,
ServiceTemplate serviceTemplate, TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
NodeType flatNodeType =
getNodeTypeWithFlatHierarchy(type, serviceTemplate, context);
@@ -1315,7 +1195,6 @@ public class HeatToToscaUtil {
addCapabilityToSubMapping(
templateName, capabilityNodeEntry, nodeTypeCapabilitiesDefinition, capabilitySubstitutionMapping));
}
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private static boolean shouldCapabilityNeedsToBeAdded(String capabilityKey) {
@@ -1342,7 +1221,6 @@ public class HeatToToscaUtil {
ServiceTemplate serviceTemplate,
Map<String, List<String>> requirementSubstitutionMapping,
TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
List<Map<String, RequirementDefinition>> requirementList = new ArrayList<>();
NodeType flatNodeType = getNodeTypeWithFlatHierarchy(type, serviceTemplate, context);
List<String> requirementMapping;
@@ -1374,8 +1252,6 @@ public class HeatToToscaUtil {
}
}
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return requirementList;
}
@@ -1445,20 +1321,12 @@ public class HeatToToscaUtil {
public static ToscaServiceModel createToscaServiceModel(ServiceTemplate
entryDefinitionServiceTemplate,
TranslationContext translationContext) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return new ToscaServiceModel(getCsarArtifactFiles(translationContext),
getServiceTemplates(translationContext),
ToscaUtil.getServiceTemplateFileName(entryDefinitionServiceTemplate));
}
private static FileContentHandler getCsarArtifactFiles(TranslationContext translationContext) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
FileContentHandler artifactFiles = new FileContentHandler();
artifactFiles.setFiles(translationContext.getFiles());
artifactFiles.setFiles(translationContext.getExternalArtifacts());
@@ -1471,18 +1339,12 @@ public class HeatToToscaUtil {
byte[] validationStructureFile =
FileUtils.convertToBytes(validationStructureList, FileUtils.FileExtension.JSON);
artifactFiles.addFile("HEAT.meta", validationStructureFile);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return artifactFiles;
}
private static Map<String, ServiceTemplate> getServiceTemplates(TranslationContext
translationContext) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
List<ServiceTemplate> serviceTemplates = new ArrayList<>();
serviceTemplates.addAll(GlobalTypesGenerator
.getGlobalTypesServiceTemplate(OnboardingTypesEnum.ZIP).values());
@@ -1492,8 +1354,6 @@ public class HeatToToscaUtil {
for (ServiceTemplate template : serviceTemplates) {
serviceTemplatesMap.put(ToscaUtil.getServiceTemplateFileName(template), template);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return serviceTemplatesMap;
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
index 012be05257..addbd74d66 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
@@ -33,7 +33,6 @@ import org.openecomp.sdc.heat.datatypes.model.Output;
import org.openecomp.sdc.heat.datatypes.model.Resource;
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;
@@ -71,8 +70,6 @@ import java.util.Set;
public class TranslationService {
protected static Logger logger = (Logger) LoggerFactory.getLogger(TranslationService.class);
- protected static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
/**
* Gets types to process by translator.
*
@@ -92,8 +89,6 @@ public class TranslationService {
* @return the translator output
*/
public TranslatorOutput translateHeatFiles(TranslationContext translationContext) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
ServiceTemplate mainServiceTemplate = createMainServiceTemplate(translationContext);
List<FileData> fileDataList = translationContext.getManifest().getContent().getData();
FileDataCollection fileDataCollection = HeatToToscaUtil.getFileCollectionsByFilter(fileDataList,
@@ -119,16 +114,10 @@ public class TranslationService {
translatorOutput.setNonUnifiedToscaServiceModel(
ToscaServiceModel.getClonedServiceModel(toscaServiceModel));
translatorOutput.setToscaServiceModel(toscaServiceModel);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return translatorOutput;
}
private ServiceTemplate createMainServiceTemplate(TranslationContext translationContext) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
ServiceTemplate mainServiceTemplate = new ServiceTemplate();
translationContext.getTranslatedServiceTemplates()
.put(Constants.MAIN_TEMPLATE_NAME, mainServiceTemplate);
@@ -138,8 +127,6 @@ public class TranslationService {
mainServiceTemplate.setMetadata(templateMetadata);
mainServiceTemplate.setTopology_template(new TopologyTemplate());
mainServiceTemplate.setImports(GlobalTypesGenerator.getGlobalTypesImportList());
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return mainServiceTemplate;
}
@@ -152,10 +139,6 @@ public class TranslationService {
*/
public void translateHeatFile(ServiceTemplate serviceTemplate, FileData heatFileData,
TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
String heatFileName = heatFileData.getFile();
HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil()
.yamlToObject(context.getFileContent(heatFileName), HeatOrchestrationTemplate.class);
@@ -172,8 +155,6 @@ public class TranslationService {
heatFileData.getData().stream().filter(data -> data.getType() == FileData.Type.HEAT_VOL)
.forEach(data -> translateHeatFile(serviceTemplate, data, context));
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void handleHeatPseudoParam(String heatFileName, ServiceTemplate serviceTemplate,
@@ -197,10 +178,6 @@ public class TranslationService {
private void createHeatStackGroup(ServiceTemplate serviceTemplate, FileData heatFileData,
HeatOrchestrationTemplate heatOrchestrationTemplate,
TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
final String fileName = heatFileData.getFile();
final String heatStackGroupId = FileUtils.getFileWithoutExtention(fileName) + "_group";
@@ -223,8 +200,6 @@ public class TranslationService {
groupDefinition.getMembers().addAll(heatStackGroupMembersIds);
DataModelUtil
.addGroupDefinitionToTopologyTemplate(serviceTemplate, heatStackGroupId, groupDefinition);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private Set<String> getHeatStackGroupMembers(String heatFileName,
@@ -267,10 +242,6 @@ public class TranslationService {
HeatOrchestrationTemplate heatOrchestrationTemplate,
FileData heatFileData, TranslationContext context,
String heatFileName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (heatOrchestrationTemplate.getParameters() == null) {
return;
}
@@ -300,18 +271,12 @@ public class TranslationService {
} else {
inputs.putAll(parameterDefinitionMap);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void translateOutputParameters(ServiceTemplate serviceTemplate,
HeatOrchestrationTemplate heatOrchestrationTemplate,
FileData heatFileData, String heatFileName,
TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (heatOrchestrationTemplate.getOutputs() == null) {
return;
}
@@ -329,17 +294,11 @@ public class TranslationService {
updateSharedResources(serviceTemplate, heatFileName, heatOrchestrationTemplate,
heatOrchestrationTemplate.getOutputs(), context);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void updateSharedResources(ServiceTemplate serviceTemplate, String heatFileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
Map<String, Output> outputs, TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
for (Map.Entry<String, Output> parameter : outputs.entrySet()) {
Optional<AttachedResourceId> attachedSharedResourceId = HeatToToscaUtil
.extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context,
@@ -370,30 +329,18 @@ public class TranslationService {
&& serviceTemplate.getTopology_template().getOutputs().size() == 0) {
serviceTemplate.getTopology_template().setOutputs(null);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void updateSharedResource(ServiceTemplate serviceTemplate, TranslationContext context,
Map.Entry<String, Output> paramName,
String sharedTranslatedResourceId, Resource resource) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
context.addHeatSharedResourcesByParam(paramName.getKey(), sharedTranslatedResourceId, resource);
serviceTemplate.getTopology_template().getOutputs().remove(paramName.getKey());
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void translateResources(String heatFileName, ServiceTemplate serviceTemplate,
HeatOrchestrationTemplate heatOrchestrationTemplate,
TranslationContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if(MapUtils.isEmpty(heatOrchestrationTemplate.getResources())){
return;
}
@@ -411,8 +358,6 @@ public class TranslationService {
.translateResource(heatFileName, serviceTemplate, heatOrchestrationTemplate, resource,
resourceId, context);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private Environment getHeatEnvFile(FileData heatFileData, TranslationContext context) {
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
index e79aaaeb9b..cfab3fc022 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
@@ -33,7 +33,6 @@ import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.heat.services.HeatConstants;
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.ToscaFunctions;
import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
@@ -98,7 +97,6 @@ public class UnifiedCompositionService {
protected static Logger logger =
(Logger) LoggerFactory.getLogger(UnifiedCompositionService.class);
- protected static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static Map<String, ImplementationConfiguration> unifiedCompositionImplMap;
static {
@@ -142,7 +140,6 @@ public class UnifiedCompositionService {
ServiceTemplate nestedServiceTemplate,
List<UnifiedCompositionData> unifiedCompositionDataList,
UnifiedCompositionMode mode, TranslationContext context) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
Optional<UnifiedComposition> unifiedCompositionInstance = getUnifiedCompositionInstance(mode);
if (!unifiedCompositionInstance.isPresent()) {
return;
@@ -150,7 +147,6 @@ public class UnifiedCompositionService {
unifiedCompositionInstance.get()
.createUnifiedComposition(serviceTemplate, nestedServiceTemplate,
unifiedCompositionDataList, context);
- mdcDataDebugMessage.debugExitMessage(null, null);
}
/**
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationCinderVolumeAttachmentImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationCinderVolumeAttachmentImpl.java
index ea8f78a20a..adfaf40772 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationCinderVolumeAttachmentImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationCinderVolumeAttachmentImpl.java
@@ -64,10 +64,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
@Override
protected void translate(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
RelationshipTemplate relationTemplate = new RelationshipTemplate();
relationTemplate.setType(ToscaRelationshipType.CINDER_VOLUME_ATTACHES_TO);
String relationshipTemplateId = translateTo.getTranslatedId();
@@ -92,8 +88,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
+ "' include 'instance_uuid' property without 'get_resource' function, therefore this "
+ "resource will be ignored in TOSCA translation.");
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
@Override
@@ -107,10 +101,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
}
private AttachedResourceId getAttachedResourceId(TranslateTo translateTo, String propertyName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Optional<AttachedResourceId> attachedResourceId =
HeatToToscaUtil.extractAttachedResourceId(translateTo, propertyName);
if (!attachedResourceId.isPresent()) {
@@ -120,18 +110,12 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
LoggerErrorDescription.MISSING_MANDATORY_PROPERTY);
throw new CoreException(new MissingMandatoryPropertyErrorBuilder(propertyName).build());
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return attachedResourceId.get();
}
private void handleNovaGetResource(TranslateTo translateTo, RelationshipTemplate relationTemplate,
String relationshipTemplateId, String heatFileName,
AttachedResourceId volResourceId, String novaResourceId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
RequirementAssignment requirement = new RequirementAssignment();
requirement.setCapability(toscaCapabilityAttachment);
if (volResourceId.isGetResource()) {
@@ -145,8 +129,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
+ " The connection to the volume is ignored. "
+ "Supported types are: "
+ HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return;
}
requirement.setNode((String) volResourceId.getTranslatedId());
@@ -169,8 +151,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
+ " The connection to the volume is ignored. "
+ "Supported types are: "
+ HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return;
}
requirement.setNode(
@@ -195,8 +175,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
+ " The connection to the nova server is ignored. "
+ "Supported types are: "
+ HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource());
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return;
}
Optional<String> translatedNovaServerId =
@@ -215,17 +193,11 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
novaServerNodeTemplate.getType(), translatedNovaServerId.get(), ToscaConstants
.LOCAL_STORAGE_REQUIREMENT_ID, requirement);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void handleUnsharedVolume(TranslateTo translateTo, RelationshipTemplate relationTemplate,
String relationshipTemplateId, String heatFileName,
RequirementAssignment requirement, String volumeResourceId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
List<FileData> allFilesData = translateTo.getContext().getManifest().getContent().getData();
Optional<FileData> fileData = HeatToToscaUtil.getFileData(heatFileName, allFilesData);
if (fileData.isPresent()) {
@@ -237,8 +209,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
resourceFileDataAndIDs -> addRelationshipToServiceTemplate(translateTo, relationTemplate,
relationshipTemplateId, requirement, resourceFileDataAndIDs));
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private boolean isHeatFileNested(TranslateTo translateTo, String heatFileName) {
@@ -250,10 +220,6 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
String relationshipTemplateId,
RequirementAssignment requirement,
ResourceFileDataAndIDs resourceFileDataAndIDs) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
String translatedId = resourceFileDataAndIDs.getTranslatedResourceId();
String toscaVolIdPropName =
HeatToToscaUtil.getToscaPropertyName(translateTo, HeatConstants.VOL_ID_PROPERTY_NAME);
@@ -262,7 +228,5 @@ public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTrans
requirement.setRelationship(relationshipTemplateId);
DataModelUtil.addRelationshipTemplate(translateTo.getServiceTemplate(), relationshipTemplateId,
relationTemplate);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
index 1736bbef96..313d98ad56 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
@@ -51,26 +51,16 @@ public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTransl
@Override
protected void translate(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (new ContrailV2VirtualMachineInterfaceHelper().isVlanSubInterfaceResource(translateTo
.getResource())) {
translateVlanSubInterfaceResource(translateTo);
} else {
translateVirtualMachineInterfaceResource(translateTo);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void translateVirtualMachineInterfaceResource(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
NodeTemplate nodeTemplate = new NodeTemplate();
nodeTemplate.setType(ToscaNodeType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE);
nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
@@ -91,8 +81,6 @@ public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTransl
.connectVmiToNetwork(this, translateTo, nodeTemplate);
DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
nodeTemplate);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void handleVmiMacAddressesInProperties(TranslateTo translateTo,
@@ -127,12 +115,7 @@ public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTransl
}
private void translateVlanSubInterfaceResource(TranslateTo translateTo) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
new ResourceTranslationContrailV2VlanSubInterfaceImpl().translate(translateTo);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationDefaultImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationDefaultImpl.java
index 15a3c178b9..1d6fb124c2 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationDefaultImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationDefaultImpl.java
@@ -29,16 +29,10 @@ public class ResourceTranslationDefaultImpl extends ResourceTranslationBase {
@Override
public void translate(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
//no translation is needed, this default is used for unsupported resources
logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ translateTo.getResource().getType()
+ "' is not supported, will be ignored in TOSCA translation");
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
@Override
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
index 5f8aead6e5..258d3321bc 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
@@ -54,8 +54,6 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
@Override
public void translate(TranslateTo translateTo) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Optional<AttachedResourceId> subnetNetwork = getAttachedNetworkResource(translateTo);
if (!subnetNetwork.isPresent() || !subnetNetwork.get().isGetResource()) {
@@ -103,16 +101,10 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
subNetMap.put(translateTo.getResourceId(), properties);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
@Override
protected String generateTranslatedId(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Optional<AttachedResourceId> subnetNetwork = getAttachedNetworkResource(translateTo);
if (!subnetNetwork.isPresent() || !subnetNetwork.get().isGetResource()) {
@@ -120,18 +112,12 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
+ translateTo.getResource().getType()
+ "' include 'network_id/'network'' property without 'get_resource' function, therefore"
+ " this resource will be ignored in TOSCA translation.");
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return (String) subnetNetwork.get().getTranslatedId();
}
private void handleDhcpProperty(TranslateTo translateTo, NodeTemplate networkNodeTemplate) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Object dhcpEnabled =
networkNodeTemplate.getProperties().get(ToscaConstants.DHCP_ENABLED_PROPERTY_NAME);
if (dhcpEnabled instanceof Map) {
@@ -167,15 +153,9 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
}
}
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private Optional<AttachedResourceId> getAttachedNetworkResource(TranslateTo translateTo) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
Optional<AttachedResourceId> subnetNetwork = Optional.empty();
Optional<AttachedResourceId> attachedNetworkId =
HeatToToscaUtil.extractAttachedResourceId(translateTo, "network_id");
@@ -195,8 +175,6 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
} else {
subnetNetwork = attachedNetworkId;
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return subnetNetwork;
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
index 347d328193..18baebfcae 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
@@ -26,7 +26,6 @@ import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
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;
@@ -75,7 +74,6 @@ import java.util.stream.Collectors;
public class VersioningManagerImpl implements VersioningManager {
private static final Logger LOGGER = LoggerFactory.getLogger(VersioningManagerImpl.class);
private static final Version INITIAL_ACTIVE_VERSION = new Version(0, 0);
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final Map<String, Set<VersionableEntityMetadata>> VERSIONABLE_ENTITIES =
new HashMap<>();
@@ -128,10 +126,6 @@ public class VersioningManagerImpl implements VersioningManager {
Version latestFinalVersion,
Set<Version> viewableVersions,
VersionableEntityAction action, String user) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("entity Id", entityId);
-
Version activeVersion;
if (action == VersionableEntityAction.Write) {
@@ -180,8 +174,6 @@ public class VersioningManagerImpl implements VersioningManager {
versionInfo.getViewableVersions().add(candidate.getVersion());
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("entity Id", entityId);
return versionInfo;
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index 04df2ae587..cebbaef602 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -27,7 +27,6 @@ import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
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;
@@ -83,8 +82,6 @@ public class DataModelUtil {
/**
* Add substitution mapping.
*/
-
- private static final MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final Logger logger = LoggerFactory.getLogger(DataModelUtil.class);
private static final String SERVICE_TEMPLATE = "Service Template";
private static final String NODE_TYPE = "Node Type";
@@ -97,8 +94,6 @@ public class DataModelUtil {
*/
public static void addSubstitutionMapping(ServiceTemplate serviceTemplate,
SubstitutionMapping substitutionMapping) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -112,8 +107,6 @@ public class DataModelUtil {
serviceTemplate.setTopology_template(new TopologyTemplate());
}
serviceTemplate.getTopology_template().setSubstitution_mappings(substitutionMapping);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
public static List<String> getDirectives(NodeTemplate nodeTemplate) {
@@ -135,10 +128,6 @@ public class DataModelUtil {
public static void addSubstitutionMappingReq(ServiceTemplate serviceTemplate,
String substitutionMappingRequirementId,
List<String> substitutionMappingRequirementList) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -162,8 +151,6 @@ public class DataModelUtil {
serviceTemplate.getTopology_template().getSubstitution_mappings().getRequirements()
.put(substitutionMappingRequirementId, substitutionMappingRequirementList);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -176,10 +163,6 @@ public class DataModelUtil {
public static void addSubstitutionMappingCapability(ServiceTemplate serviceTemplate,
String substitutionMappingCapabilityId,
List<String> substitutionMappingCapabilityList) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -203,8 +186,6 @@ public class DataModelUtil {
serviceTemplate.getTopology_template().getSubstitution_mappings().getCapabilities()
.putIfAbsent(substitutionMappingCapabilityId, substitutionMappingCapabilityList);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
public static Map<String, NodeTemplate> getNodeTemplates(ServiceTemplate serviceTemplate) {
@@ -226,10 +207,6 @@ public class DataModelUtil {
*/
public static void addNodeTemplate(ServiceTemplate serviceTemplate, String nodeTemplateId,
NodeTemplate nodeTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -246,9 +223,6 @@ public class DataModelUtil {
topologyTemplate.setNode_templates(new HashMap<>());
}
topologyTemplate.getNode_templates().put(nodeTemplateId, nodeTemplate);
-
- mdcDataDebugMessage.debugExitMessage(null);
-
}
/**
@@ -259,8 +233,6 @@ public class DataModelUtil {
*/
public static void addNodeTypeCapabilitiesDef(NodeType nodeType,
Map<String, CapabilityDefinition> capabilities) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (MapUtils.isEmpty(capabilities) || capabilities.entrySet().isEmpty()) {
return;
}
@@ -279,8 +251,6 @@ public class DataModelUtil {
for (Map.Entry<String, CapabilityDefinition> entry : capabilities.entrySet()) {
nodeType.getCapabilities().put(entry.getKey(), entry.getValue());
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -292,10 +262,6 @@ public class DataModelUtil {
*/
public static void addPolicyDefinition(ServiceTemplate serviceTemplate, String policyId,
PolicyDefinition policyDefinition) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -313,8 +279,6 @@ public class DataModelUtil {
topologyTemplate.setPolicies(new HashMap<>());
}
topologyTemplate.getPolicies().put(policyId, policyDefinition);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -326,10 +290,6 @@ public class DataModelUtil {
*/
public static void addNodeType(ServiceTemplate serviceTemplate, String nodeTypeId,
NodeType nodeType) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -341,8 +301,6 @@ public class DataModelUtil {
serviceTemplate.setNode_types(new HashMap<>());
}
serviceTemplate.getNode_types().put(nodeTypeId, nodeType);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
public static void removeNodeType(ServiceTemplate serviceTemplate,
@@ -358,8 +316,6 @@ public class DataModelUtil {
serviceTemplate.setNode_types(new HashMap<>());
}
serviceTemplate.getNode_types().remove(nodeTypeId);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -372,10 +328,6 @@ public class DataModelUtil {
public static void addRelationshipTemplate(ServiceTemplate serviceTemplate,
String relationshipTemplateId,
RelationshipTemplate relationshipTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -392,8 +344,6 @@ public class DataModelUtil {
}
serviceTemplate.getTopology_template().getRelationship_templates()
.put(relationshipTemplateId, relationshipTemplate);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -405,10 +355,6 @@ public class DataModelUtil {
*/
public static void addRequirementAssignment(NodeTemplate nodeTemplate, String requirementId,
RequirementAssignment requirementAssignment) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (nodeTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -430,8 +376,6 @@ public class DataModelUtil {
Map<String, RequirementAssignment> requirement = new HashMap<>();
requirement.put(requirementId, requirementAssignment);
nodeTemplate.getRequirements().add(requirement);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -443,16 +387,11 @@ public class DataModelUtil {
*/
public static NodeTemplate getNodeTemplate(ServiceTemplate serviceTemplate,
String nodeTemplateId) {
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null
|| serviceTemplate.getTopology_template() == null
|| serviceTemplate.getTopology_template().getNode_templates() == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId);
}
@@ -464,14 +403,9 @@ public class DataModelUtil {
* @return the node type
*/
public static NodeType getNodeType(ServiceTemplate serviceTemplate, String nodeTypeId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
if (serviceTemplate == null || serviceTemplate.getNode_types() == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return serviceTemplate.getNode_types().get(nodeTypeId);
}
@@ -485,10 +419,6 @@ public class DataModelUtil {
public static Optional<RequirementDefinition> getRequirementDefinition(
NodeType nodeType,
String requirementDefinitionId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (nodeType == null || nodeType.getRequirements() == null || requirementDefinitionId == null) {
return Optional.empty();
}
@@ -497,8 +427,6 @@ public class DataModelUtil {
return Optional.of(reqMap.get(requirementDefinitionId));
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.empty();
}
@@ -511,19 +439,15 @@ public class DataModelUtil {
public static Optional<RequirementDefinition> getRequirementDefinition(
List<Map<String, RequirementDefinition>> requirementsDefinitionList,
String requirementKey) {
- mdcDataDebugMessage.debugEntryMessage(null);
if (CollectionUtils.isEmpty(requirementsDefinitionList)) {
return Optional.empty();
}
for (Map<String, RequirementDefinition> requirementMap : requirementsDefinitionList) {
if (requirementMap.containsKey(requirementKey)) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(requirementMap.get(requirementKey));
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.empty();
}
@@ -537,15 +461,9 @@ public class DataModelUtil {
public static Optional<CapabilityDefinition> getCapabilityDefinition(
NodeType nodeType,
String capabilityDefinitionId) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (nodeType == null || nodeType.getCapabilities() == null || capabilityDefinitionId == null) {
return Optional.empty();
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.ofNullable(nodeType.getCapabilities().get(capabilityDefinitionId));
}
@@ -558,10 +476,6 @@ public class DataModelUtil {
*/
public static void addGroupDefinitionToTopologyTemplate(ServiceTemplate serviceTemplate,
String groupName, GroupDefinition group) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -585,7 +499,6 @@ public class DataModelUtil {
}
serviceTemplate.getTopology_template().getGroups().put(groupName, group);
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -607,10 +520,6 @@ public class DataModelUtil {
Status status,
EntrySchema entrySchema,
Object defaultVal) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
ParameterDefinition paramDef = new ParameterDefinition();
paramDef.setType(type);
paramDef.setDescription(description);
@@ -622,8 +531,6 @@ public class DataModelUtil {
}
paramDef.setEntry_schema(entrySchema == null ? null : entrySchema.clone());
paramDef.set_default(defaultVal);
-
- mdcDataDebugMessage.debugExitMessage(null);
return paramDef;
}
@@ -638,10 +545,6 @@ public class DataModelUtil {
*/
public static RequirementDefinition createRequirement(String capability, String node,
String relationship, Object[] occurrences) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
RequirementDefinition requirementDefinition = new RequirementDefinition();
requirementDefinition.setCapability(capability);
requirementDefinition.setNode(node);
@@ -649,8 +552,6 @@ public class DataModelUtil {
if (occurrences != null) {
requirementDefinition.setOccurrences(occurrences);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return requirementDefinition;
}
@@ -664,10 +565,6 @@ public class DataModelUtil {
*/
public static EntrySchema createEntrySchema(String type, String description,
List<Constraint> constraints) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.isNull(type) && Objects.isNull(description) &&
CollectionUtils.isEmpty(constraints)) {
return null;
@@ -677,8 +574,6 @@ public class DataModelUtil {
entrySchema.setType(type);
entrySchema.setDescription(description);
entrySchema.setConstraints(constraints);
-
- mdcDataDebugMessage.debugExitMessage(null);
return entrySchema;
}
@@ -693,10 +588,6 @@ public class DataModelUtil {
public static Map createGetInputPropertyValueFromListParameter(String inputPropertyListName,
int indexInTheList,
String... nestedPropertyName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
List propertyList = new ArrayList<>();
propertyList.add(inputPropertyListName);
propertyList.add(indexInTheList);
@@ -705,8 +596,6 @@ public class DataModelUtil {
}
Map getInputProperty = new HashMap<>();
getInputProperty.put(ToscaFunctions.GET_INPUT.getDisplayName(), propertyList);
-
- mdcDataDebugMessage.debugExitMessage(null);
return getInputProperty;
}
@@ -718,10 +607,6 @@ public class DataModelUtil {
*/
public static ParameterDefinitionExt convertPropertyDefToParameterDef(
PropertyDefinition propertyDefinition) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (propertyDefinition == null) {
return null;
}
@@ -737,8 +622,6 @@ public class DataModelUtil {
: propertyDefinition.getEntry_schema().clone());
parameterDefinition.setHidden(false);
parameterDefinition.setImmutable(false);
-
- mdcDataDebugMessage.debugExitMessage(null);
return parameterDefinition;
}
@@ -751,18 +634,12 @@ public class DataModelUtil {
*/
public static ParameterDefinitionExt convertAttributeDefToParameterDef(
AttributeDefinition attributeDefinition, Map<String, List> outputValue) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (attributeDefinition == null) {
return null;
}
ParameterDefinitionExt parameterDefinition = new ParameterDefinitionExt();
parameterDefinition.setDescription(attributeDefinition.getDescription());
parameterDefinition.setValue(outputValue);
-
- mdcDataDebugMessage.debugExitMessage(null);
return parameterDefinition;
}
@@ -781,10 +658,6 @@ public class DataModelUtil {
public static void addInputParameterToTopologyTemplate(ServiceTemplate serviceTemplate,
String parameterDefinitionId,
ParameterDefinition parameterDefinition) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.isNull(serviceTemplate)) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -802,9 +675,6 @@ public class DataModelUtil {
topologyTemplate.setInputs(new HashMap<>());
}
topologyTemplate.getInputs().put(parameterDefinitionId, parameterDefinition);
-
- mdcDataDebugMessage.debugExitMessage(null);
-
}
/**
@@ -817,10 +687,6 @@ public class DataModelUtil {
public static void addOutputParameterToTopologyTemplate(ServiceTemplate serviceTemplate,
String parameterDefinitionId,
ParameterDefinition parameterDefinition) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.isNull(serviceTemplate)) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.ADD_ENTITIES_TO_TOSCA, ErrorLevel.ERROR.name(),
@@ -838,9 +704,6 @@ public class DataModelUtil {
topologyTemplate.setOutputs(new HashMap<>());
}
topologyTemplate.getOutputs().put(parameterDefinitionId, parameterDefinition);
-
- mdcDataDebugMessage.debugExitMessage(null);
-
}
/**
@@ -870,8 +733,6 @@ public class DataModelUtil {
*/
public static Map<String, RequirementAssignment> getNodeTemplateRequirements(
NodeTemplate nodeTemplate) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.isNull(nodeTemplate)) {
return null;
}
@@ -892,8 +753,6 @@ public class DataModelUtil {
.put(requirementEntry.getKey(), requirementAssignment);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return nodeTemplateRequirementsAssignment;
}
@@ -905,7 +764,6 @@ public class DataModelUtil {
*/
public static List<Map<String, RequirementAssignment>> getNodeTemplateRequirementList(
NodeTemplate nodeTemplate) {
- mdcDataDebugMessage.debugEntryMessage(null);
ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
//Creating concrete objects
List<Map<String, RequirementAssignment>> requirements = nodeTemplate.getRequirements();
@@ -930,7 +788,6 @@ public class DataModelUtil {
requirements.addAll(concreteRequirementList);
nodeTemplate.setRequirements(requirements);
}
- mdcDataDebugMessage.debugExitMessage(null);
return concreteRequirementList;
}
@@ -943,8 +800,6 @@ public class DataModelUtil {
public static Optional<List<RequirementAssignment>> getRequirementAssignment(
List<Map<String, RequirementAssignment>> requirementsAssignmentList,
String requirementKey) {
-
- mdcDataDebugMessage.debugEntryMessage(null);
if (CollectionUtils.isEmpty(requirementsAssignmentList)) {
return Optional.empty();
}
@@ -959,8 +814,6 @@ public class DataModelUtil {
matchRequirementAssignmentList.add(requirementAssignment);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(matchRequirementAssignmentList);
}
@@ -973,7 +826,6 @@ public class DataModelUtil {
public static void removeRequirementsDefinition(
List<Map<String, RequirementDefinition>> requirementsDefinitionList,
String requirementKey) {
- mdcDataDebugMessage.debugEntryMessage(null);
if (requirementsDefinitionList == null) {
return;
}
@@ -988,8 +840,6 @@ public class DataModelUtil {
for (Map<String, RequirementDefinition> removeMap : mapToBeRemoved) {
requirementsDefinitionList.remove(removeMap);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -1001,7 +851,6 @@ public class DataModelUtil {
public static void removeRequirementsAssignment(
List<Map<String, RequirementAssignment>> requirementsAssignmentList,
String requirementKey) {
- mdcDataDebugMessage.debugEntryMessage(null);
if (requirementsAssignmentList == null) {
return;
}
@@ -1016,8 +865,6 @@ public class DataModelUtil {
for (Map<String, RequirementAssignment> removeMap : mapToBeRemoved) {
requirementsAssignmentList.remove(removeMap);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
@@ -1032,7 +879,6 @@ public class DataModelUtil {
NodeTemplate nodeTemplate,
String requirementKey,
RequirementAssignment requirementAssignmentToBeDeleted) {
- mdcDataDebugMessage.debugEntryMessage(null);
ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
List<Map<String, RequirementAssignment>> nodeTemplateRequirements = nodeTemplate
.getRequirements();
@@ -1055,8 +901,6 @@ public class DataModelUtil {
}
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/**
@@ -1102,15 +946,11 @@ public class DataModelUtil {
*/
public static ParameterDefinition getOuputParameter(ServiceTemplate serviceTemplate,
String outputParameterId) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null
|| serviceTemplate.getTopology_template() == null
|| serviceTemplate.getTopology_template().getOutputs() == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return serviceTemplate.getTopology_template().getOutputs().get(outputParameterId);
}
@@ -1155,14 +995,10 @@ public class DataModelUtil {
*/
public static Object getPropertyValue(NodeTemplate nodeTemplate,
String propertyId) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (nodeTemplate == null
|| nodeTemplate.getProperties() == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return nodeTemplate.getProperties().get(propertyId);
}
@@ -1175,16 +1011,12 @@ public class DataModelUtil {
*/
public static Map<String, Object> getNodeTemplateProperties(ServiceTemplate serviceTemplate,
String nodeTemplateId) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null
|| serviceTemplate.getTopology_template() == null
|| serviceTemplate.getTopology_template().getNode_templates() == null
|| serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId) == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId)
.getProperties();
}
@@ -1196,15 +1028,11 @@ public class DataModelUtil {
* @return the substitution mappings
*/
public static SubstitutionMapping getSubstitutionMappings(ServiceTemplate serviceTemplate) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (serviceTemplate == null
|| serviceTemplate.getTopology_template() == null
|| serviceTemplate.getTopology_template().getSubstitution_mappings() == null) {
return null;
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return serviceTemplate.getTopology_template().getSubstitution_mappings();
}
@@ -1294,23 +1122,18 @@ public class DataModelUtil {
*/
public static void addBindingReqFromPortToCompute(String computeNodeTemplateId,
NodeTemplate portNodeTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
RequirementAssignment requirementAssignment = new RequirementAssignment();
requirementAssignment.setCapability(ToscaCapabilityType.NATIVE_NETWORK_BINDABLE);
requirementAssignment.setRelationship(ToscaRelationshipType.NATIVE_NETWORK_BINDS_TO);
requirementAssignment.setNode(computeNodeTemplateId);
addRequirementAssignment(portNodeTemplate, ToscaConstants.BINDING_REQUIREMENT_ID,
requirementAssignment);
- mdcDataDebugMessage.debugExitMessage(null);
}
public static SubstitutionMapping createSubstitutionTemplateSubMapping(
String nodeTypeKey,
NodeType substitutionNodeType,
Map<String, Map<String, List<String>>> mapping) {
- mdcDataDebugMessage.debugEntryMessage(null);
SubstitutionMapping substitutionMapping = new SubstitutionMapping();
substitutionMapping.setNode_type(nodeTypeKey);
substitutionMapping.setCapabilities(
@@ -1318,8 +1141,6 @@ public class DataModelUtil {
substitutionMapping.setRequirements(
manageRequirementMapping(substitutionNodeType.getRequirements(),
mapping.get("requirement")));
-
- mdcDataDebugMessage.debugExitMessage(null);
return substitutionMapping;
}
@@ -1350,8 +1171,6 @@ public class DataModelUtil {
private static Map<String, List<String>> manageRequirementMapping(
List<Map<String, RequirementDefinition>> requirementList,
Map<String, List<String>> requirementSubstitutionMapping) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (requirementList == null) {
return null;
}
@@ -1365,18 +1184,13 @@ public class DataModelUtil {
requirementMapping.put(requirementKey, requirementMap);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return requirementMapping;
}
private static Map<String, List<String>> manageCapabilityMapping(
Map<String, CapabilityDefinition> capabilities,
Map<String, List<String>> capabilitySubstitutionMapping) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (capabilities == null) {
- mdcDataDebugMessage.debugExitMessage(null);
return null;
}
@@ -1388,8 +1202,6 @@ public class DataModelUtil {
capabilityMap = capabilitySubstitutionMapping.get(capabilityKey);
capabilityMapping.put(capabilityKey, capabilityMap);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return capabilityMapping;
}
@@ -1397,8 +1209,6 @@ public class DataModelUtil {
List<Map<String, RequirementDefinition>>
requirementsList,
String templateName) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (CollectionUtils.isEmpty(requirementsList)) {
return;
}
@@ -1414,8 +1224,6 @@ public class DataModelUtil {
substitutionNodeType.getRequirements().add(requirementMap);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
public static boolean isNodeTemplateSectionMissingFromServiceTemplate(
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
index 08fb19399e..9e0e77ecc3 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
@@ -22,7 +22,6 @@ import org.apache.commons.lang3.StringUtils;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
-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;
@@ -64,14 +63,9 @@ import java.util.Optional;
import java.util.Set;
public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
-
- protected static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
-
public List<Map<String, RequirementDefinition>> calculateExposedRequirements(
List<Map<String, RequirementDefinition>> nodeTypeRequirementsDefinitionList,
Map<String, RequirementAssignment> nodeTemplateRequirementsAssignment) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
if (nodeTypeRequirementsDefinitionList == null) {
return null;
}
@@ -105,8 +99,6 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return nodeTypeRequirementsDefinitionList;
}
@@ -131,10 +123,6 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
public Map<String, CapabilityDefinition> calculateExposedCapabilities(
Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
Map<String, Map<String, RequirementAssignment>> fullFilledRequirementsDefinitionMap) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null);
-
String capabilityKey;
String capability;
String node;
@@ -165,8 +153,6 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
.entrySet()) {
exposedCapabilitiesDefinition.put(entry.getKey(), entry.getValue());
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null);
return exposedCapabilitiesDefinition;
}