From 74911b02b4ed92c67287de71f46253478e53dcfd Mon Sep 17 00:00:00 2001 From: vempo Date: Thu, 4 Jan 2018 18:46:45 +0200 Subject: Remove enter/exit debug #9 Change-Id: I8a6fb5be912834fc0c684c6ba5d076bec00fc92c Issue-ID: SDC-875 Signed-off-by: vempo --- .../heattotosca/UnifiedCompositionManager.java | 17 ------ .../helper/ContrailTranslationHelper.java | 11 ---- .../ContrailV2VirtualMachineInterfaceHelper.java | 16 ------ .../helper/VolumeTranslationHelper.java | 23 -------- .../ContrailPortToNetResourceConnection.java | 24 -------- .../ResourceTranslationNovaServerImpl.java | 65 ---------------------- .../sdc/vendorlicense/VendorLicenseUtil.java | 8 --- .../dao/types/EntitlementPoolEntity.java | 9 --- .../dao/types/LicenseKeyGroupEntity.java | 9 --- .../facade/impl/VendorLicenseFacadeImpl.java | 7 --- .../healing/impl/SimpleHealingServiceImpl.java | 9 --- .../impl/VendorLicenseArtifactsServiceImpl.java | 23 -------- 12 files changed, 221 deletions(-) (limited to 'openecomp-be') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java index a7ba9b549e..86761b7339 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.translator.services.heattotosca; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; @@ -16,8 +15,6 @@ import java.util.Objects; import java.util.Optional; public class UnifiedCompositionManager { - - private MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); private ConsolidationService consolidationService; private TranslationService translationService = new TranslationService(); private UnifiedCompositionService unifiedCompositionService = new UnifiedCompositionService(); @@ -39,38 +36,28 @@ public class UnifiedCompositionManager { */ public ToscaServiceModel createUnifiedComposition(ToscaServiceModel toscaServiceModel, TranslationContext translationContext) { - - mdcDataDebugMessage.debugEntryMessage(null, null); Map serviceTemplates = toscaServiceModel.getServiceTemplates(); ServiceTemplate mainServiceTemplate = serviceTemplates.get(toscaServiceModel.getEntryDefinitionServiceTemplate()); createUnifiedComposition(toscaServiceModel, mainServiceTemplate, translationContext); ToscaServiceModel unifiedToscaServiceModel = HeatToToscaUtil.createToscaServiceModel(mainServiceTemplate, translationContext); - - mdcDataDebugMessage.debugExitMessage(null, null); return unifiedToscaServiceModel; } private void createUnifiedComposition(ToscaServiceModel toscaServiceModel, ServiceTemplate serviceTemplate, TranslationContext translationContext) { - mdcDataDebugMessage.debugEntryMessage(null, null); - handleNestedServiceTemplates(toscaServiceModel, serviceTemplate, translationContext); consolidationService.serviceTemplateConsolidation(serviceTemplate, translationContext); unifiedCompositionService .updateUnifiedAbstractNodesConnectivity(serviceTemplate, translationContext); translationContext.addUnifiedHandledServiceTeamplte(serviceTemplate); - - mdcDataDebugMessage.debugExitMessage(null, null); } private void handleNestedServiceTemplates(ToscaServiceModel toscaServiceModel, ServiceTemplate serviceTemplate, TranslationContext translationContext) { - mdcDataDebugMessage.debugEntryMessage(null, null); - String serviceTemplateFileName = ToscaUtil.getServiceTemplateFileName(serviceTemplate); FileNestedConsolidationData fileNestedConsolidationData = translationContext.getConsolidationData().getNestedConsolidationData() @@ -99,8 +86,6 @@ public class UnifiedCompositionManager { substitutedNodeTemplateId); } } - - mdcDataDebugMessage.debugExitMessage(null, null); } private void createUnifiedCompositionForNestedServiceTemplate( @@ -109,7 +94,6 @@ public class UnifiedCompositionManager { ServiceTemplate substitutionServiceTemplate, String substitutedNodeTemplateId, TranslationContext translationContext) { - mdcDataDebugMessage.debugEntryMessage(null, null); handleNestedServiceTemplates(toscaServiceModel, substitutionServiceTemplate, translationContext); consolidationService.substitutionServiceTemplateConsolidation(substitutedNodeTemplateId, @@ -117,7 +101,6 @@ public class UnifiedCompositionManager { unifiedCompositionService .updateUnifiedAbstractNodesConnectivity(substitutionServiceTemplate, translationContext); translationContext.addUnifiedHandledServiceTeamplte(substitutionServiceTemplate); - 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/helper/ContrailTranslationHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java index d194a70e97..a96a0dd4ff 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.translator.services.heattotosca.helper; import org.openecomp.core.utilities.file.FileUtils; import org.openecomp.sdc.heat.datatypes.HeatBoolean; import org.openecomp.sdc.heat.datatypes.model.Resource; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.tosca.datatypes.ToscaFunctions; import org.openecomp.sdc.translator.datatypes.heattotosca.PropertyRegexMatcher; import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext; @@ -38,8 +37,6 @@ import java.util.Map; import java.util.Optional; public class ContrailTranslationHelper { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); /** * Gets compute node type id. * @@ -52,11 +49,8 @@ public class ContrailTranslationHelper { String contrailServiceTemplateResourceId, String contrailServiceTemplateTranslatedId, TranslationContext context) { - mdcDataDebugMessage.debugEntryMessage(null, null); NameExtractor nodeTypeNameExtractor = context.getNameExtractorImpl(ConfigConstants.CONTRAIL_COMPUTE_NODE_TYPE_IMPL_KEY); - - mdcDataDebugMessage.debugExitMessage(null, null); return nodeTypeNameExtractor .extractNodeTypeName(contrailServiceTemplateResource, contrailServiceTemplateResourceId, contrailServiceTemplateTranslatedId); @@ -81,11 +75,6 @@ public class ContrailTranslationHelper { public String getSubstitutionContrailServiceTemplateMetadata(String heatFileName, String serviceInstanceTranslatedId) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - - mdcDataDebugMessage.debugExitMessage(null, null); return FileUtils.getFileWithoutExtention(heatFileName) + "_" + serviceInstanceTranslatedId; } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailV2VirtualMachineInterfaceHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailV2VirtualMachineInterfaceHelper.java index 402db74a9b..0933174296 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailV2VirtualMachineInterfaceHelper.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailV2VirtualMachineInterfaceHelper.java @@ -25,7 +25,6 @@ import org.openecomp.sdc.heat.datatypes.model.Resource; 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.ToscaNodeType; import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment; @@ -47,8 +46,6 @@ import java.util.Optional; public class ContrailV2VirtualMachineInterfaceHelper { static Logger logger = (Logger) LoggerFactory.getLogger(ContrailV2VirtualMachineInterfaceHelper.class); - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - /** * Connect Virtual Machine Interface node template to network node template in TOSCA. * @@ -58,10 +55,6 @@ public class ContrailV2VirtualMachineInterfaceHelper { */ public void connectVmiToNetwork(ResourceTranslationBase resourceTranslationImpl, TranslateTo translateTo, NodeTemplate vmiNodeTemplate) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - Object virtualNetworkRefs = translateTo.getResource().getProperties() .get(HeatConstants.VIRTUAL_NETWORK_REFS_PROPERTY_NAME); @@ -142,8 +135,6 @@ public class ContrailV2VirtualMachineInterfaceHelper { } } } - - mdcDataDebugMessage.debugExitMessage(null, null); } /** @@ -164,19 +155,12 @@ public class ContrailV2VirtualMachineInterfaceHelper { } private Optional getVlanTagPropertyValue(Resource resource) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - Object vmiProperties = resource.getProperties() .get(HeatConstants.VMI_PROPERTIES_PROPERTY_NAME); if (vmiProperties != null && vmiProperties instanceof Map) { - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.ofNullable(((Map) vmiProperties) .get(HeatConstants.VMI_SUB_INTERFACE_VLAN_TAG_PROPERTY_NAME)); } - - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.empty(); } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java index 87bf36b9d5..0f6eeafb61 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java @@ -26,7 +26,6 @@ import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; 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.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.tosca.services.YamlUtil; import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId; import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext; @@ -47,8 +46,6 @@ import static org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes.CINDER_V public class VolumeTranslationHelper { private final Logger logger; - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - public VolumeTranslationHelper(Logger logger) { this.logger = logger; } @@ -66,12 +63,7 @@ public class VolumeTranslationHelper { String resourceId, TranslateTo translateTo, FileData.Type... types) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - if (CollectionUtils.isEmpty(filesToSearch)) { - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.empty(); } @@ -80,20 +72,13 @@ public class VolumeTranslationHelper { Optional fileDataAndIDs = getResourceFileDataAndIDsForVolumeConnection(resourceId, translateTo, fileDatas); if (fileDataAndIDs.isPresent()) { - mdcDataDebugMessage.debugExitMessage(null, null); return fileDataAndIDs; } - - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.empty(); } private Optional getResourceFileDataAndIDsForVolumeConnection( String resourceId, TranslateTo translateTo, List fileDatas) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - for (FileData data : fileDatas) { HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil() .yamlToObject(translateTo.getContext().getFiles().getFileContent(data.getFile()), @@ -130,8 +115,6 @@ public class VolumeTranslationHelper { logger.warn("output: '" + resourceId + "' in file '" + data.getFile() + "' is not found"); } } - - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.empty(); } @@ -145,10 +128,6 @@ public class VolumeTranslationHelper { private Optional>> getResourceByTranslatedResourceId( String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate, String translatedResourceId, TranslateTo translateTo, String heatResourceType) { - - - mdcDataDebugMessage.debugEntryMessage("file", fileName); - List> list = heatOrchestrationTemplate.getResources().entrySet() .stream() .filter( @@ -158,10 +137,8 @@ public class VolumeTranslationHelper { .allMatch(p -> p.test(entry))) .collect(Collectors.toList()); if (CollectionUtils.isEmpty(list)) { - mdcDataDebugMessage.debugExitMessage("file", fileName); return Optional.empty(); } else { - mdcDataDebugMessage.debugExitMessage("file", fileName); return Optional.of(list); } } 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/ContrailPortToNetResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailPortToNetResourceConnection.java index 272211f7cf..eb84f3f105 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailPortToNetResourceConnection.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailPortToNetResourceConnection.java @@ -26,7 +26,6 @@ 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.heat.services.HeatConstants; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType; import org.openecomp.sdc.tosca.datatypes.ToscaNodeType; import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType; @@ -48,8 +47,6 @@ import java.util.Optional; import java.util.function.Predicate; public class ContrailPortToNetResourceConnection extends ResourceConnectionUsingRequirementHelper { - private MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - public ContrailPortToNetResourceConnection(ResourceTranslationBase resourceTranslationBase, TranslateTo translateTo, FileData nestedFileData, NodeTemplate substitutionNodeTemplate, @@ -85,9 +82,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing HeatOrchestrationTemplate nestedHeatOrchestrationTemplate, String nestedHeatFileName) { - - mdcDataDebugMessage.debugEntryMessage(null, null); - Object interfaceListProperty = heatResource.getProperties().get(HeatConstants.INTERFACE_LIST_PROPERTY_NAME); if (interfaceListProperty == null) { @@ -108,8 +102,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing } } } - - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.of(paramsList); } else if (interfaceListProperty instanceof Map) { Optional attachedVirtualNetwork = HeatToToscaUtil @@ -122,8 +114,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing return Optional.of(paramsList); } } - - mdcDataDebugMessage.debugExitMessage(null, null); return Optional.empty(); } @@ -136,10 +126,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing protected void addRequirementToConnectResources( Map.Entry requirementDefinitionEntry, List paramNames) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - if (paramNames == null || paramNames.isEmpty()) { return; } @@ -156,8 +142,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing addRequirementToConnectResource(requirementDefinitionEntry, paramName, paramValue, supportedNetworkTypes); - - mdcDataDebugMessage.debugExitMessage(null, null); } @Override @@ -166,10 +150,6 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing String connectionPointId, Resource connectedResource, List supportedTypes) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - if (!resourceTranslationBase.isResourceTypeSupported(connectedResource, supportedTypes)) { logger.warn("Nested resource '" + nestedResourceId + "' property '" + nestedPropertyName + "' is pointing to a resource with type '" + connectedResource.getType() @@ -177,12 +157,8 @@ public class ContrailPortToNetResourceConnection extends ResourceConnectionUsing + "' that connect contrail port to network. Supported types are: '" + supportedTypes.toString() + "', therefore, this TOSCA requirement will not be connected."); - - mdcDataDebugMessage.debugExitMessage(null, null); return false; } - - mdcDataDebugMessage.debugExitMessage(null, null); return true; } 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/ResourceTranslationNovaServerImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImpl.java index 2a2ecf919e..06ba26c97a 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImpl.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImpl.java @@ -68,10 +68,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { @Override protected void translate(TranslateTo translateTo) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - TranslationContext context = translateTo.getContext(); Map properties = translateTo.getResource().getProperties(); String heatFileName = translateTo.getHeatFileName(); @@ -102,8 +98,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { manageNovaServerGroupMapping(translateTo, context, properties, heatFileName, serviceTemplate, novaNodeTemplate, heatOrchestrationTemplate); DataModelUtil.addNodeTemplate(serviceTemplate, translateTo.getTranslatedId(), novaNodeTemplate); - - mdcDataDebugMessage.debugExitMessage(null, null); } private void manageNovaServerGroupMapping(TranslateTo translateTo, TranslationContext context, @@ -111,10 +105,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { ServiceTemplate serviceTemplate, NodeTemplate novaNodeTemplate, HeatOrchestrationTemplate heatOrchestrationTemplate) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - if (isSchedulerHintsPropExist(properties)) { Object schedulerHints = properties.get("scheduler_hints"); if (schedulerHints instanceof Map) { @@ -125,8 +115,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { + "' is not valid. This property should be a map"); } } - - mdcDataDebugMessage.debugExitMessage(null, null); } private void addServerGroupHintsToPoliciesGroups(TranslateTo translateTo, @@ -136,10 +124,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { HeatOrchestrationTemplate heatOrchestrationTemplate, Map schedulerHints) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - for (Object hint : schedulerHints.values()) { Optional attachedResourceId = HeatToToscaUtil .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context, hint); @@ -178,8 +162,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { } } } - - mdcDataDebugMessage.debugExitMessage(null, null); } private boolean isResourceTypeServerGroup(TranslatedHeatResource translatedServerGroupResource) { @@ -210,8 +192,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { HeatOrchestrationTemplate heatOrchestrationTemplate, String resourceToTranslate, NodeTemplate novaNodeTemplate) { - mdcDataDebugMessage.debugEntryMessage(null, null); - Resource serverGroup = HeatToToscaUtil.getResource(heatOrchestrationTemplate, resourceToTranslate, heatFileName); Optional serverGroupTranslatedId = ResourceTranslationFactory.getInstance(serverGroup) @@ -224,7 +204,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { serverGroupTranslatedId.get()); } - mdcDataDebugMessage.debugExitMessage(null, null); } private boolean isSchedulerHintsPropExist(Map properties) { @@ -233,7 +212,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { private void manageNovaServerBlockDeviceMapping(TranslateTo translateTo, NodeTemplate novaNodeTemplate) { - mdcDataDebugMessage.debugEntryMessage(null, null); String heatFileName = translateTo.getHeatFileName(); TranslationContext context = translateTo.getContext(); ServiceTemplate serviceTemplate = translateTo.getServiceTemplate(); @@ -291,16 +269,10 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { } index++; } - - mdcDataDebugMessage.debugExitMessage(null, null); } private void connectNovaServerToVolume(NodeTemplate novaNodeTemplate, String volumeResourceId, String relationshipId, TranslateTo translateTo) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - RequirementAssignment requirementAssignment = new RequirementAssignment(); requirementAssignment.setCapability(ToscaCapabilityType.NATIVE_ATTACHMENT); requirementAssignment.setNode(volumeResourceId); @@ -317,8 +289,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { ConsolidationDataUtil.updateComputeConsolidationDataVolumes(translateTo, novaNodeTemplate .getType(), translateTo.getTranslatedId(), ToscaConstants.LOCAL_STORAGE_REQUIREMENT_ID, requirementAssignment); - - mdcDataDebugMessage.debugExitMessage(null, null); } private void createCinderVolumeNodeTemplate(ServiceTemplate serviceTemplate, String resourceId, @@ -326,10 +296,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { Map blockDeviceMapping, HeatOrchestrationTemplate heatOrchestrationTemplate, TranslationContext context) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - NodeTemplate cinderVolumeNodeTemplate = new NodeTemplate(); cinderVolumeNodeTemplate.setType(ToscaNodeType.CINDER_VOLUME); cinderVolumeNodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter @@ -338,17 +304,11 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(), cinderVolumeNodeTemplate, context)); DataModelUtil.addNodeTemplate(serviceTemplate, volumeResourceId, cinderVolumeNodeTemplate); - - mdcDataDebugMessage.debugExitMessage(null, null); } private void createVolumeAttachesToRelationship(ServiceTemplate serviceTemplate, String deviceName, String novaServerTranslatedId, String volumeId, String relationshipId) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - RelationshipTemplate relationshipTemplate = new RelationshipTemplate(); relationshipTemplate.setType(ToscaRelationshipType.CINDER_VOLUME_ATTACHES_TO); Map properties = new HashMap<>(); @@ -360,15 +320,9 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { relationshipTemplate.setProperties(properties); DataModelUtil.addRelationshipTemplate(serviceTemplate, relationshipId, relationshipTemplate); - - mdcDataDebugMessage.debugExitMessage(null, null); } private List> getBlockDeviceMappingList(Resource resource) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - if (Objects.isNull(resource.getProperties())) { return Collections.emptyList(); } @@ -381,23 +335,17 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { blockDeviceMappingList.addAll(blockDeviceMappingV2List); } else if (CollectionUtils.isEmpty(blockDeviceMappingList) && CollectionUtils.isEmpty(blockDeviceMappingV2List)) { - - mdcDataDebugMessage.debugExitMessage(null, null); return null; } else { blockDeviceMappingList = blockDeviceMappingList != null ? blockDeviceMappingList : blockDeviceMappingV2List; } - - mdcDataDebugMessage.debugExitMessage(null, null); return blockDeviceMappingList; } private void manageNovaServerNetwork(TranslateTo translateTo, NodeTemplate novaNodeTemplate) { - mdcDataDebugMessage.debugEntryMessage(null, null); - Resource resource = translateTo.getResource(); String translatedId = translateTo.getTranslatedId(); @@ -417,19 +365,12 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { getOrTranslatePortTemplate(translateTo, heatNetwork.get( Constants.PORT_PROPERTY_NAME), translatedId, novaNodeTemplate); } - - mdcDataDebugMessage.debugExitMessage(null, null); - } private void getOrTranslatePortTemplate(TranslateTo translateTo, Object port, String novaServerResourceId, NodeTemplate novaNodeTemplate) { - - - mdcDataDebugMessage.debugEntryMessage(null, null); - String heatFileName = translateTo.getHeatFileName(); HeatOrchestrationTemplate heatOrchestrationTemplate = translateTo .getHeatOrchestrationTemplate(); @@ -457,7 +398,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { + HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource() + ", " + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE .getHeatResource()); - mdcDataDebugMessage.debugExitMessage(null, null); return; } else if (HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE .getHeatResource().equals(portResource.getType())) { @@ -484,15 +424,12 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { + "ignored."); } } - - mdcDataDebugMessage.debugExitMessage(null, null); } private String createLocalNodeType(ServiceTemplate serviceTemplate, Resource resource, String resourceId, String translatedId, TranslationContext context) { - mdcDataDebugMessage.debugEntryMessage(null, null); NameExtractor nodeTypeNameExtractor = context.getNameExtractorImpl(resource.getType()); String nodeTypeName = nodeTypeNameExtractor.extractNodeTypeName(resource, resourceId, translatedId); @@ -500,8 +437,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase { if (!isNodeTypeCreated(serviceTemplate, nodeTypeName)) { DataModelUtil.addNodeType(serviceTemplate, nodeTypeName, createNodeType()); } - - mdcDataDebugMessage.debugExitMessage(null, null); return nodeTypeName; } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java index 3ee326af4c..cb13f5de5a 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java @@ -1,16 +1,11 @@ package org.openecomp.sdc.vendorlicense; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import java.text.ParseException; import java.text.SimpleDateFormat; public class VendorLicenseUtil { - - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - public static String getIsoFormatDate(String inputDate) { - mdcDataDebugMessage.debugEntryMessage("inputDate date", inputDate); String isoFormatDate = null; SimpleDateFormat isoDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); SimpleDateFormat inputDateFormat = new SimpleDateFormat("MM/dd/yyyy'T'HH:mm:ss'Z'"); @@ -18,11 +13,8 @@ public class VendorLicenseUtil { try { isoFormatDate = isoDateFormat.format(inputDateFormat.parse(inputDate)); } catch (ParseException e) { - mdcDataDebugMessage.debugExitMessage("parsing error", isoFormatDate); isoFormatDate = null; } - - mdcDataDebugMessage.debugExitMessage("formatted date", isoFormatDate); return isoFormatDate; } } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java index 4bcfd9d4d1..d76b434f29 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java @@ -27,7 +27,6 @@ import com.datastax.driver.mapping.annotations.Frozen; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; import org.apache.commons.lang3.StringUtils; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.vendorlicense.VendorLicenseUtil; import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitForXml; import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitXml; @@ -43,8 +42,6 @@ import java.util.Set; @Table(keyspace = "dox", name = "entitlement_pool") public class EntitlementPoolEntity implements VersionableEntity { - - private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); private static final String ENTITY_TYPE = "Entitlement Pool"; @PartitionKey @@ -387,24 +384,18 @@ public class EntitlementPoolEntity implements VersionableEntity { } public String getIsoFormatStartDate() { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("start date", startDate); String isoFormatStartDate = null; if (!StringUtils.isEmpty(startDate)) { isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate); - MDC_DATA_DEBUG_MESSAGE.debugExitMessage("start date", "iso format start date", startDate, - isoFormatStartDate); } return isoFormatStartDate; } public String getIsoFormatExpiryDate() { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("expiry date", expiryDate); String isoFormatExpDate = null; if (!StringUtils.isEmpty(expiryDate)) { isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate); - MDC_DATA_DEBUG_MESSAGE.debugExitMessage("expiry date", "iso format expiry date", expiryDate, - isoFormatExpDate); } return isoFormatExpDate; } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java index 43de02b174..3f51a2eeca 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java @@ -27,7 +27,6 @@ import com.datastax.driver.mapping.annotations.Frozen; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; import org.apache.commons.lang3.StringUtils; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.vendorlicense.VendorLicenseUtil; import org.openecomp.sdc.vendorlicense.dao.types.xml.LicenseKeyTypeForXml; import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitForXml; @@ -44,8 +43,6 @@ import java.util.Set; @Table(keyspace = "dox", name = "license_key_group") public class LicenseKeyGroupEntity implements VersionableEntity { - - private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); private static final String ENTITY_TYPE = "License Key Group"; @PartitionKey @@ -392,24 +389,18 @@ public class LicenseKeyGroupEntity implements VersionableEntity { } public String getIsoFormatStartDate() { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("start date", startDate); String isoFormatStartDate = null; if (!StringUtils.isEmpty(startDate)) { isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate); - MDC_DATA_DEBUG_MESSAGE.debugExitMessage("start date", "iso format start date", startDate, - isoFormatStartDate); } return isoFormatStartDate; } public String getIsoFormatExpiryDate() { - MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("expiry date", expiryDate); String isoFormatExpDate = null; if (!StringUtils.isEmpty(expiryDate)) { isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate); - MDC_DATA_DEBUG_MESSAGE.debugExitMessage("expiry date", "iso format expiry date", expiryDate, - isoFormatExpDate); } return isoFormatExpDate; } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java index 0898e48b54..33e3b4c545 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java @@ -26,7 +26,6 @@ import org.openecomp.core.utilities.CommonMethods; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCode; 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; @@ -82,8 +81,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { private static final LicenseKeyGroupDao licenseKeyGroupDao = LicenseKeyGroupDaoFactory.getInstance().createInterface(); private static final LimitDao limitDao = LimitDaoFactory.getInstance().createInterface(); - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - /** * Instantiates a new Vendor license facade. */ @@ -207,8 +204,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { @Override public VendorLicenseModelEntity getVendorLicenseModel(String vlmId, Version version) { - mdcDataDebugMessage.debugEntryMessage("VLM id", vlmId); - VendorLicenseModelEntity vendorLicenseModel = vendorLicenseModelDao.get(new VendorLicenseModelEntity(vlmId, version)); if (vendorLicenseModel == null) { @@ -217,8 +212,6 @@ public class VendorLicenseFacadeImpl implements VendorLicenseFacade { LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.ENTITY_NOT_FOUND); throw new CoreException(new VendorLicenseModelNotFoundErrorBuilder(vlmId).build()); } - - mdcDataDebugMessage.debugExitMessage("VLM id", vlmId); return vendorLicenseModel; } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java index c62061e529..456348688e 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java @@ -21,7 +21,6 @@ package org.openecomp.sdc.vendorlicense.healing.impl; 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; @@ -43,8 +42,6 @@ public class SimpleHealingServiceImpl implements HealingService { EntitlementPoolDaoFactory.getInstance().createInterface(); private static final LicenseKeyGroupDao licenseKeyGroupDao = LicenseKeyGroupDaoFactory.getInstance().createInterface(); - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - @Override public VersionableEntity heal(VersionableEntity toHeal) { return handleMissingVersionId(toHeal); @@ -60,10 +57,6 @@ public class SimpleHealingServiceImpl implements HealingService { } private VersionableEntity handleMissingVersionId(VersionableEntity toHeal) { - - - mdcDataDebugMessage.debugEntryMessage(null); - if (toHeal != null && toHeal.getVersionUuId() != null) { return toHeal; } @@ -81,8 +74,6 @@ public class SimpleHealingServiceImpl implements HealingService { throw new UnsupportedOperationException( "Unsupported operation for 1610 release/1607->1610 migration."); } - - mdcDataDebugMessage.debugExitMessage(null); return toHeal; } } diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java index 07f19b1e2b..613cdd20f5 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.vendorlicense.licenseartifacts.impl; import org.apache.commons.collections.CollectionUtils; import org.openecomp.core.utilities.file.FileContentHandler; -import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.vendorlicense.HealingServiceFactory; import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity; import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity; @@ -58,15 +57,8 @@ public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifacts VendorLicenseFacadeFactory.getInstance().createInterface(); public static final HealingService healingService = HealingServiceFactory.getInstance().createInterface(); - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - - private static byte[] createVnfArtifact(String vspId, String vlmId, Version vlmVersion, String vendorName, List featureGroups) { - - - mdcDataDebugMessage.debugEntryMessage("VLM name", vendorName); - VnfLicenseArtifact artifact = new VnfLicenseArtifact(); artifact.setVspId(vspId); @@ -102,16 +94,10 @@ public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifacts artifact.getFeatureGroups().add(featureGroupModel); } } - - mdcDataDebugMessage.debugExitMessage("VLM name", vendorName); return artifact.toXml().getBytes(); } private static byte[] createVendorLicenseArtifact(String vlmId, String vendorName) { - - - mdcDataDebugMessage.debugEntryMessage("VLM name", vendorName); - VendorLicenseArtifact vendorLicenseArtifact = new VendorLicenseArtifact(); vendorLicenseArtifact.setVendorName(vendorName); Set entitlementPoolEntities = new HashSet<>(); @@ -152,8 +138,6 @@ public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifacts healLkgs(filterChangedEntities(prepareForFiltering(licenseKeyGroupEntities, false))); vendorLicenseArtifact.setEntitlementPoolEntities(entitlementPoolEntities); vendorLicenseArtifact.setLicenseKeyGroupEntities(licenseKeyGroupEntities); - - mdcDataDebugMessage.debugExitMessage("VLM name", vendorName); return vendorLicenseArtifact.toXml().getBytes(); } @@ -187,10 +171,6 @@ public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifacts */ public FileContentHandler createLicenseArtifacts(String vspId, String vlmId, Version vlmVersion, List featureGroups) { - - - mdcDataDebugMessage.debugEntryMessage("VSP Id", vspId); - FileContentHandler artifacts = new FileContentHandler(); String vendorName = getVendorName(vlmId); @@ -198,9 +178,6 @@ public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifacts createVnfArtifact(vspId, vlmId, vlmVersion, vendorName, featureGroups)); artifacts.addFile(VENDOR_LICENSE_MODEL_ARTIFACT_NAME_WITH_PATH, createVendorLicenseArtifact(vlmId, vendorName)); - - mdcDataDebugMessage.debugExitMessage("VSP Id", vspId); - return artifacts; } -- cgit 1.2.3-korg