package org.openecomp.sdc.generator.core.utils;
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;
private static List<String> supportedCapabilities = new ArrayList<>();
private static List<String> supportedRequirements = new ArrayList<>();
- protected static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
static {
//TODO : Read from configuration
supportedCapabilities.addAll(Arrays.asList("host", "os", "endpoint", "scalable"));
Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
Map<String, List<String>> capabilitySubstitutionMapping, String type, String templateName,
ServiceTemplate substitutionServiceTemplate, ToscaServiceModel toscaServiceModel) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
NodeType flatNodeType = (NodeType) toscaAnalyzerService
.getFlatEntity(ToscaElementTypes.NODE_TYPE, type, substitutionServiceTemplate,
capabilitySubstitutionMapping.put(capabilityKey, capabilityMapping);
}
}
- mdcDataDebugMessage.debugExitMessage(null, null);
}
}
import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.Validator;
import java.util.Set;
public class SharedResourceGuideLineValidator implements Validator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final Logger LOGGER = LoggerFactory.getLogger(
SharedResourceGuideLineValidator.class);
private static final ErrorMessageCode ERROR_CODE_SRG_1 = new ErrorMessageCode("SRG1");
private Set<String> validateManifest(ManifestContent manifestContent,
GlobalValidationContext globalContext) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", SdcCommon.MANIFEST_NAME);
Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent);
if (baseFiles == null || baseFiles.isEmpty()) {
globalContext.addMessage(
LoggerTragetServiceName.VALIDATE_BASE_FILE,
LoggerErrorDescription.MULTI_BASE_HEAT);
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", SdcCommon.MANIFEST_NAME);
return baseFiles;
}
private void validateBaseFile(String fileName, Set<String> baseFiles,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
//if not base return
if (baseFiles == null || !baseFiles.contains(fileName)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
//if no resources exist return
if (heatOrchestrationTemplate.getResources() == null
|| heatOrchestrationTemplate.getResources().size() == 0) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
LoggerTragetServiceName.VALIDATE_BASE_FILE,
LoggerErrorDescription.RESOURCE_NOT_DEFINED_AS_OUTPUT));
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateHeatVolumeFile(String fileName, Map<String, FileData.Type> fileTypeMap,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
//if not heat volume return
if (!fileTypeMap.get(fileName).equals(FileData.Type.HEAT_VOL)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
//if no resources exist return
if (heatOrchestrationTemplate.getResources() == null
|| heatOrchestrationTemplate.getResources().size() == 0) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
LoggerTragetServiceName.VALIDATE_VOLUME_FILE,
LoggerErrorDescription.VOLUME_FILE_NOT_EXPOSED));
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
public class ContrailServiceInstanceNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final String AVAILABILITY_ZONE = "availability_zone";
private static final ErrorMessageCode ERROR_CODE_NSI1 = new ErrorMessageCode("NSI1");
private static final ErrorMessageCode ERROR_CODE_NSI2 = new ErrorMessageCode("NSI2");
private void validateAvailabilityZoneName(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String[] regexList = new String[]{"availability_zone_(\\d+)"};
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
LoggerErrorDescription.MISSING_GET_PARAM);
}
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
}
\ No newline at end of file
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
public class ContrailServiceTemplateNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final ErrorMessageCode ERROR_CODE_NST1 = new ErrorMessageCode("NST1");
private static final ErrorMessageCode ERROR_CODE_NST2 = new ErrorMessageCode("NST2");
private static final ErrorMessageCode ERROR_CODE_NST3 = new ErrorMessageCode("NST3");
private void validateServiceTemplateImageAndFlavor(String fileName,
Map.Entry<String, Resource> entry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(entry.getValue().getProperties())) {
return;
}
validateServiceTemplatePropertiesValuesVmtypesAreIdentical(fileName, entry, globalContext,
propertiesMap);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateServiceTemplatePropertiesValuesVmtypesAreIdentical(String fileName,
Map.Entry<String, Resource> entry,
GlobalValidationContext globalContext,
Map<String, Object> propertiesMap) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Pair<String, String> vmTypeImagePair = new ImmutablePair<>("image_name", "\\_image\\_name");
Pair<String, String> vmTypeFlavorPair = new ImmutablePair<>("flavor", "\\_flavor\\_name");
validatePropertiesValuesVmtypesAreIdentical(Arrays.asList(vmTypeImagePair, vmTypeFlavorPair),
fileName, entry, propertiesMap, globalContext);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validatePropertiesValuesVmtypesAreIdentical(List<Pair> propertiesToMatch,
Map.Entry<String, Resource> resourceEntry,
Map<String, Object> propertiesMap,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (CollectionUtils.isEmpty(propertiesToMatch)) {
return;
}
handleFirstIteration(previousPropertyValueValue, currentPropVmType);
if (addWarningIfCurrentVmTypeIsDifferentFromPrevious(fileName, resourceEntry, globalContext,
previousPropertyValueValue, currentPropVmType)) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private boolean addWarningIfCurrentVmTypeIsDifferentFromPrevious(String fileName,
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
import java.util.Map;
public class NeutronPortNamingConventionValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final ErrorMessageCode ERROR_CODE_NNP1 = new ErrorMessageCode("NNP1");
private static final ErrorMessageCode ERROR_CODE_NNP2 = new ErrorMessageCode("NNP2");
private static final ErrorMessageCode ERROR_CODE_NNP3 = new ErrorMessageCode("NNP3");
private void validatePortNetworkNamingConvention(String fileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
String[] regexList = new String[]{".*_net_id", ".*_net_name", ".*_net_fqdn"};
.forEach(propertyEntry -> validateParamNamingConvention(fileName, entry.getKey(),
propertyEntry.getValue(), regexList,
Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES, globalContext)));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateFixedIpsNamingConvention(String fileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
.filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType())
.equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE))
.forEach(entry -> checkNeutronPortFixedIpsName(fileName, entry, globalContext));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void checkNeutronPortFixedIpsName(String fileName,
String[] regexList,
Messages message,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Object paramName;
if (propertyValue instanceof Map) {
paramName = ((Map) propertyValue).get("get_param");
LoggerTragetServiceName.VALIDATE_PORT_NETWORK_NAME,
LoggerErrorDescription.MISSING_GET_PARAM);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
}
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.validation.ResourceValidator;
import static java.util.Objects.nonNull;
public class NovaServerNamingConventionGuideLineValidator implements ResourceValidator {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final String AVAILABILITY_ZONE = "availability_zone";
private static final String SERVER = "Server";
private static final ErrorMessageCode ERROR_CODE_NNS1 = new ErrorMessageCode("NNS1");
private void validateHeatNovaResource(String fileName, String envFileName,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>();
//if no resources exist return
if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
.equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()))
.forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName,
entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerResourceType(String resourceId, String fileName,
Map<String, String> uniqueResourcePortNetworkRole,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
validateNovaServerResourceMetaData(fileName, resourceId,
heatOrchestrationTemplate.getResources().get(resourceId), globalContext);
validateNovaServerResourceNetworkUniqueRole(fileName, resourceId, uniqueResourcePortNetworkRole,
heatOrchestrationTemplate, globalContext);
validateAvailabilityZoneName(fileName, resourceEntry, globalContext);
validateNovaServerNameImageAndFlavor(fileName, envFileName, resourceEntry, globalContext);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
@SuppressWarnings("unchecked")
private void validateNovaServerResourceMetaData(String fileName, String resourceId,
Resource resource,
GlobalValidationContext globalValidationContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
Map<String, Object> novaServerProp = resource.getProperties();
Object novaServerPropMetadata;
if (MapUtils.isNotEmpty(novaServerProp)) {
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerResourceNetworkUniqueRole(String fileName, String resourceId,
Map<String, String> uniqueResourcePortNetworkRole,
HeatOrchestrationTemplate heatOrchestrationTemplate,
GlobalValidationContext globalValidationContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
-
Object propertyNetworkValue =
heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks");
if (propertyNetworkValue != null && propertyNetworkValue instanceof List) {
}
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateUniqueResourcePortNetworkRole(String fileName, String resourceId,
private void validateAvailabilityZoneName(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String[] regexList = new String[]{"availability_zone_(\\d+)"};
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return;
}
LoggerErrorDescription.MISSING_GET_PARAM);
}
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private void validateNovaServerNameImageAndFlavor(String fileName, String envFileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
String novaName =
validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, globalContext);
Map<String, String> legalNovaNamingConventionMap =
validateNovaServerNameImageAndFlavorSync(fileName, resourceEntry,
legalNovaNamingConventionMap, globalContext);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private String validateNovaServerNamingConvention(String fileName, String envFileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return null;
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return checkIfNovaNameByGuidelines(fileName, envFileName, resourceEntry, globalContext);
}
private Map<String, String> validateImageAndFlavorFromNovaServer(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return null;
}
imageAndFlavorLegalNames.put(imageOrFlavor.getKey(), imageOrFlavorName);
}
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
return imageAndFlavorLegalNames;
}
Map.Entry<String, Resource> resourceEntry,
Map<String, String> legalNovaNamingConventionNames,
GlobalValidationContext globalContext) {
-
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("file", fileName);
-
List<String> vmNames = new LinkedList<>();
for (Map.Entry<String, String> nameEntry : legalNovaNamingConventionNames.entrySet()) {
LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
}
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage("file", fileName);
}
private String getVmName(String nameToGetVmNameFrom, String stringToGetIndexOf) {
import org.openecomp.sdc.heat.services.HeatStructureUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
import static java.util.Objects.nonNull;
public class ValidationUtil {
-
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final Logger LOG = LoggerFactory.getLogger(ValidationUtil.class.getName());
private ValidationUtil(){}
public static Environment validateEnvContent(String envFileName,
GlobalValidationContext globalContext) {
-
- mdcDataDebugMessage.debugEntryMessage("file", envFileName);
-
Environment envContent;
try {
Optional<InputStream> fileContent = globalContext.getFileContent(envFileName);
}
} catch (Exception exception) {
LOG.debug("",exception);
- mdcDataDebugMessage.debugExitMessage("file", envFileName);
return null;
}
- mdcDataDebugMessage.debugExitMessage("file", envFileName);
return envContent;
}
GlobalValidationContext globalContext,
String propertyName, Object nameValue,
String[] regexList) {
-
- mdcDataDebugMessage.debugEntryMessage("file", fileName);
-
String propertyValue = getWantedNameFromPropertyValueGetParam(nameValue);
if (nonNull(propertyValue) && !evalPattern(propertyValue, regexList)) {
globalContext.addMessage(
resourceEntry.getKey()),
LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return true;
}
-
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return false;
}
public static HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName,
GlobalValidationContext globalContext) {
-
- mdcDataDebugMessage.debugEntryMessage("file", fileName);
-
HeatOrchestrationTemplate heatOrchestrationTemplate;
try {
Optional<InputStream> fileContent = globalContext.getFileContent(fileName);
, getParserExceptionReason(exception)),
LoggerTragetServiceName.VALIDATE_HEAT_FORMAT,
LoggerErrorDescription.INVALID_HEAT_FORMAT);
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return null;
}
- mdcDataDebugMessage.debugExitMessage("file", fileName);
return heatOrchestrationTemplate;
}
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;
protected static Logger logger;
private static ToscaAnalyzerService toscaAnalyzerService;
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
static {
logger = LoggerFactory.getLogger(CompositionDataExtractorImpl.class);
toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
* @return the composition data
*/
public CompositionData extractServiceCompositionData(ToscaServiceModel toscaServiceModel) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
ExtractCompositionDataContext context = new ExtractCompositionDataContext();
String entryDefinitionServiceTemplateFileName =
toscaServiceModel.getEntryDefinitionServiceTemplate();
CompositionData compositionData = new CompositionData();
compositionData.setNetworks(context.getNetworks());
compositionData.setComponents(context.getComponents());
-
- mdcDataDebugMessage.debugExitMessage(null);
return compositionData;
}
private void handleSubstitution(ServiceTemplate serviceTemplate,
ToscaServiceModel toscaServiceModel,
ExtractCompositionDataContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<String, NodeTemplate> substitutableNodeTemplates =
toscaAnalyzerService.getSubstitutableNodeTemplates(serviceTemplate);
substitutableNodeTemplates.get(substitutableNodeTemplateId), context);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void handleSubstitutableNodeTemplate(ServiceTemplate serviceTemplate,
String substitutableNodeTemplateId,
NodeTemplate substitutableNodeTemplate,
ExtractCompositionDataContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
Optional<String> substituteServiceTemplateFileName = toscaAnalyzerService
.getSubstituteServiceTemplateName(substitutableNodeTemplateId, substitutableNodeTemplate);
if (context.getHandledServiceTemplates().contains(substituteServiceTemplateFileName.get())) {
//each substitution is should be handled once, and will get the connection to the upper
// service level according to the first one which was processed
- mdcDataDebugMessage.debugExitMessage(null);
return;
}
substitutableNodeTemplate.getRequirements();
if (CollectionUtils.isEmpty(substitutableRequirements)) {
- mdcDataDebugMessage.debugExitMessage(null);
return;
}
RequirementAssignment reqAssignment = toscaExtensionYamlUtil
.yamlToObject(toscaExtensionYamlUtil.objectToYaml(substitutableReq.get(reqId)),
RequirementAssignment.class);
-
- mdcDataDebugMessage.debugExitMessage(null);
return isLinkToNetworkRequirementAssignment(reqAssignment);
}).forEach(reqId -> {
RequirementAssignment linkToNetworkRequirement = toscaExtensionYamlUtil
private void connectPortToNetwork(Nic port, NodeTemplate portNodeTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
List<RequirementAssignment> linkRequirementsToNetwork =
toscaAnalyzerService.getRequirements(portNodeTemplate, ToscaConstants.LINK_REQUIREMENT_ID);
for (RequirementAssignment linkRequirementToNetwork : linkRequirementsToNetwork) {
port.setNetworkName(linkRequirementToNetwork.getNode());
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
/*
*/
private Map<String, List<String>> getComputeToPortsConnection(
Map<String, NodeTemplate> portNodeTemplates) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<String, List<String>> computeToPortConnection = new HashMap<>();
if (MapUtils.isEmpty(portNodeTemplates)) {
return computeToPortConnection;
computeToPortConnection.get(bindingRequirementToCompute.getNode()).add(portId);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return computeToPortConnection;
}
private void extractComponents(ServiceTemplate serviceTemplate,
ToscaServiceModel toscaServiceModel,
ExtractCompositionDataContext context) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<String, NodeTemplate> computeNodeTemplates = toscaAnalyzerService
.getNodeTemplatesByType(serviceTemplate, ToscaNodeType.NATIVE_COMPUTE,
toscaServiceModel);
.forEach(nodeType -> extractComponent(serviceTemplate, computeToPortsConnection,
computesGroupedByType, imageNodeTemplates, computeFlavorNodeTemplates, nodeType,
context));
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private Map<String,List<String>> getComponentImages(Map<String, NodeTemplate>
private Map<String, List<String>> getNodeTemplatesGroupedByType(
Map<String, NodeTemplate> nodeTemplates) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<String, List<String>> nodeTemplatesGrouped =
new HashMap<>(); //key - node type, value - list of node ids with this type
for (String nodeId : nodeTemplates.keySet()) {
nodeTemplatesGrouped.putIfAbsent(nodeType, new ArrayList<>());
nodeTemplatesGrouped.get(nodeType).add(nodeId);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return nodeTemplatesGrouped;
}
private List<Network> extractNetworks(ServiceTemplate serviceTemplate,
ToscaServiceModel toscaServiceModel) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
List<Network> networks = new ArrayList<>();
Map<String, NodeTemplate> networkNodeTemplates = toscaAnalyzerService
.getNodeTemplatesByType(serviceTemplate, ToscaNodeType.NATIVE_NETWORK,
toscaServiceModel);
if (MapUtils.isEmpty(networkNodeTemplates)) {
- mdcDataDebugMessage.debugExitMessage(null);
return networks;
}
for (String networkId : networkNodeTemplates.keySet()) {
network.setDhcp(networkDhcpValue.isPresent() ? networkDhcpValue.get() : true);
networks.add(network);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return networks;
}
//dhcp default value is true
private Optional<Boolean> getNetworkDhcpValue(ServiceTemplate serviceTemplate,
NodeTemplate networkNodeTemplate) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (networkNodeTemplate == null) {
return Optional.empty();
}
if (networkNodeTemplate.getProperties() == null
|| networkNodeTemplate.getProperties().get(ToscaConstants.DHCP_ENABLED_PROPERTY_NAME)
== null) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(true);
}
Object dhcp =
networkNodeTemplate.getProperties().get(ToscaConstants.DHCP_ENABLED_PROPERTY_NAME);
if (dhcp instanceof String) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(Boolean.valueOf((String) dhcp));
} else if (dhcp instanceof Boolean) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of((Boolean) dhcp);
} else if (dhcp instanceof Map) {
String inputParameterName =
serviceTemplate.getTopology_template().getInputs().get(inputParameterName);
if (inputParameterDefinition != null) {
if (inputParameterDefinition.get_default() != null) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(Boolean.valueOf(inputParameterDefinition.get_default().toString()));
}
} else {
}
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(true);
}
import org.openecomp.sdc.common.errors.ErrorCode;
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.vendorsoftwareproduct.dao.ComponentDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComputeDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.DeploymentFlavorDao;
private static final Logger logger =
LoggerFactory.getLogger(CompositionEntityDataManagerImpl.class);
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
private Map<CompositionEntityId, CompositionEntityData> entities = new HashMap<>();
private Map<CompositionEntityType, String> nonDynamicSchemas = new HashMap<>();
private List<CompositionEntityValidationData> roots = new ArrayList<>();
public CompositionEntityValidationData validateEntity(CompositionEntity entity,
SchemaTemplateContext schemaTemplateContext,
SchemaTemplateInput schemaTemplateInput) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (entity == null) {
throw new CoreException(
new ErrorCode.ErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION)
validationData.setErrors(JsonUtil.validate(
json == null ? JsonUtil.object2Json(new Object()) : json,
generateSchema(schemaTemplateContext, entity.getType(), schemaTemplateInput)));
-
- mdcDataDebugMessage.debugExitMessage(null);
return validationData;
}
*/
@Override
public Map<CompositionEntityId, Collection<String>> validateEntitiesQuestionnaire() {
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<CompositionEntityId, Collection<String>> errorsByEntityId = new HashMap<>();
entities.entrySet().forEach(entry -> {
Collection<String> errors = validateQuestionnaire(entry.getValue());
errorsByEntityId.put(entry.getKey(), errors);
}
});
-
- mdcDataDebugMessage.debugExitMessage(null);
return errorsByEntityId;
}
@Override
public void saveCompositionData(String vspId, Version version, CompositionData compositionData) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.isNull(compositionData)) {
return;
}
Map<String, String> networkIdByName = saveNetworks(vspId, version, compositionData);
saveComponents(vspId, version, compositionData, networkIdByName);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
@Override
public void saveComponents(String vspId, Version version, CompositionData compositionData,
Map<String, String> networkIdByName) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (CollectionUtils.isNotEmpty(compositionData.getComponents())) {
for (Component component : compositionData.getComponents()) {
ComponentEntity componentEntity = new ComponentEntity(vspId, version, null);
saveNicsByComponent(vspId, version, networkIdByName, component, componentId);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
public void saveNicsByComponent(String vspId, Version version,
public Map<String, String> saveNetworks(String vspId, Version version,
CompositionData compositionData) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
Map<String, String> networkIdByName = new HashMap<>();
if (CollectionUtils.isNotEmpty(compositionData.getNetworks())) {
for (Network network : compositionData.getNetworks()) {
}
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return networkIdByName;
}
@Override
public NetworkEntity createNetwork(NetworkEntity network) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
//network.setId(CommonMethods.nextUuId()); will be set by the dao
networkDao.create(network);
- mdcDataDebugMessage.debugExitMessage(null);
return network;
}
@Override
public ComponentEntity createComponent(ComponentEntity component) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
//component.setId(CommonMethods.nextUuId()); will be set by the dao
component.setQuestionnaireData(
new JsonSchemaDataGenerator(
.generateData());
componentDao.create(component);
-
- mdcDataDebugMessage.debugExitMessage(null);
return component;
}
@Override
public NicEntity createNic(NicEntity nic) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
//nic.setId(CommonMethods.nextUuId()); will be set by the dao
nic.setQuestionnaireData(
new JsonSchemaDataGenerator(
.generateData());
nicDao.create(nic);
-
- mdcDataDebugMessage.debugExitMessage(null);
return nic;
}
* get a flat list of all questionnaire entities that have validation errors
* */
public Set<CompositionEntityValidationData> getEntityListWithErrors() {
- mdcDataDebugMessage.debugEntryMessage(null);
Set<CompositionEntityValidationData> treeAsList = new HashSet<>();
for (CompositionEntityValidationData entity : roots) {
}
updateValidationCompositionEntityName(treeAsList);
-
- mdcDataDebugMessage.debugExitMessage(null);
return treeAsList;
}
@Override
public DeploymentFlavorEntity createDeploymentFlavor(DeploymentFlavorEntity deploymentFlavor) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
deploymentFlavor.setId(CommonMethods.nextUuId());
deploymentFlavorDao.create(deploymentFlavor);
return deploymentFlavor;
@Override
public ImageEntity createImage(ImageEntity image) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
image.setId(CommonMethods.nextUuId());
image.setQuestionnaireData(
.generateData());
imageDao.create(image);
- mdcDataDebugMessage.debugExitMessage(null, null);
return image;
}
import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
import org.openecomp.sdc.heat.datatypes.structure.Artifact;
import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateCandidateDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateCandidateDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateData;
public class CandidateServiceImpl implements CandidateService {
protected static final Logger logger = LoggerFactory.getLogger(CandidateServiceImpl.class);
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
private CandidateServiceValidator candidateServiceValidator = new CandidateServiceValidator();
private ManifestCreator manifestCreator;
private OrchestrationTemplateCandidateDao orchestrationTemplateCandidateDao;
@Override
public Optional<ErrorMessage> validateNonEmptyFileToUpload(InputStream fileToUpload,
String fileSuffix) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
String errorMessage =
getErrorWithParameters(Messages.NO_FILE_WAS_UPLOADED_OR_FILE_NOT_EXIST.getErrorMessage(),
fileSuffix);
try {
int available = fileToUpload.available();
if (available == 0) {
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(new ErrorMessage(ErrorLevel.ERROR,
errorMessage));
}
} catch (IOException e) {
logger.debug(e.getMessage(), e);
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(new ErrorMessage(ErrorLevel.ERROR,
errorMessage));
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.empty();
}
public OrchestrationTemplateCandidateData createCandidateDataEntity(
CandidateDataEntityTo candidateDataEntityTo, InputStream zipFileManifest,
AnalyzedZipHeatFiles analyzedZipHeatFiles) throws Exception {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
FileContentHandler zipContentMap = candidateDataEntityTo.getContentMap();
FilesDataStructure filesDataStructure;
String dataStructureJson;
OrchestrationTemplateCandidateData candidateData = new OrchestrationTemplateCandidateData();
candidateData.setContentData(ByteBuffer.wrap(candidateDataEntityTo.getUploadedFileData()));
candidateData.setFilesDataStructure(dataStructureJson);
-
- mdcDataDebugMessage.debugExitMessage(null);
return candidateData;
}
}
private FilesDataStructure createFileDataStructureFromManifest(InputStream isManifestContent) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
ManifestContent manifestContent =
JsonUtil.json2Object(isManifestContent, ManifestContent.class);
FilesDataStructure structure = new FilesDataStructure();
structure.getArtifacts().add(fileData.getFile());
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
return structure;
}
@Override
public void updateCandidateUploadData(String vspId, Version version,
OrchestrationTemplateCandidateData uploadData) {
- mdcDataDebugMessage.debugEntryMessage(null);
-
orchestrationTemplateCandidateDao.update(vspId, version, uploadData);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
@Override
public Optional<FilesDataStructure> getOrchestrationTemplateCandidateFileDataStructure(
String vspId, Version version) {
-
- mdcDataDebugMessage.debugEntryMessage("VSP Id", vspId);
-
Optional<String> jsonFileDataStructure =
orchestrationTemplateCandidateDao.getStructure(vspId, version);
if (jsonFileDataStructure.isPresent() && JsonUtil.isValidJson(jsonFileDataStructure.get())) {
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspId);
return Optional
.of(JsonUtil.json2Object(jsonFileDataStructure.get(), FilesDataStructure.class));
} else {
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspId);
return Optional.empty();
}
}
@Override
public OrchestrationTemplateCandidateData getOrchestrationTemplateCandidate(String vspId,
Version version) {
- mdcDataDebugMessage.debugEntryMessage("VSP Id", vspId);
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspId);
-
return orchestrationTemplateCandidateDao.get(vspId, version);
}
@Override
public OrchestrationTemplateCandidateData getOrchestrationTemplateCandidateInfo(String vspId,
Version version) {
- mdcDataDebugMessage.debugEntryMessage("VSP Id", vspId);
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspId);
-
return orchestrationTemplateCandidateDao.getInfo(vspId, version);
}
@Override
public String createManifest(VspDetails vspDetails, FilesDataStructure structure) {
-
- mdcDataDebugMessage.debugEntryMessage("VSP Id", vspDetails.getId());
-
Optional<ManifestContent> manifest = manifestCreator.createManifest(vspDetails, structure);
if (!manifest.isPresent()) {
throw new RuntimeException(Messages.CREATE_MANIFEST_FROM_ZIP.getErrorMessage());
}
-
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspDetails.getId());
return JsonUtil.object2Json(manifest.get());
}
public Optional<ManifestContent> createManifest(VspDetails vspDetails,
FileContentHandler fileContentHandler,
AnalyzedZipHeatFiles analyzedZipHeatFiles) {
-
-
- mdcDataDebugMessage.debugEntryMessage("VSP Id", vspDetails.getId());
-
- mdcDataDebugMessage.debugExitMessage("VSP Id", vspDetails.getId());
return manifestCreator.createManifest(vspDetails, fileContentHandler, analyzedZipHeatFiles);
}
private void handleSingleHeat(FilesDataStructure structure, List<Module> modules,
HeatStructureTree heat,
Map<String, List<ErrorMessage>> uploadErrors) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Module module = new Module();
module.setYaml(heat.getFileName());
module.setIsBase(heat.getBase());
}
handleEnv(module, heat, false, structure);
modules.add(module);
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void handleVolumes(Module module, Set<HeatStructureTree> volumeSet,
FilesDataStructure structure, int inx,
Map<String, List<ErrorMessage>> uploadErrors) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
for (HeatStructureTree volume : volumeSet) {
if (inx++ > 0) {
ErrorsUtil.addStructureErrorToErrorMap(SdcCommon.UPLOAD_FILE,
handleEnv(module, volume, true, structure);
addNestedToFileDataStructure(volume, structure);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void handleEnv(Module module, HeatStructureTree tree, boolean isVolEnv,
FilesDataStructure structure) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (Objects.nonNull(tree.getEnv())) {
if (isVolEnv) {
module.setVolEnv(tree.getEnv().getFileName());
}
handleArtifactsFromTree(tree.getEnv(), structure);
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void addNestedToFileDataStructure(HeatStructureTree heat,
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.vendorsoftwareproduct.services.HeatFileAnalyzer;
import org.openecomp.sdc.vendorsoftwareproduct.services.filedatastructuremodule.ManifestCreator;
public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
protected static final Logger logger =
LoggerFactory.getLogger(ManifestCreatorNamingConventionImpl.class);
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
-
@Override
public Optional<ManifestContent> createManifest(
VspDetails vspDetails, FilesDataStructure filesDataStructure) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (Objects.isNull(filesDataStructure)) {
return Optional.empty();
}
addNestedToManifest(filesDataStructure, fileDataList);
addArtifactsToManifestFileDataList(filesDataStructure, fileDataList);
ManifestContent manifestContent = createManifest(vspDetails, fileDataList);
-
- mdcDataDebugMessage.debugExitMessage(null);
return Optional.of(manifestContent);
}
private void addNestedToManifest(
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (CollectionUtils.isNotEmpty(filesDataStructure.getNested())) {
for (String nested : filesDataStructure.getNested()) {
fileDataList.add(createBaseFileData(FileData.Type.HEAT, nested));
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
@Override
private void addArtifactsToManifestFileDataList(
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
Collection<String> forArtifacts = CollectionUtils
.union(filesDataStructure.getArtifacts(), filesDataStructure.getUnassigned());
if (CollectionUtils.isNotEmpty(forArtifacts)) {
fileDataList.add(createBaseFileData(FileData.Type.OTHER, artifact));
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void addModulesToManifestFileDataList(
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
-
-
- mdcDataDebugMessage.debugEntryMessage(null);
-
if (CollectionUtils.isNotEmpty(filesDataStructure.getModules())) {
for (Module module : filesDataStructure.getModules()) {
FileData fileData = createBaseFileData(FileData.Type.HEAT, module.getYaml());
fileDataList.add(fileData);
}
}
-
- mdcDataDebugMessage.debugExitMessage(null);
}
private void addEnv(Module module, FileData fileData) {
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.Module;
* Created by Talio on 12/6/2016.
*/
public class CandidateServiceValidator {
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
-
public Optional<List<ErrorMessage>> validateFileDataStructure(
FilesDataStructure filesDataStructure) {
if (Objects.isNull(filesDataStructure)) {
private boolean validateAtLeaseOneModuleExist(FilesDataStructure filesDataStructure) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return CollectionUtils.isEmpty(filesDataStructure.getModules());
}
private void validateNoVolEnvWithoutVol(List<ErrorMessage> errors, Module module) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (StringUtils.isEmpty(module.getVol()) && StringUtils.isNotEmpty(module.getVolEnv())) {
errors.add(new ErrorMessage(ErrorLevel.ERROR, ErrorMessagesFormatBuilder
.getErrorWithParameters(Messages.MODULE_IN_MANIFEST_VOL_ENV_NO_VOL.getErrorMessage(),
module.getName())));
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
private void validateModuleHaveYaml(List<ErrorMessage> errors, Module module) {
-
- mdcDataDebugMessage.debugEntryMessage(null, null);
-
if (StringUtils.isEmpty(module.getYaml())) {
errors.add(new ErrorMessage(ErrorLevel.ERROR, ErrorMessagesFormatBuilder
.getErrorWithParameters(Messages.MODULE_IN_MANIFEST_NO_YAML.getErrorMessage(),
module.getName())));
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
}
}