aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailV2VirtualMachineInterfaceHelper.java16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java23
-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/ContrailPortToNetResourceConnection.java24
-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/ResourceTranslationNovaServerImpl.java65
6 files changed, 0 insertions, 156 deletions
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<String, ServiceTemplate> 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<Object> 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<ResourceFileDataAndIDs> fileDataAndIDs =
getResourceFileDataAndIDsForVolumeConnection(resourceId, translateTo, fileDatas);
if (fileDataAndIDs.isPresent()) {
- mdcDataDebugMessage.debugExitMessage(null, null);
return fileDataAndIDs;
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return Optional.empty();
}
private Optional<ResourceFileDataAndIDs> getResourceFileDataAndIDsForVolumeConnection(
String resourceId, TranslateTo translateTo, List<FileData> 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<List<Map.Entry<String, Resource>>> getResourceByTranslatedResourceId(
String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate,
String translatedResourceId, TranslateTo translateTo, String heatResourceType) {
-
-
- mdcDataDebugMessage.debugEntryMessage("file", fileName);
-
List<Map.Entry<String, Resource>> 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<AttachedResourceId> 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<String, RequirementDefinition> requirementDefinitionEntry,
List<String> 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<String> 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<String, Object> 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<String, Object> schedulerHints) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
for (Object hint : schedulerHints.values()) {
Optional<AttachedResourceId> 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<String> serverGroupTranslatedId = ResourceTranslationFactory.getInstance(serverGroup)
@@ -224,7 +204,6 @@ public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase {
serverGroupTranslatedId.get());
}
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private boolean isSchedulerHintsPropExist(Map<String, Object> 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<String, Object> 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<String, Object> 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<Map<String, Object>> 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;
}