diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl')
536 files changed, 7499 insertions, 2722 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml index 25a9514cfe..5874e29efb 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml @@ -1,7 +1,12 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <name>openecomp-sdc-validation-impl</name> + <artifactId>openecomp-sdc-validation-impl</artifactId> + + <parent> <groupId>org.openecomp.sdc</groupId> <artifactId>openecomp-sdc-lib</artifactId> @@ -9,29 +14,12 @@ <relativePath>../..</relativePath> </parent> - <name>openecomp-sdc-validation-impl</name> - <artifactId>openecomp-sdc-validation-impl</artifactId> - <dependencies> <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.3.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.10</version> - - </dependency> - <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> - <version>1.1.2</version> - + <version>${logback.version}</version> </dependency> - <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> @@ -45,13 +33,23 @@ </exclusions> </dependency> <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-logging-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-logging-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>RELEASE</version> + <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> - <groupId>org.openecomp.sdc</groupId> + <groupId>org.openecomp.core</groupId> <artifactId>openecomp-utilities-lib</artifactId> <version>${project.version}</version> </dependency> @@ -61,7 +59,7 @@ <version>${project.version}</version> </dependency> <dependency> - <groupId>org.openecomp.sdc</groupId> + <groupId>org.openecomp.core</groupId> <artifactId>openecomp-common-lib</artifactId> <version>${project.version}</version> </dependency> @@ -69,22 +67,24 @@ <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <scope>test</scope> - <version>1.10.19</version> + <version>${mockito.all.version}</version> </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>19.0</version> + <groupId>org.openecomp.core</groupId> + <artifactId>openecomp-heat-lib</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons.io.version}</version> + <scope>test</scope> </dependency> - <dependency> <groupId>org.openecomp.sdc</groupId> - <artifactId>openecomp-heat-lib</artifactId> + <artifactId>openecomp-sdc-validation-core</artifactId> <version>${project.version}</version> </dependency> - - </dependencies> - -</project>
\ No newline at end of file +</project> diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml.versionsBackup new file mode 100644 index 0000000000..e2927eb5b3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml.versionsBackup @@ -0,0 +1,103 @@ +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <name>openecomp-sdc-validation-impl</name> + <artifactId>openecomp-sdc-validation-impl</artifactId> + + + <parent> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-lib</artifactId> + <version>1.0-SNAPSHOT</version> + <relativePath>../..</relativePath> + </parent> + + <dependencies> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + + </dependency> + + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <scope>test</scope> + <version>6.8.5</version> + <exclusions> + <exclusion> + <artifactId>snakeyaml</artifactId> + <groupId>org.yaml</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-logging-core</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-logging-api</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>RELEASE</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openecomp.core</groupId> + <artifactId>openecomp-utilities-lib</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-validation-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.core</groupId> + <artifactId>openecomp-common-lib</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-all</artifactId> + <scope>test</scope> + <version>1.10.19</version> + </dependency> + <dependency> + <groupId>org.openecomp.core</groupId> + <artifactId>openecomp-heat-lib</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-logging-api</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <!--dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-validation-sdk</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency--> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-validation-core</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + + +</project>
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java index 920724ed3b..5dc7bef641 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java @@ -24,29 +24,40 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.openecomp.core.utilities.yaml.YamlUtil; import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes; import org.openecomp.sdc.heat.datatypes.model.Environment; import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; import org.openecomp.sdc.heat.datatypes.model.Output; +import org.openecomp.sdc.heat.datatypes.model.Parameter; 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.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 org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import org.openecomp.sdc.validation.impl.validators.HeatValidator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - +import java.io.InputStream; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.Set; + public class HeatValidationService { - private static final Logger logger = LoggerFactory.getLogger(HeatValidator.class); + private static final Logger logger = (Logger) LoggerFactory.getLogger(HeatValidator.class); + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); /** * Check artifacts existence. @@ -57,17 +68,22 @@ public class HeatValidationService { */ public static void checkArtifactsExistence(String fileName, Set<String> artifactsNames, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); artifactsNames .stream() .filter(artifactName -> !globalContext.getFileContextMap().containsKey(artifactName)) .forEach(artifactName -> { - globalContext - .addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + globalContext.addMessage(fileName, + ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(Messages.MISSING_ARTIFACT.getErrorMessage(), - artifactName)); + artifactName), LoggerTragetServiceName.VALIDATE_ARTIFACTS_EXISTENCE, + LoggerErrorDescription.MISSING_FILE); }); - } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } /** * Check resource existence from resources map. @@ -81,11 +97,14 @@ public class HeatValidationService { Set<String> resourcesNames, Collection<?> valuesToSearchIn, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + if (CollectionUtils.isNotEmpty(valuesToSearchIn)) { for (Object value : valuesToSearchIn) { if (value instanceof Resource) { Resource resource = (Resource) value; - //checkResourceDependsOn(fileName,resource,resourcesNames,globalContext); Collection<Object> resourcePropertiesValues = resource.getProperties() == null ? null : resource.getProperties().values(); @@ -101,35 +120,49 @@ public class HeatValidationService { } } } - } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } private static void handleReferencedResources(String fileName, Object valueToSearchReferencesIn, Set<String> resourcesNames, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Set<String> referencedResourcesNames = HeatStructureUtil .getReferencedValuesByFunctionName(fileName, ResourceReferenceFunctions.GET_RESOURCE.getFunction(), valueToSearchReferencesIn, globalContext); if (CollectionUtils.isNotEmpty(referencedResourcesNames)) { - HeatValidationService - .checkIfResourceReferenceExist(fileName, resourcesNames, referencedResourcesNames, - globalContext); + checkIfResourceReferenceExist(fileName, resourcesNames, referencedResourcesNames, + globalContext); } - } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } private static void checkIfResourceReferenceExist(String fileName, Set<String> referencedResourcesNames, Set<String> referencedResources, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + referencedResources.stream() .filter(referencedResource -> !referencedResourcesNames.contains(referencedResource)) .forEach(referencedResource -> { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.REFERENCED_RESOURCE_NOT_FOUND.getErrorMessage(), - referencedResource)); + globalContext.addMessage(fileName, + ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.REFERENCED_RESOURCE_NOT_FOUND.getErrorMessage(), + referencedResource), + LoggerTragetServiceName.VALIDATE_RESOURCE_REFERENCE_EXISTENCE, + LoggerErrorDescription.RESOURCE_NOT_FOUND); }); + + mdcDataDebugMessage.debugExitMessage("file", fileName); } /** @@ -162,36 +195,152 @@ public class HeatValidationService { /** * Check nested parameters. * - * @param callingNestedFileName the calling nested file name + * @param parentFileName the calling nested file name * @param nestedFileName the nested file name * @param resourceName the resource name * @param globalContext the global context * @param resourceFileProperties the resource file properties */ - public static void checkNestedParameters(String callingNestedFileName, String nestedFileName, - String resourceName, - GlobalValidationContext globalContext, - Set<String> resourceFileProperties) { - HeatOrchestrationTemplate heatOrchestrationTemplate; + public static void checkNestedParameters(String parentFileName, String nestedFileName, + String resourceName, Resource resource, + Set<String> resourceFileProperties, + Optional<String> indexVarValue, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", parentFileName); + + HeatOrchestrationTemplate parentHeatOrchestrationTemplate; + HeatOrchestrationTemplate nestedHeatOrchestrationTemplate; try { - heatOrchestrationTemplate = new YamlUtil() - .yamlToObject(globalContext.getFileContent(nestedFileName), - HeatOrchestrationTemplate.class); - } catch (Exception e0) { + Optional<InputStream> fileContent = globalContext.getFileContent(nestedFileName); + if (fileContent.isPresent()) { + nestedHeatOrchestrationTemplate = + new YamlUtil().yamlToObject(fileContent.get(), HeatOrchestrationTemplate.class); + } else { + MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + ErrorLevel.ERROR.name(), LoggerErrorCode.DATA_ERROR.getErrorCode(), + LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The file '" + nestedFileName + "' has no content"); + } + } catch (Exception exception) { + mdcDataDebugMessage.debugExitMessage("file", parentFileName); return; } - Set<String> nestedParametersNames = heatOrchestrationTemplate.getParameters() == null ? null - : heatOrchestrationTemplate.getParameters().keySet(); + + try { + Optional<InputStream> fileContent = globalContext.getFileContent(parentFileName); + if (fileContent.isPresent()) { + parentHeatOrchestrationTemplate = + new YamlUtil().yamlToObject(fileContent.get(), HeatOrchestrationTemplate.class); + } else { + MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + ErrorLevel.ERROR.name(), LoggerErrorCode.DATA_ERROR.getErrorCode(), + LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The file '" + parentFileName + "' has no content"); + } + } catch (Exception exception) { + mdcDataDebugMessage.debugExitMessage("file", parentFileName); + return; + } + Map<String, Parameter> parentParameters = parentHeatOrchestrationTemplate.getParameters(); + Map<String, Parameter> nestedParameters = nestedHeatOrchestrationTemplate.getParameters(); + Set<String> nestedParametersNames = + nestedParameters == null ? null : nestedHeatOrchestrationTemplate.getParameters().keySet(); + + checkNoMissingParameterInNested(parentFileName, nestedFileName, resourceName, + resourceFileProperties, nestedParametersNames, globalContext); + checkNestedInputValuesAlignWithType(parentFileName, nestedFileName, parentParameters, + nestedParameters, resourceName, resource, indexVarValue, globalContext); + + mdcDataDebugMessage.debugExitMessage("file", parentFileName); + + } + + private static void checkNoMissingParameterInNested(String parentFileName, String nestedFileName, + String resourceName, + Set<String> resourceFileProperties, + Set<String> nestedParametersNames, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("nested file", nestedFileName); if (CollectionUtils.isNotEmpty(nestedParametersNames)) { resourceFileProperties .stream() .filter(propertyName -> !nestedParametersNames.contains(propertyName)) .forEach(propertyName -> globalContext - .addMessage(callingNestedFileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_PARAMETER_IN_NESTED.getErrorMessage(), - nestedFileName, resourceName, propertyName))); + .addMessage(parentFileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages + .MISSING_PARAMETER_IN_NESTED.getErrorMessage(), + nestedFileName, resourceName, propertyName), + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + LoggerErrorDescription.MISSING_PARAMETER_IN_NESTED)); } + + mdcDataDebugMessage.debugExitMessage("nested file", nestedFileName); + } + + + private static void checkNestedInputValuesAlignWithType(String parentFileName, + String nestedFileName, + Map<String, Parameter> parentParameters, + Map<String, Parameter> nestedParameters, + String resourceName, Resource resource, + Optional<String> indexVarValue, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("nested file", nestedFileName); + + Map<String, Object> properties = resource.getProperties(); + for (Map.Entry<String, Object> propertyEntry : properties.entrySet()) { + String parameterName = propertyEntry.getKey(); + Object parameterInputValue = propertyEntry.getValue(); + + if (Objects.nonNull(parameterInputValue)) { + if (parameterInputValue instanceof String) { + if (indexVarValue.isPresent() && indexVarValue.get().equals(parameterInputValue)) { + parameterInputValue = 3; //indexVarValue is actually number value in runtime + } + validateStaticValueForNestedInputParameter(parentFileName, nestedFileName, resourceName, + parameterName, parameterInputValue, nestedParameters.get(parameterName), + globalContext); + } + } + } + + mdcDataDebugMessage.debugExitMessage("nested file", nestedFileName); + } + + private static void validateStaticValueForNestedInputParameter(String parentFileName, + String nestedFileName, + String resourceName, + String parameterName, + Object staticValue, + Parameter parameterInNested, + GlobalValidationContext + globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("nested file", nestedFileName); + + if (parameterInNested == null) { + return; + } + if (!DefinedHeatParameterTypes + .isValueIsFromGivenType(staticValue, parameterInNested.getType())) { + globalContext.addMessage(parentFileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages + .WRONG_VALUE_TYPE_ASSIGNED_NESTED_INPUT.getErrorMessage(), + resourceName, parameterName, nestedFileName), + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + LoggerErrorDescription.WRONG_VALUE_ASSIGNED_NESTED_PARAMETER); + } + + mdcDataDebugMessage.debugExitMessage("nested file", nestedFileName); } @@ -207,14 +356,28 @@ public class HeatValidationService { public static boolean isNestedLoopExistInFile(String callingFileName, String nestedFileName, List<String> filesInLoop, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", callingFileName); + HeatOrchestrationTemplate nestedHeatOrchestrationTemplate; try { - nestedHeatOrchestrationTemplate = new YamlUtil() - .yamlToObject(globalContext.getFileContent(nestedFileName), - HeatOrchestrationTemplate.class); - } catch (Exception e0) { + Optional<InputStream> fileContent = globalContext.getFileContent(nestedFileName); + if (fileContent.isPresent()) { + nestedHeatOrchestrationTemplate = + new YamlUtil().yamlToObject(fileContent.get(), HeatOrchestrationTemplate.class); + } else { + MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_NESTING_LOOPS, ErrorLevel.ERROR.name(), + LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The file '" + nestedFileName + "' has no content"); + } + + } catch (Exception exception) { logger.warn("HEAT Validator will not be executed on file " + nestedFileName + " due to illegal HEAT format"); + + mdcDataDebugMessage.debugExitMessage("file", callingFileName); return false; } filesInLoop.add(nestedFileName); @@ -226,11 +389,14 @@ public class HeatValidationService { String resourceType = resource.getType(); if (Objects.nonNull(resourceType) && isNestedResource(resourceType)) { + mdcDataDebugMessage.debugExitMessage("file", callingFileName); return resourceType.equals(callingFileName) || !filesInLoop.contains(resourceType) && isNestedLoopExistInFile(callingFileName, resourceType, filesInLoop, globalContext); } } } + + mdcDataDebugMessage.debugExitMessage("file", callingFileName); return false; } @@ -245,9 +411,11 @@ public class HeatValidationService { */ @SuppressWarnings("unchecked") public static void loopOverOutputMapAndValidateGetAttrFromNested(String fileName, - Map<String, Output> outputMap, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { + Map<String, Output> outputMap, + HeatOrchestrationTemplate + heatOrchestrationTemplate, + GlobalValidationContext + globalContext) { for (Output output : outputMap.values()) { Object outputValue = output.getValue(); if (outputValue != null && outputValue instanceof Map) { @@ -256,42 +424,64 @@ public class HeatValidationService { (List<String>) outputValueMap.get(ResourceReferenceFunctions.GET_ATTR.getFunction()); if (!CollectionUtils.isEmpty(getAttrValue)) { String resourceName = getAttrValue.get(0); - String propertyName = getAttrValue.get(1); + Object attNameObject = getAttrValue.get(1); + if (!(attNameObject instanceof String)) { + return; + } + String attName = getAttrValue.get(1); String resourceType = getResourceTypeFromResourcesMap(resourceName, heatOrchestrationTemplate); if (Objects.nonNull(resourceType) - && HeatValidationService.isNestedResource(resourceType)) { - Map<String, Output> nestedOutputMap; - HeatOrchestrationTemplate nestedHeatOrchestrationTemplate; - try { - nestedHeatOrchestrationTemplate = new YamlUtil() - .yamlToObject(globalContext.getFileContent(resourceType), - HeatOrchestrationTemplate.class); - } catch (Exception e0) { - return; - } - nestedOutputMap = nestedHeatOrchestrationTemplate.getOutputs(); - - if (MapUtils.isEmpty(nestedOutputMap) || !nestedOutputMap.containsKey(propertyName)) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.GET_ATTR_NOT_FOUND.getErrorMessage(), - propertyName, resourceName)); + && isNestedResource(resourceType)) { + handleGetAttrNestedResource(fileName, globalContext, resourceName, attName, + resourceType); } } } } } - } + private static void handleGetAttrNestedResource(String fileName, + GlobalValidationContext globalContext, + String resourceName, String attName, + String resourceType) { + Map<String, Output> nestedOutputMap; + HeatOrchestrationTemplate nestedHeatOrchestrationTemplate; + try { + Optional<InputStream> fileContent = globalContext.getFileContent(resourceType); + if (fileContent.isPresent()) { + nestedHeatOrchestrationTemplate = + new YamlUtil().yamlToObject(fileContent.get(), HeatOrchestrationTemplate.class); + } else { + MdcDataErrorMessage + .createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_GET_ATTR_FROM_NESTED, + ErrorLevel.ERROR.name(), LoggerErrorCode.DATA_ERROR.getErrorCode(), + LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The file '" + resourceType + "' has no content"); + } + } catch (Exception exception) { + return; + } + nestedOutputMap = nestedHeatOrchestrationTemplate.getOutputs(); + + if (MapUtils.isEmpty(nestedOutputMap) || !nestedOutputMap.containsKey(attName)) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.GET_ATTR_NOT_FOUND.getErrorMessage(), + attName, resourceName), + LoggerTragetServiceName.VALIDATE_GET_ATTR_FROM_NESTED, + LoggerErrorDescription.GET_ATTR_NOT_FOUND); + } + } public static boolean isNestedResource(String resourceType) { return resourceType.contains(".yaml") || resourceType.contains(".yml"); } - private static String getResourceTypeFromResourcesMap(String resourceName, - HeatOrchestrationTemplate heatOrchestrationTemplate) { + HeatOrchestrationTemplate + heatOrchestrationTemplate) { return heatOrchestrationTemplate.getResources().get(resourceName).getType(); } @@ -305,11 +495,23 @@ public class HeatValidationService { */ public static Environment validateEnvContent(String fileName, String envFileName, GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("env file", envFileName); + Environment envContent = null; try { - envContent = - new YamlUtil().yamlToObject(globalContext.getFileContent(envFileName), Environment.class); - } catch (Exception e0) { + Optional<InputStream> fileContent = globalContext.getFileContent(envFileName); + if (fileContent.isPresent()) { + envContent = new YamlUtil().yamlToObject(fileContent.get(), Environment.class); + } else { + MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_ENV_FILE, ErrorLevel.ERROR.name(), + LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The file '" + envFileName + "' has no content"); + } + } catch (Exception exception) { + mdcDataDebugMessage.debugExitMessage("env file", envFileName); return null; } return envContent; diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java deleted file mode 100644 index 3457bed1e9..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java +++ /dev/null @@ -1,617 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.validation.impl.util; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.MapUtils; -import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.types.GlobalValidationContext; -import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; -import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; -import org.openecomp.sdc.heat.datatypes.model.Output; -import org.openecomp.sdc.heat.datatypes.model.PolicyTypes; -import org.openecomp.sdc.heat.datatypes.model.PropertiesMapKeyTypes; -import org.openecomp.sdc.heat.datatypes.model.Resource; -import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions; -import org.openecomp.sdc.heat.datatypes.model.ResourceTypeToMessageString; -import org.openecomp.sdc.heat.services.HeatStructureUtil; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - - -public class ResourceValidationHeatValidator { - - /** - * Validate resource type. - * - * @param fileName the file name - * @param baseFileName the base file name - * @param securityGroupsNamesFromBaseFileOutputs the security groups names from base file outputs - * @param heatOrchestrationTemplate the heat orchestration template - * @param globalContext the global context - */ - public static void validateResourceType(String fileName, String baseFileName, - Set<String> securityGroupsNamesFromBaseFileOutputs, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - Map<String, Resource> resourceMap = - heatOrchestrationTemplate.getResources() == null ? new HashMap<>() - : heatOrchestrationTemplate.getResources(); - Map<String, Integer> numberOfVisitsInPort = new HashMap<>(); - Set<String> resourcesNames = resourceMap.keySet(); - Set<String> sharedResourcesFromOutputMap = - getSharedResourcesNamesFromOutputs(fileName, heatOrchestrationTemplate.getOutputs(), - globalContext); - boolean isBaseFile = baseFileName != null && fileName.equals(baseFileName); - - Map<HeatResourcesTypes, List<String>> resourceTypeToNamesListMap = HeatResourcesTypes - .getListForResourceType(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE, - HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE, - HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE); - - initResourceTypeListWithItsResourcesNames(fileName, resourceTypeToNamesListMap, resourceMap, - sharedResourcesFromOutputMap, globalContext); - initVisitedPortsMap(fileName, resourceMap, numberOfVisitsInPort, globalContext); - - - for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) { - String resourceType = resourceEntry.getValue().getType(); - validateSecurityGroupsFromBaseOutput(fileName, resourceEntry, isBaseFile, - securityGroupsNamesFromBaseFileOutputs, globalContext); - checkResourceDependsOn(fileName, resourceEntry.getValue(), resourcesNames, globalContext); - - if (Objects.isNull(resourceType)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null", - resourceEntry.getKey())); - } else { - HeatResourcesTypes heatResourceType = HeatResourcesTypes.findByHeatResource(resourceType); - - if (heatResourceType != null) { - switch (heatResourceType) { - case NOVA_SERVER_RESOURCE_TYPE: - validateNovaServerResourceType(fileName, resourceEntry, numberOfVisitsInPort, - resourceTypeToNamesListMap - .get(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE), - heatOrchestrationTemplate, globalContext); - break; - - case NOVA_SERVER_GROUP_RESOURCE_TYPE: - validateNovaServerGroupPolicy(fileName, resourceEntry, globalContext); - break; - - case RESOURCE_GROUP_RESOURCE_TYPE: - validateResourceGroupType(fileName, resourceEntry, globalContext); - break; - - case NEUTRON_PORT_RESOURCE_TYPE: - validateNeutronPortType(fileName, resourceEntry, resourceTypeToNamesListMap - .get(HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE), globalContext); - break; - - case CONTRAIL_NETWORK_ATTACH_RULE_RESOURCE_TYPE: - validateContrailAttachPolicyType(resourceEntry, resourceTypeToNamesListMap - .get(HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE)); - break; - default: - } - } else { - if (HeatValidationService.isNestedResource(resourceType)) { - handleNestedResourceType(fileName, resourceEntry.getKey(), resourceEntry.getValue(), - globalContext); - } - } - } - } - - checkForEmptyResourceNamesInMap(fileName, - CollectionUtils.isEmpty(securityGroupsNamesFromBaseFileOutputs), resourceTypeToNamesListMap, - globalContext); - handleOrphanPorts(fileName, numberOfVisitsInPort, globalContext); - } - - - private static void validateNovaServerResourceType(String fileName, - Map.Entry<String, Resource> resourceEntry, - Map<String, Integer> numberOfVisitsInPort, - List<String> serverGroupResourcesNames, - HeatOrchestrationTemplate - heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - validateAssignedValueForImageOrFlavorFromNova(fileName, resourceEntry, globalContext); - validateNovaServerPortBinding(fileName, resourceEntry.getValue(), numberOfVisitsInPort, - globalContext); - validateAllServerGroupsPointedByServerExistAndDefined(fileName, resourceEntry, - serverGroupResourcesNames, heatOrchestrationTemplate, globalContext); - - } - - - private static void handleNestedResourceType(String fileName, String resourceName, - Resource resource, - GlobalValidationContext globalContext) { - validateAllPropertiesMatchNestedParameters(fileName, resourceName, resource, globalContext); - validateLoopsOfNestingFromFile(fileName, resource.getType(), globalContext); - } - - - private static void validateResourceGroupType(String fileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - Resource resourceDef = HeatStructureUtil - .getResourceDef(fileName, resourceEntry.getKey(), resourceEntry.getValue(), globalContext); - // validateResourceGroupTypeIsSupported(fileName, resourceEntry.getKey(),resourceDef.getType(), - // globalContext); - if (resourceDef != null) { - if (Objects.nonNull(resourceDef.getType()) - && HeatValidationService.isNestedResource(resourceDef.getType())) { - handleNestedResourceType(fileName, resourceDef.getType(), resourceDef, globalContext); - } - } - } - - - private static void validateAllPropertiesMatchNestedParameters(String fileName, - String resourceName, - Resource resource, - GlobalValidationContext - globalContext) { - - String resourceType = resource.getType(); - if (globalContext.getFileContextMap().containsKey(resourceType)) { - Set<String> propertiesNames = - resource.getProperties() == null ? null : resource.getProperties().keySet(); - if (CollectionUtils.isNotEmpty(propertiesNames)) { - HeatValidationService - .checkNestedParameters(fileName, resourceType, resourceName, globalContext, - propertiesNames); - } - } else { - globalContext.addMessage(resourceType, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_NESTED_FILE.getErrorMessage(), resourceType)); - } - } - - - private static void validateAssignedValueForImageOrFlavorFromNova(String fileName, - Map.Entry<String, Resource> - resourceEntry, - GlobalValidationContext - globalContext) { - - Resource resource = resourceEntry.getValue(); - Map<String, Object> propertiesMap = resource.getProperties(); - if (propertiesMap.get(PropertiesMapKeyTypes.IMAGE.getKeyMap()) == null - && propertiesMap.get(PropertiesMapKeyTypes.FLAVOR.getKeyMap()) == null) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_IMAGE_AND_FLAVOR.getErrorMessage(), - resourceEntry.getKey())); - } - } - - - private static void validateLoopsOfNestingFromFile(String fileName, String resourceType, - GlobalValidationContext globalContext) { - List<String> filesInLoop = new ArrayList<>(Collections.singletonList(fileName)); - if (HeatValidationService - .isNestedLoopExistInFile(fileName, resourceType, filesInLoop, globalContext)) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.NESTED_LOOP.getErrorMessage(), - HeatValidationService.drawFilesLoop(filesInLoop))); - } - } - - - /* validation 22*/ - @SuppressWarnings("unchecked") - private static void validateNovaServerPortBinding(String fileName, Resource resource, - Map<String, Integer> numberOfVisitsInPort, - GlobalValidationContext globalContext) { - - Map<String, Object> propertiesMap = resource.getProperties(); - List<Object> networksList = - (List<Object>) propertiesMap.get(PropertiesMapKeyTypes.NETWORKS.getKeyMap()); - - if (CollectionUtils.isNotEmpty(networksList)) { - networksList - .stream() - .filter(networkObject -> networkObject instanceof Map) - .forEach(networkObject -> { - Map<String, Object> portValueMap = - (Map<String, Object>) ((Map) networkObject).get("port"); - if (MapUtils.isNotEmpty(portValueMap)) { - checkPortBindingFromMap(fileName, portValueMap, numberOfVisitsInPort, globalContext); - } - }); - } - } - - /* validation 23*/ - @SuppressWarnings("unchecked") - private static void validateAllServerGroupsPointedByServerExistAndDefined(String fileName, - Map.Entry<String, Resource> resourceEntry, - List<String> serverGroupNamesList, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); - - Map<String, Object> resourceProperties = resourceEntry.getValue().getProperties(); - Map<String, Object> schedulerHintsMap = resourceProperties == null ? null - : (Map<String, Object>) resourceProperties - .get(ResourceReferenceFunctions.SCHEDULER_HINTS.getFunction()); - - if (MapUtils.isNotEmpty(schedulerHintsMap)) { - for (Object serverGroupMap : schedulerHintsMap.values()) { - Map<String, Object> currentServerMap = (Map<String, Object>) serverGroupMap; - String serverResourceName = currentServerMap == null ? null - : (String) currentServerMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); - Resource serverResource = serverResourceName == null || resourcesMap == null ? null - : resourcesMap.get(serverResourceName); - if (serverResource != null && !serverResource.getType() - .equals(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource())) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.SERVER_NOT_DEFINED_FROM_NOVA.getErrorMessage(), - serverResourceName, resourceEntry.getKey())); - } else { - serverGroupNamesList.remove(serverResourceName); - } - } - } - } - - - /* validation 24*/ - @SuppressWarnings("unchecked") - private static void validateNovaServerGroupPolicy(String fileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - - Resource resource = resourceEntry.getValue(); - List<String> policiesList = resource.getProperties() == null ? null - : (List<String>) resource.getProperties().get("policies"); - - if (CollectionUtils.isNotEmpty(policiesList)) { - if (policiesList.size() == 1) { - String policy = policiesList.get(0); - if (!PolicyTypes.isGivenPolicyValid(policy)) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(), - resourceEntry.getKey())); - } - } else { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(), - resourceEntry.getKey())); - } - } - } - - - private static void validateNeutronPortType(String filename, - Map.Entry<String, Resource> resourceEntry, - List<String> securityGroupResourceNameList, - GlobalValidationContext globalContext) { - validateAllSecurityGroupsAreUsed(filename, resourceEntry, securityGroupResourceNameList, - globalContext); - - } - - - @SuppressWarnings("unchecked") - private static void validateAllSecurityGroupsAreUsed(String filename, - Map.Entry<String, Resource> resourceEntry, - List<String> securityGroupResourceNameList, - GlobalValidationContext globalContext) { - Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); - - if (MapUtils.isEmpty(propertiesMap)) { - return; - } - - Object securityGroupsValue = propertiesMap.get("security_groups"); - - if (Objects.isNull(securityGroupsValue)) { - return; - } - - if (securityGroupsValue instanceof List) { - List<Object> securityGroupsListFromCurrResource = - (List<Object>) propertiesMap.get("security_groups"); - for (Object securityGroup : securityGroupsListFromCurrResource) { - removeSecurityGroupNamesFromListByGivenFunction(filename, - ResourceReferenceFunctions.GET_RESOURCE.getFunction(), securityGroup, - securityGroupResourceNameList, globalContext); - } - } - } - - - private static void validateSecurityGroupsFromBaseOutput(String filename, - Map.Entry<String, Resource> resourceEntry, - boolean isBaseFile, - Set<String> securityGroupNamesFromBaseOutput, - GlobalValidationContext globalContext) { - if (!isBaseFile && CollectionUtils.isNotEmpty(securityGroupNamesFromBaseOutput)) { - Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); - - if (MapUtils.isEmpty(propertiesMap)) { - return; - } - - for (Map.Entry<String, Object> propertyEntry : propertiesMap.entrySet()) { - removeSecurityGroupNamesFromListByGivenFunction(filename, - ResourceReferenceFunctions.GET_PARAM.getFunction(), propertyEntry.getValue(), - securityGroupNamesFromBaseOutput, globalContext); - } - } - } - - - private static void removeSecurityGroupNamesFromListByGivenFunction(String filename, - String functionName, - Object securityGroup, - Collection<String> securityGroupResourceNameList, - GlobalValidationContext globalContext) { - Set<String> securityGroupsNamesFromFunction = HeatStructureUtil - .getReferencedValuesByFunctionName(filename, functionName, securityGroup, globalContext); - securityGroupsNamesFromFunction.forEach(securityGroupResourceNameList::remove); - } - - - @SuppressWarnings("unchecked") - private static void validateContrailAttachPolicyType(Map.Entry<String, Resource> resourceEntry, - List<String> networkPolicyResourceNames) { - Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); - - if (MapUtils.isNotEmpty(propertiesMap)) { - Map<String, Object> policyMap = (Map<String, Object>) propertiesMap.get("policy"); - if (MapUtils.isNotEmpty(policyMap)) { - List<Object> securityGroupList = - (List<Object>) policyMap.get(ResourceReferenceFunctions.GET_ATTR.getFunction()); - //noinspection SuspiciousMethodCalls - if (CollectionUtils.isNotEmpty(securityGroupList)) { - //noinspection SuspiciousMethodCalls - networkPolicyResourceNames.remove(securityGroupList.get(0)); - } - } - } - } - - - private static void getResourceNamesListFromSpecificResource(String filename, - List<String> resourcesNames, - HeatResourcesTypes heatResourcesType, - Map<String, Resource> resourcesMap, - Set<String> sharedResourcesFromOutputMap, - GlobalValidationContext globalContext) { - - for (Map.Entry<String, Resource> resourceEntry : resourcesMap.entrySet()) { - String resourceType = resourceEntry.getValue().getType(); - if (Objects.isNull(resourceType)) { - globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), null, - resourceEntry.getKey())); - } else { - if (resourceType.equals(heatResourcesType.getHeatResource()) - && !isSharedResource(resourceEntry.getKey(), sharedResourcesFromOutputMap)) { - resourcesNames.add(resourceEntry.getKey()); - } - } - } - } - - - private static boolean isSharedResource(String resourceName, - Set<String> sharedResourcesFromOutputMap) { - return !CollectionUtils.isEmpty(sharedResourcesFromOutputMap) - && sharedResourcesFromOutputMap.contains(resourceName); - } - - /** - * Handle not empty resource names list. - * - * @param fileName the file name - * @param resourcesNameList the resources name list - * @param securityOrServerGroup the security or server group - * @param globalContext the global context - */ - public static void handleNotEmptyResourceNamesList(String fileName, - Collection<String> resourcesNameList, - String securityOrServerGroup, - GlobalValidationContext globalContext) { - if (CollectionUtils.isNotEmpty(resourcesNameList)) { - resourcesNameList.forEach(name -> - globalContext - .addMessage( - fileName, - ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.SERVER_OR_SECURITY_GROUP_NOT_IN_USE.getErrorMessage(), - securityOrServerGroup, name))); - } - } - - - private static void initVisitedPortsMap(String filename, Map<String, Resource> resourceMap, - Map<String, Integer> numberOfVisitsInPort, - GlobalValidationContext globalContext) { - for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) { - String resourceType = resourceEntry.getValue().getType(); - - if (Objects.isNull(resourceType)) { - globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null", - resourceEntry.getKey())); - } else { - if (resourceType.equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) { - numberOfVisitsInPort.put(resourceEntry.getKey(), 0); - } - } - } - } - - private static boolean checkIfPortWasVisited(String resourcePortName, - Map<String, Integer> numberOfVisitsInPort) { - return numberOfVisitsInPort.containsKey(resourcePortName) - && numberOfVisitsInPort.get(resourcePortName) == 1; - } - - - private static void incrementNumberOfVisitsInPort(String resourcePortName, - Map<String, Integer> numberOfVisitsInPort) { - if (numberOfVisitsInPort.containsKey(resourcePortName)) { - numberOfVisitsInPort.put(resourcePortName, numberOfVisitsInPort.get(resourcePortName) + 1); - } - } - - - private static void handleOrphanPorts(String fileName, Map<String, Integer> numberOfVisitsInPort, - GlobalValidationContext globalContext) { - numberOfVisitsInPort - .entrySet() - .stream() - .filter(entry -> entry.getValue() == 0) - .forEach(entry -> - globalContext - .addMessage( - fileName, - ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(), - entry.getKey()))); - } - - @SuppressWarnings("unchecked") - private static void checkResourceDependsOn(String fileName, Resource resource, - Set<String> resourcesNames, - GlobalValidationContext globalContext) { - Object dependencies = resource.getDepends_on(); - if (dependencies instanceof Collection) { - ((Collection<String>) dependencies) - .stream() - .filter(resource_id -> !resourcesNames.contains(resource_id)) - .forEach(resource_id -> globalContext.addMessage(fileName, ErrorLevel.ERROR, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(), - (String) resource_id))); - } else if (dependencies instanceof String) { - if (!resourcesNames.contains(dependencies)) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(), - (String) dependencies)); - } - } - } - - - private static void checkPortBindingFromMap(String fileName, Map<String, Object> portValueMap, - Map<String, Integer> numberOfVisitsInPort, - GlobalValidationContext globalContext) { - String resourcePortName = - (String) portValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); - if (checkIfPortWasVisited(resourcePortName, numberOfVisitsInPort)) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT.getErrorMessage(), - (String) portValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()))); - } else { - incrementNumberOfVisitsInPort(resourcePortName, numberOfVisitsInPort); - } - } - - - private static void initResourceTypeListWithItsResourcesNames(String filename, - Map<HeatResourcesTypes, List<String>> resourcesTypesListMap, - Map<String, Resource> resourcesMap, - Set<String> sharedResourcesFromOutputsMap, - GlobalValidationContext globalContext) { - for (Map.Entry<HeatResourcesTypes, List<String>> resourcesTypesToListEntry - : resourcesTypesListMap.entrySet()) { - HeatResourcesTypes currentType = resourcesTypesToListEntry.getKey(); - List<String> currNamesList = new ArrayList<>(); - getResourceNamesListFromSpecificResource(filename, currNamesList, currentType, resourcesMap, - sharedResourcesFromOutputsMap, globalContext); - resourcesTypesListMap.put(currentType, currNamesList); - } - } - - - private static void checkForEmptyResourceNamesInMap(String fileName, - boolean isBaseFileContainPorts, - Map<HeatResourcesTypes, List<String>> resourcesTypesListMap, - GlobalValidationContext globalContext) { - if (isBaseFileContainPorts) { - for (Map.Entry<HeatResourcesTypes, List<String>> resourcesTypesListEntry - : resourcesTypesListMap.entrySet()) { - handleNotEmptyResourceNamesList(fileName, resourcesTypesListEntry.getValue(), - ResourceTypeToMessageString - .getTypeForMessageFromResourceType(resourcesTypesListEntry.getKey()), - globalContext); - } - } - } - - - private static Set<String> getSharedResourcesNamesFromOutputs(String filename, - Map<String, Output> outputsMap, - GlobalValidationContext globalContext) { - Set<String> sharedResources = new HashSet<>(); - - if (MapUtils.isEmpty(outputsMap)) { - return null; - } - - for (Map.Entry<String, Output> outputEntry : outputsMap.entrySet()) { - Output output = outputEntry.getValue(); - Object valueObject = output.getValue(); - if (valueObject instanceof Map) { - Map<String, Object> outputValueMap = (Map<String, Object>) valueObject; - Object getResourceValue = - outputValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); - if (Objects.nonNull(getResourceValue)) { - if (getResourceValue instanceof String) { - String resourceName = - (String) outputValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); - sharedResources.add(resourceName); - } else { - globalContext.addMessage(filename, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_GET_RESOURCE_SYNTAX.getErrorMessage(), - getResourceValue.toString())); - } - } - - } - } - - return sharedResources; - } -} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java new file mode 100644 index 0000000000..8eb8d50774 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.util; + +import org.openecomp.sdc.common.errors.Messages; +import org.yaml.snakeyaml.error.MarkedYAMLException; +import org.yaml.snakeyaml.parser.ParserException; + +/** + * @author Avrahamg + * @since December 08, 2016 + */ +public class YamlValidatorUtil { + public static String getParserExceptionReason(Exception exception) { + String reason = null; + + if (exception.getCause() instanceof MarkedYAMLException) { + if (exception.getCause() != null) { + if (exception.getCause().getCause() instanceof ParserException) { + reason = exception.getCause().getCause().getMessage(); + } else { + reason = exception.getCause().getMessage(); + } + } + } else if (exception instanceof MarkedYAMLException) { + + reason = exception.getMessage(); + + } else { + reason = Messages.GENERAL_YAML_PARSER_ERROR.getErrorMessage(); + } + return reason; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ContrailValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ContrailValidator.java new file mode 100644 index 0000000000..3e7d83457f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ContrailValidator.java @@ -0,0 +1,201 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.validators; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.utilities.yaml.YamlUtil; +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.manifest.FileData; +import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.heat.services.HeatConstants; +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.tos.ContrailResourcesMappingTo; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.io.InputStream; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + + +public class ContrailValidator implements Validator { + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + protected static Logger logger = (Logger) LoggerFactory.getLogger(ContrailValidator.class); + + @Override + public void validate(GlobalValidationContext globalContext) { + mdcDataDebugMessage.debugEntryMessage(null, null); + + ManifestContent manifestContent; + try { + manifestContent = ValidationUtil.checkValidationPreCondition(globalContext); + } catch (Exception exception) { + return; + } + Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); + ContrailResourcesMappingTo contrailResourcesMappingTo = new ContrailResourcesMappingTo(); + + globalContext.getFiles().stream() + .filter(fileName -> FileData.isHeatFile(fileTypeMap.get(fileName))) + .forEach(fileName -> validate(fileName, fileTypeMap, + contrailResourcesMappingTo, globalContext)); + + mdcDataDebugMessage.debugExitMessage(null, null); + } + + + private void validate(String fileName, Map<String, FileData.Type> fileTypeMap, + ContrailResourcesMappingTo contrailResourcesMappingTo, + GlobalValidationContext globalContext) { + handleContrailV1AndContrailV2ResourceMerging(fileName, fileTypeMap, contrailResourcesMappingTo, + globalContext); + validateNoContrailResourceTypeIsInUse(fileName, globalContext); + } + + + private void handleContrailV1AndContrailV2ResourceMerging(String fileName, + Map<String, FileData.Type> fileTypeMap, + ContrailResourcesMappingTo contrailResourcesMappingTo, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Optional<ContrailResourcesMappingTo> fileContrailResourcesMappingTo = + collectHeatFileContrailResources(globalContext, fileName); + if (fileContrailResourcesMappingTo.isPresent()) { + contrailResourcesMappingTo.addAll(fileContrailResourcesMappingTo.get()); + } + addContrailMergeValidationMessageToGlobalContext(globalContext, contrailResourcesMappingTo); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void addContrailMergeValidationMessageToGlobalContext( + GlobalValidationContext globalContext, + ContrailResourcesMappingTo contrailResourcesMappingTo) { + + + mdcDataDebugMessage.debugEntryMessage(null, null); + + if (!MapUtils.isEmpty(contrailResourcesMappingTo.getContrailV1Resources()) + && !MapUtils.isEmpty(contrailResourcesMappingTo.getContrailV2Resources())) { + globalContext.addMessage( + contrailResourcesMappingTo.getContrailV1Resources().keySet().iterator().next(), + ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.MERGE_OF_CONTRAIL2_AND_CONTRAIL3_RESOURCES.getErrorMessage(), + contrailResourcesMappingTo.fetchContrailV1Resources(), + contrailResourcesMappingTo.fetchContrailV2Resources()), + LoggerTragetServiceName.MERGE_OF_CONTRAIL_2_AND_3, + LoggerErrorDescription.MERGE_CONTRAIL_2_AND_3); + } + + mdcDataDebugMessage.debugExitMessage(null, null); + } + + private Optional<ContrailResourcesMappingTo> collectHeatFileContrailResources( + GlobalValidationContext globalContext, String fileName) { + Optional<InputStream> fileContent = globalContext.getFileContent(fileName); + if (!fileContent.isPresent()) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), + "The file '" + fileName + "' has no content"), + LoggerTragetServiceName.VALIDATE_HEAT_FORMAT, LoggerErrorDescription.INVALID_HEAT_FORMAT); + return Optional.empty(); + } + return fetchContrailResourcesMapping(fileName, fileContent.get(), globalContext); + } + + private Optional<ContrailResourcesMappingTo> fetchContrailResourcesMapping(String fileName, + InputStream fileContent, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + ContrailResourcesMappingTo contrailResourcesMappingTo = new ContrailResourcesMappingTo(); + HeatOrchestrationTemplate heatOrchestrationTemplate; + try { + heatOrchestrationTemplate = + new YamlUtil().yamlToObject(fileContent, HeatOrchestrationTemplate.class); + } catch (Exception ignored) { + // the HeatValidator should handle file that is failing to parse + mdcDataDebugMessage.debugExitMessage("file", fileName); + return Optional.empty(); + } + if( !MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { + heatOrchestrationTemplate.getResources().entrySet() + .forEach(entry -> { + if (entry.getValue().getType().startsWith(HeatConstants.CONTRAIL_RESOURCE_PREFIX)) { + contrailResourcesMappingTo.addContrailV1Resource(fileName, entry.getKey()); + } else if (entry.getValue().getType() + .startsWith(HeatConstants.CONTRAIL_V2_RESOURCE_PREFIX)) { + contrailResourcesMappingTo.addContrailV2Resource(fileName, entry.getKey()); + } + }); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + return Optional.of(contrailResourcesMappingTo); + } + + + private void validateNoContrailResourceTypeIsInUse(String fileName, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + HeatOrchestrationTemplate heatOrchestrationTemplate = + ValidationUtil.checkHeatOrchestrationPreCondition(fileName, globalContext); + + if (heatOrchestrationTemplate == null) { + return; + } + + Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); + + if( ! MapUtils.isEmpty(resourcesMap)) { + for (Map.Entry<String, Resource> resourceEntry : resourcesMap.entrySet()) { + String type = resourceEntry.getValue().getType(); + if (Objects.nonNull(type) && type.startsWith(HeatConstants.CONTRAIL_RESOURCE_PREFIX)) { + globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.CONTRAIL_2_IN_USE.getErrorMessage(), + resourceEntry.getKey()), LoggerTragetServiceName.CONTRAIL_2_IN_USE, + LoggerErrorDescription.CONTRAIL_2_IN_USE); + } + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java deleted file mode 100644 index 5be56e4b38..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java +++ /dev/null @@ -1,784 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.validation.impl.validators; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.MapUtils; -import org.openecomp.core.utilities.CommonMethods; -import org.openecomp.core.utilities.yaml.YamlUtil; -import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.interfaces.Validator; -import org.openecomp.core.validation.types.GlobalValidationContext; -import org.openecomp.sdc.common.utils.AsdcCommon; -import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.datatypes.model.heat.ForbiddenHeatResourceTypes; -import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes; -import org.openecomp.sdc.heat.datatypes.manifest.FileData; -import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; -import org.openecomp.sdc.heat.datatypes.model.Environment; -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.datatypes.model.ResourceReferenceFunctions; -import org.openecomp.sdc.heat.services.HeatStructureUtil; -import org.openecomp.sdc.heat.services.manifest.ManifestUtil; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.regex.Pattern; - -public class EcompGuideLineValidator extends HeatValidator implements Validator { - @Override - public void validate(GlobalValidationContext globalContext) { - - ManifestContent manifestContent; - try { - manifestContent = checkValidationPreCondition(globalContext); - } catch (Exception exception) { - return; - } - - //global validations - Set<String> baseFiles = validateManifest(manifestContent, globalContext); - - Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); - Map<String, FileData> fileEnvMap = ManifestUtil.getFileAndItsEnv(manifestContent); - globalContext - .getFiles() - .stream() - .filter(fileName -> FileData - .isHeatFile(fileTypeMap.get(fileName))) - .forEach(fileName -> validate(fileName, - fileEnvMap.get(fileName) != null ? fileEnvMap.get(fileName).getFile() : null, - fileTypeMap, baseFiles, globalContext)); - } - - private void validate(String fileName, String envFileName, Map<String, FileData.Type> fileTypeMap, - Set<String> baseFiles, GlobalValidationContext globalContext) { - HeatOrchestrationTemplate heatOrchestrationTemplate = - checkHeatOrchestrationPreCondition(fileName, globalContext); - if (heatOrchestrationTemplate == null) { - return; - } - - validateBaseFile(fileName, baseFiles, heatOrchestrationTemplate, globalContext); - validateHeatVolumeFile(fileName, fileTypeMap, heatOrchestrationTemplate, globalContext); - validateHeatNamingConvention(fileName, heatOrchestrationTemplate, globalContext); - validateHeatNovaResource(fileName, envFileName, heatOrchestrationTemplate, globalContext); - validateResourceTypeIsForbidden(fileName, heatOrchestrationTemplate, globalContext); - validateFixedIpsNamingConvention(fileName, heatOrchestrationTemplate, globalContext); - } - - private void validateHeatNovaResource(String fileName, String envFileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>(); - //if no resources exist return - if (heatOrchestrationTemplate.getResources() == null - || heatOrchestrationTemplate.getResources().size() == 0) { - return; - } - - heatOrchestrationTemplate - .getResources() - .entrySet() - .stream() - .filter(entry -> entry.getValue().getType() - .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource())) - .forEach(entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName, - entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext)); - } - - private void validateNovaServerResourceType(String resourceId, String fileName, - String envFileName, - Map.Entry<String, Resource> resourceEntry, - Map<String, String> uniqueResourcePortNetworkRole, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalValidationContext) { - validateNovaServerResourceMetaData(fileName, resourceId, - heatOrchestrationTemplate.getResources().get(resourceId), globalValidationContext); - validateNovaServerResourceNetworkUniqueRole(fileName, resourceId, heatOrchestrationTemplate, - globalValidationContext); - validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, - globalValidationContext); - validateNovaServerAvailabilityZoneName(fileName, resourceEntry, globalValidationContext); - validateImageAndFlavorFromNovaServer(fileName, resourceEntry, globalValidationContext); - } - - @SuppressWarnings("unchecked") - private void validateNovaServerResourceMetaData(String fileName, String resourceId, - Resource resource, - GlobalValidationContext globalValidationContext) { - Map<String, Object> novaServerProp = resource.getProperties(); - Object novaServerPropMetadata; - if (MapUtils.isNotEmpty(novaServerProp)) { - novaServerPropMetadata = novaServerProp.get("metadata"); - if (novaServerPropMetadata == null) { - globalValidationContext.addMessage( - fileName, - ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_METADATA.getErrorMessage(), - resourceId)); - } else if (novaServerPropMetadata instanceof Map) { - TreeMap<String, Object> propertyMap = new TreeMap(new Comparator<String>() { - - @Override - public int compare(String o1, String o2) { - return o1.compareToIgnoreCase(o2); - } - - @Override - public boolean equals(Object obj) { - return false; - } - }); - propertyMap.putAll((Map) novaServerPropMetadata); - if (!propertyMap.containsKey("vf_module_id")) { - globalValidationContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder.getErrorWithParameters( - Messages.MISSING_NOVA_SERVER_VF_MODULE_ID.getErrorMessage(), resourceId)); - } - if (!propertyMap.containsKey("vnf_id")) { - globalValidationContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_VNF_ID.getErrorMessage(), - resourceId)); - } - } - } - } - - private void validateNovaServerResourceNetworkUniqueRole(String fileName, String resourceId, - HeatOrchestrationTemplate - heatOrchestrationTemplate, - GlobalValidationContext - globalValidationContext) { - - String network; - String role; - Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>(); - - Object propertyNetworkValue = - heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks"); - if (propertyNetworkValue != null && propertyNetworkValue instanceof List) { - List<String> portResourceIdList = - getNovaNetworkPortResourceList(fileName, (List) propertyNetworkValue, - globalValidationContext); - for (String portResourceId : portResourceIdList) { - Resource portResource = heatOrchestrationTemplate.getResources().get(portResourceId); - if (portResource != null && portResource.getType() - .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) { - Map portNetwork = - getPortNetwork(fileName, resourceId, portResource, globalValidationContext); - if (Objects.nonNull(portNetwork)) { - network = (String) portNetwork.get("get_param"); - if (Objects.nonNull(network)) { - role = getNetworkRole(network); - if (role != null && uniqueResourcePortNetworkRole.containsKey(role)) { - globalValidationContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder.getErrorWithParameters( - Messages.RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE - .getErrorMessage(), resourceId, role)); - } else { - uniqueResourcePortNetworkRole.put(role, portResourceId); - } - } - } - } - } - } - } - - - private Map getPortNetwork(String fileName, String resourceId, Resource portResource, - GlobalValidationContext globalValidationContext) { - Object portNetwork = portResource.getProperties().get("network_id"); - if (portNetwork == null) { - portNetwork = portResource.getProperties().get("network"); - } - if (!(portNetwork instanceof Map)) { - globalValidationContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), - "network or network_id", resourceId)); - return null; - } - return (Map) portNetwork; - } - - private List<String> getNovaNetworkPortResourceList(String filename, List propertyNetworkValue, - GlobalValidationContext globalContext) { - List<String> portResourceIdList = new ArrayList<>(); - for (Object propValue : propertyNetworkValue) { - Object portPropValue = ((Map) propValue).get("port"); - Collection<String> portResourceIds = HeatStructureUtil - .getReferencedValuesByFunctionName(filename, "get_resource", portPropValue, - globalContext); - if (portResourceIds != null) { - portResourceIdList.addAll(portResourceIds); - } - } - - return portResourceIdList; - } - - private String getNetworkRole(String network) { - if (network == null) { - return null; - } - if (network.contains("_net_id")) { - return network.substring(0, network.indexOf("_net_id")); - } else if (network.contains("net_name")) { - return network.substring(0, network.indexOf("_net_name")); - } else if (network.contains("net_fqdn")) { - return network.substring(0, network.indexOf("_net_fqdn")); - } - return null; - } - - private void validateHeatNamingConvention(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - validatePortNetworkNamingConvention(fileName, heatOrchestrationTemplate, globalContext); - } - - private void validatePortNetworkNamingConvention(String fileName, - HeatOrchestrationTemplate - heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { - return; - } - String[] regexList = new String[]{".*_net_id", ".*_net_name", ".*_net_fqdn"}; - - heatOrchestrationTemplate - .getResources() - .entrySet() - .stream() - .filter(entry -> entry.getValue().getType() != null && entry.getValue().getType() - .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) - .forEach(entry -> entry.getValue() - .getProperties() - .entrySet() - .stream() - .filter(propertyEntry -> propertyEntry != null - && (propertyEntry.getKey().toLowerCase().equals("network".toLowerCase()) - || - propertyEntry.getKey().equals("network_id"))) - .forEach(propertyEntry -> validateParamNamingConvention(fileName, entry.getKey(), - propertyEntry.getValue(), regexList, - Messages.NETWORK_PARAM_NOT_ALIGNED_WITH_GUIDE_LINE, globalContext))); - } - - private void validateParamNamingConvention(String fileName, String resourceId, - Object propertyValue, String[] regexList, - Messages message, - GlobalValidationContext globalContext) { - Object paramName; - if (propertyValue instanceof Map) { - paramName = ((Map) propertyValue).get("get_param"); - if (paramName instanceof String) { - if (!evalPattern((String) paramName, regexList)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(message.getErrorMessage(), (String) paramName, resourceId)); - } - } - } else { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), - "network or network_id", resourceId)); - } - } - - private boolean evalPattern(Object paramVal, String[] regexList) { - String value = ""; - if (paramVal instanceof String) { - value = ((String) paramVal); - } - if (paramVal instanceof Integer) { - value = paramVal.toString(); - } - return evalPattern(value, regexList); - } - - private boolean evalPattern(String paramVal, String[] regexList) { - - for (String regex : regexList) { - if (Pattern.matches(regex, paramVal)) { - return true; - } - } - - return false; - } - - - private void validateHeatVolumeFile(String fileName, Map<String, FileData.Type> fileTypeMap, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - //if not heat volume return - if (!fileTypeMap.get(fileName).equals(FileData.Type.HEAT_VOL)) { - return; - } - - //if no resources exist return - if (heatOrchestrationTemplate.getResources() == null - || heatOrchestrationTemplate.getResources().size() == 0) { - return; - } - - Set<String> expectedExposedResources = new HashSet<>(); - Set<String> actualExposedResources = new HashSet<>(); - heatOrchestrationTemplate.getResources() - .entrySet() - .stream() - .filter(entry -> entry.getValue().getType() - .equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource())) - .forEach(entry -> expectedExposedResources.add(entry.getKey())); - - if (heatOrchestrationTemplate.getOutputs() != null) { - - heatOrchestrationTemplate.getOutputs().entrySet() - .stream() - .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(), - globalContext)) - .forEach(entry -> actualExposedResources.add( - getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(), - globalContext))); - } - - actualExposedResources.stream().forEach(expectedExposedResources::remove); - - if (expectedExposedResources.size() > 0) { - expectedExposedResources - .stream() - .forEach(name -> globalContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.VOLUME_HEAT_NOT_EXPOSED.getErrorMessage(), - name))); - } - } - - private void validateBaseFile(String fileName, Set<String> baseFiles, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - - //if not base return - if (baseFiles == null || !baseFiles.contains(fileName)) { - return; - } - - //if no resources exist return - if (heatOrchestrationTemplate.getResources() == null - || heatOrchestrationTemplate.getResources().size() == 0) { - return; - } - - Set<String> expectedExposedResources = new HashSet<>(); - Set<String> actualExposedResources = new HashSet<>(); - heatOrchestrationTemplate.getResources() - .entrySet() - .stream() - .filter(entry -> isExpectedToBeExposed(entry.getValue().getType())) - .forEach(entry -> expectedExposedResources.add(entry.getKey())); - - if (heatOrchestrationTemplate.getOutputs() != null) { - - heatOrchestrationTemplate.getOutputs().entrySet() - .stream() - .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(), - globalContext)) - .forEach(entry -> actualExposedResources.add( - getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(), - globalContext))); - } - actualExposedResources.stream().forEach(expectedExposedResources::remove); - - if (expectedExposedResources.size() > 0) { - expectedExposedResources - .stream() - .forEach(name -> globalContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.RESOURCE_NOT_DEFINED_IN_OUTPUT.getErrorMessage(), - name))); - } - } - - private void validateResourceTypeIsForbidden(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { - return; - } - - heatOrchestrationTemplate.getResources() - .entrySet() - .stream() - .filter(entry -> - ForbiddenHeatResourceTypes.findByForbiddenHeatResource(entry.getValue().getType()) - != null) - .filter(entry -> ForbiddenHeatResourceTypes - .findByForbiddenHeatResource(entry.getValue().getType()) - .equals(ForbiddenHeatResourceTypes.HEAT_FLOATING_IP_TYPE)) - .forEach(entry -> globalContext.addMessage(fileName, ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.FLOATING_IP_NOT_IN_USE.getErrorMessage(), - entry.getKey()))); - } - - - private void validateFixedIpsNamingConvention(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { - return; - } - - heatOrchestrationTemplate.getResources() - .entrySet() - .stream() - .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType()) != null) - .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType()) - .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE)) - .forEach(entry -> checkNeutronPortFixedIpsName(fileName, entry, globalContext)); - } - - private void validateImageAndFlavorFromNovaServer(String fileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { - return; - } - - String[] imageOrFlavorAsParameters = new String[]{"image", "flavor"}; - Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); - - for (String imageOrFlavor : imageOrFlavorAsParameters) { - checkImageAndFlavorNames(fileName, imageOrFlavor, resourceEntry.getKey(), propertiesMap, - globalContext); - } - } - - private void checkImageAndFlavorNames(String fileName, String imageOrFlavor, String resourceId, - Map<String, Object> propertiesMap, - GlobalValidationContext globalContext) { - Object nameValue = - propertiesMap.get(imageOrFlavor) == null ? null : propertiesMap.get(imageOrFlavor); - String[] regexList = new String[]{".*_" + imageOrFlavor + "_name"}; - - if (Objects.nonNull(nameValue)) { - if (nameValue instanceof Map) { - String imageOrFlavorName = getWantedNameFromPropertyValueGetParam(nameValue); - if (Objects.nonNull(imageOrFlavorName)) { - if (!evalPattern(imageOrFlavorName, regexList)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.WRONG_IMAGE_OR_FLAVOR_NAME_NOVA_SERVER.getErrorMessage(), - imageOrFlavor, resourceId)); - } - } - } else { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), imageOrFlavor, - resourceId)); - } - } - } - - - @SuppressWarnings("unchecked") - private void checkNeutronPortFixedIpsName(String fileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - String[] regexList = - new String[]{"[^_]+_[^_]+_ips", "[^_]+_[^_]+_v6_ips", "[^_]+_[^_]+_ip_(\\d+)", - "[^_]+_[^_]+_v6_ip_(\\d+)"}; - - if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { - return; - } - - Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); - Object fixedIps = propertiesMap.get("fixed_ips"); - if (Objects.nonNull(fixedIps) && fixedIps instanceof List) { - List<Object> fixedIpsList = (List<Object>) fixedIps; - for (Object fixedIpsObject : fixedIpsList) { - Map.Entry<String, Object> fixedIpsEntry = - ((Map<String, Object>) fixedIpsObject).entrySet().iterator().next(); - if (Objects.nonNull(fixedIpsEntry)) { - if (fixedIpsEntry.getValue() instanceof Map) { - String fixedIpsName = getWantedNameFromPropertyValueGetParam(fixedIpsEntry.getValue()); - if (Objects.nonNull(fixedIpsName)) { - if (!evalPattern(fixedIpsName, regexList)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.FIXED_IPS_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(), - resourceEntry.getKey())); - } - } - } else { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), "fixed_ips", - resourceEntry.getKey())); - } - } - } - } - } - - - private void validateNovaServerNamingConvention(String fileName, String envFileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { - return; - } - - checkIfNovaNameByGuidelines(fileName, envFileName, resourceEntry, globalContext); - } - - private void checkIfNovaNameByGuidelines(String fileName, String envFileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { - return; - } - - Object novaServerName = resourceEntry.getValue().getProperties().get("name"); - Map novaNameMap; - String novaName; - if (Objects.nonNull(novaServerName)) { - if (novaServerName instanceof Map) { - novaNameMap = (Map) novaServerName; - Object novaNameGetParam = - novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()) == null ? null - : novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()); - if (Objects.nonNull(novaNameGetParam)) { - checkNovaNameGetParamValueMap(fileName, novaNameGetParam, resourceEntry, globalContext); - novaName = novaNameGetParam instanceof List ? (String) ((List) novaNameGetParam).get(0) - : (String) novaNameGetParam; - checkIfNovaNameParameterInEnvIsStringOrList(fileName, envFileName, resourceEntry, - novaName, globalContext); - } - } else { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), - "nova server name", resourceEntry.getKey())); - } - } - - } - - private void checkIfNovaNameParameterInEnvIsStringOrList(String fileName, String envFileName, - Map.Entry<String, Resource> - resourceEntry, - String novaServerName, - GlobalValidationContext globalContext) { - if (Objects.nonNull(envFileName)) { - Environment environment = validateEnvContent(envFileName, globalContext); - - if (environment != null && MapUtils.isNotEmpty(environment.getParameters())) { - Object novaServerNameEnvValue = - environment.getParameters().containsKey(novaServerName) ? environment.getParameters() - .get(novaServerName) : null; - if (Objects.nonNull(novaServerNameEnvValue)) { - if (!DefinedHeatParameterTypes - .isNovaServerEnvValueIsFromRightType(novaServerNameEnvValue)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(), - resourceEntry.getKey())); - } - } - } - } - } - - - private void validateNovaServerAvailabilityZoneName(String fileName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - String[] regexList = new String[]{"availability_zone_(\\d+)"}; - - if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { - return; - } - - Object availabilityZoneMap = - resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry - .getValue().getProperties().get("availability_zone") : null; - - if (Objects.nonNull(availabilityZoneMap)) { - if (availabilityZoneMap instanceof Map) { - String availabilityZoneName = getWantedNameFromPropertyValueGetParam(availabilityZoneMap); - - if (availabilityZoneName != null) { - if (!evalPattern(availabilityZoneName, regexList)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.AVAILABILITY_ZONE_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(), - resourceEntry.getKey())); - } - } - } else { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), - "availability_zone", resourceEntry.getKey())); - } - } - - } - - @SuppressWarnings("unchecked") - private void checkNovaNameGetParamValueMap(String fileName, Object getParamValue, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - if (getParamValue instanceof List) { - List<Object> getParamNameList = (List) getParamValue; - String[] regexName = new String[]{".*_names"}; - isNovaNameAsListLegal(fileName, getParamNameList, regexName, resourceEntry, globalContext); - } else if (getParamValue instanceof String) { - String[] regexName = new String[]{".*_name_(\\d+)"}; - isNovaNameAsStringLegal(fileName, (String) getParamValue, regexName, resourceEntry, - globalContext); - } - - } - - - private void isNovaNameAsListLegal(String fileName, List<Object> getParamNameList, - String[] regexName, Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - - if (getParamNameList.size() != 2 || !evalPattern(getParamNameList.get(0), regexName)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(), - resourceEntry.getKey())); - } - } - - private boolean isNovaNameAsStringLegal(String fileName, String novaName, String[] regexName, - Map.Entry<String, Resource> resourceEntry, - GlobalValidationContext globalContext) { - if (!evalPattern(novaName, regexName)) { - globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(), - resourceEntry.getKey())); - return false; - } - return true; - } - - private String getWantedNameFromPropertyValueGetParam(Object value) { - Set<String> paramName = HeatStructureUtil - .getReferencedValuesByFunctionName(null, ResourceReferenceFunctions.GET_PARAM.getFunction(), - value, null); - if (paramName != null && CollectionUtils.isNotEmpty(paramName)) { - return (String) paramName.toArray()[0]; - } - return null; - } - - private String getResourceIdFromPropertyValue(String filename, Object value, - GlobalValidationContext globalContext) { - Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename, - ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext); - if (referenceValues != null && CollectionUtils.isNotEmpty(referenceValues)) { - return (String) referenceValues.toArray()[0]; - } - return null; - } - - private boolean isPropertyValueGetResource(String filename, Object value, - GlobalValidationContext globalContext) { - Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename, - ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext); - return referenceValues != null && (referenceValues.size() > 0); - } - - private boolean isExpectedToBeExposed(String type) { - return HeatResourcesTypes.isResourceExpectedToBeExposed(type); - } - - private Set<String> validateManifest(ManifestContent manifestContent, - GlobalValidationContext globalContext) { - Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent); - if (baseFiles == null || baseFiles.size() == 0) { - globalContext.addMessage( - AsdcCommon.MANIFEST_NAME, - ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MISSIN_BASE_HEAT_FILE.getErrorMessage())); - } else if (baseFiles.size() > 1) { - String baseFileList = getElementListAsString(baseFiles); - globalContext.addMessage( - AsdcCommon.MANIFEST_NAME, - ErrorLevel.WARNING, - ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.MULTI_BASE_HEAT_FILE.getErrorMessage(), - baseFileList)); - } - return baseFiles; - } - - private String getElementListAsString(Set<String> elementCollection) { - - return "[" + CommonMethods.collectionToCommaSeparatedString(elementCollection) + "]"; - } - - - private Environment validateEnvContent(String envFileName, - GlobalValidationContext globalContext) { - Environment envContent; - try { - envContent = - new YamlUtil().yamlToObject(globalContext.getFileContent(envFileName), Environment.class); - } catch (Exception exception) { - return null; - } - return envContent; - } - - private HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName, - GlobalValidationContext - globalContext) { - HeatOrchestrationTemplate heatOrchestrationTemplate; - try { - heatOrchestrationTemplate = new YamlUtil() - .yamlToObject(globalContext.getFileContent(fileName), HeatOrchestrationTemplate.class); - - } catch (Exception exception) { - return null; - } - return heatOrchestrationTemplate; - } -}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java new file mode 100644 index 0000000000..2531150eab --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java @@ -0,0 +1,125 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.manifest.FileData; +import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.heat.services.manifest.ManifestUtil; +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.util.ValidationUtil; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * Created by TALIO on 2/15/2017. + */ +public class ForbiddenResourceGuideLineValidator implements Validator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static Set<String> forbiddenResources = new HashSet<>(); + + @Override + public void init(Map<String, Object> properties) { + Map<String, Map<String, Object>> forbiddenResourcesMap = + (Map<String, Map<String, Object>>) properties.get("forbiddenResourceTypes"); + + forbiddenResourcesMap.entrySet().stream() + .filter(entry -> isResourceEnabled(entry.getValue().get("enable"))) + .forEach(entry -> forbiddenResources.add(entry.getKey())); + + + + + } + + private boolean isResourceEnabled(Object enableValue){ + if(Objects.isNull(enableValue)){ + return true; + } + + if(enableValue instanceof Boolean){ + return (Boolean)enableValue; + } + + return Boolean.valueOf((String) enableValue); + } + + + @Override + public void validate(GlobalValidationContext globalContext) { + ManifestContent manifestContent; + try { + manifestContent = ValidationUtil.checkValidationPreCondition(globalContext); + } catch (Exception exception) { + return; + } + + Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); + + globalContext.getFiles().stream() + .filter(fileName -> FileData + .isHeatFile(fileTypeMap.get(fileName))) + .forEach(fileName -> validate(fileName, globalContext)); + } + + private void validate(String fileName, GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate = ValidationUtil.checkHeatOrchestrationPreCondition(fileName, globalContext); + if (heatOrchestrationTemplate == null) { + return; + } + + validateResourceTypeIsForbidden(fileName, heatOrchestrationTemplate, globalContext); + } + + private void validateResourceTypeIsForbidden(String fileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); + if (MapUtils.isEmpty(resourcesMap)) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + for (Map.Entry<String, Resource> resourceEntry : resourcesMap.entrySet()) { + String resourceType = resourceEntry.getValue().getType(); + if (Objects.isNull(resourceType)) { + globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null", + resourceEntry.getKey()), LoggerTragetServiceName.VALIDATE_RESOURCE_TYPE, + LoggerErrorDescription.INVALID_RESOURCE_TYPE); + } else { + if(isResourceForbidden(resourceType)){ + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.FORBIDDEN_RESOURCE_IN_USE.getErrorMessage(), + resourceType, + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_FORBIDDEN_RESOURCE, + LoggerErrorDescription.FLOATING_IP_IN_USE); + } + } + } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private boolean isResourceForbidden(String resourceType){ + return forbiddenResources.contains(resourceType); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatResourceValidator.java new file mode 100644 index 0000000000..2712dab11c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatResourceValidator.java @@ -0,0 +1,341 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.Output; +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.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.validation.ValidationContext; +import org.openecomp.sdc.validation.base.ResourceBaseValidator; +import org.openecomp.sdc.validation.type.ConfigConstants; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + +public class HeatResourceValidator extends ResourceBaseValidator { + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static Logger logger = (Logger) LoggerFactory.getLogger(ResourceBaseValidator.class); + + @Override + public void init(Map<String, Object> properties) { + super.init((Map<String, Object>) properties.get(ConfigConstants.Resource_Base_Validator)); + } + + @Override + public ValidationContext createValidationContext(String fileName, + String envFileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + ManifestContent manifestContent = new ManifestContent(); + try { + manifestContent = ValidationUtil.checkValidationPreCondition(globalContext); + } catch (Exception exception) { + + } + Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent); + String baseFileName = CollectionUtils.isEmpty(baseFiles) ? null : baseFiles.iterator().next(); + HeatOrchestrationTemplate baseHot = + ValidationUtil.checkHeatOrchestrationPreCondition(baseFileName, globalContext); + Set<String> securityGroupsNamesFromBaseFileOutputs = baseFileName == null ? new HashSet<>() + : checkForBaseFilePortsExistenceAndReturnSecurityGroupNamesFromOutputsIfNot + (baseFileName, baseHot, globalContext); + + Map<String, Resource> resourcesMap = + heatOrchestrationTemplate.getResources() == null ? new HashMap<>() + : heatOrchestrationTemplate.getResources(); + + Map<String, Output> outputMap = heatOrchestrationTemplate.getOutputs() == null ? new HashMap<>() + : heatOrchestrationTemplate.getOutputs(); + + Map<String, Map<String, Map<String, List<String>>>> + typeToPointingResourcesMap = new HashMap<>(); + + initTypeRelationsMap + (fileName, resourcesMap, outputMap, + securityGroupsNamesFromBaseFileOutputs, typeToPointingResourcesMap, globalContext); + + return new HeatResourceValidationContext + (heatOrchestrationTemplate, typeToPointingResourcesMap, envFileName); + } + + private void initTypeRelationsMap(String fileName, + Map<String, Resource> resourceMap, + Map<String, Output> outputMap, + Set<String> securityGroupsNamesFromBaseFileOutputs, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap, + GlobalValidationContext globalContext) { + + initTypeRelationsMapFromResourcesMap + (fileName, resourceMap, securityGroupsNamesFromBaseFileOutputs, + typeToPointingResourcesMap, globalContext); + + initTypeRelationsMapFromOutputsMap + (fileName, resourceMap, outputMap, + typeToPointingResourcesMap, globalContext); + } + + private void initTypeRelationsMapFromOutputsMap(String fileName, + Map<String, Resource> resourceMap, + Map<String, Output> outputMap, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap, + GlobalValidationContext globalContext) { + for (Map.Entry<String, Output> outputEntry : outputMap.entrySet()) { + Object outputValue = outputEntry.getValue().getValue(); + Set<String> referencedResources = HeatStructureUtil + .getReferencedValuesByFunctionName(fileName, + ResourceReferenceFunctions.GET_RESOURCE.getFunction(), outputValue, globalContext); + + updateRelationsMapWithOutputsReferences + (outputEntry, resourceMap, referencedResources, typeToPointingResourcesMap); + + + } + } + + private void updateRelationsMapWithOutputsReferences(Map.Entry<String, Output> outputEntry, + Map<String, Resource> resourceMap, + Set<String> referencedResources, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap) { + + for (String pointedResourceName : referencedResources) { + Resource pointedResource = resourceMap.get(pointedResourceName); + + if (Objects.nonNull(pointedResource)) { + initCurrentResourceTypeInMap(pointedResourceName, pointedResource.getType(), + "output", typeToPointingResourcesMap); + + typeToPointingResourcesMap + .get(pointedResource.getType()).get(pointedResourceName) + .get("output").add(outputEntry.getKey()); + } + } + } + + private void initTypeRelationsMapFromResourcesMap(String fileName, + Map<String, Resource> resourceMap, + Set<String> securityGroupsNamesFromBaseFileOutputs, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap, + GlobalValidationContext globalContext) { + for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) { + Resource pointingResource = resourceEntry.getValue(); + Map<String, Object> properties = + pointingResource.getProperties() == null ? new HashMap<>() : pointingResource.getProperties(); + + Set<String> referencedResourcesByGetResource = + getResourcesIdsPointedByCurrentResource(fileName, ResourceReferenceFunctions.GET_RESOURCE, + properties, globalContext); + + Set<String> referencedResourcesByGetAttr = + handleGetAttrBetweenResources(properties); + + referencedResourcesByGetResource.addAll(referencedResourcesByGetAttr); + + updateRelationsMapWithCurrentResourceReferences + (resourceMap, resourceEntry, referencedResourcesByGetResource, + typeToPointingResourcesMap); + } + } + + private void updateRelationsMapWithSecurityGroupsFromBaseFileOutput(String fileName, + Map<String, Resource> resourcesMap, + Map.Entry<String, Resource> resourceEntry, + Map<String, Object> properties, + Set<String> securityGroupsNamesFromBaseFileOutputs, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap, + GlobalValidationContext globalContext) { + + Set<String> candidateSecurityGroupUsedFromBaseFile = getResourcesIdsPointedByCurrentResource + (fileName, ResourceReferenceFunctions.GET_PARAM, properties, globalContext); + removeNonSecurityGroupNamesFromList + (candidateSecurityGroupUsedFromBaseFile, securityGroupsNamesFromBaseFileOutputs); + + for (String usedSecurityGroupId : candidateSecurityGroupUsedFromBaseFile) { + updateMapWithRelationsBetweenResources + (usedSecurityGroupId, + HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource(), + resourceEntry, typeToPointingResourcesMap); + + } + } + + private void removeNonSecurityGroupNamesFromList( + Set<String> candidateSecurityGroupUsedFromBaseFile, + Set<String> securityGroupsNamesFromBaseFileOutputs) { + + Set<String> nonSecurityGroupNames = new HashSet<>(); + for (String candidateSecurityGroup : candidateSecurityGroupUsedFromBaseFile) { + if (!securityGroupsNamesFromBaseFileOutputs.contains(candidateSecurityGroup)) { + nonSecurityGroupNames.add(candidateSecurityGroup); + } + } + + candidateSecurityGroupUsedFromBaseFile.removeAll(nonSecurityGroupNames); + } + + private void updateRelationsMapWithCurrentResourceReferences(Map<String, Resource> resourceMap, + Map.Entry<String, Resource> currentResourceEntry, + Set<String> referencedResourcesFromCurrentResource, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap) { + + for (String pointedResourceName : referencedResourcesFromCurrentResource) { + Resource pointedResource = resourceMap.get(pointedResourceName); + if (Objects.nonNull(pointedResource)) { + String pointedResourceType = pointedResource.getType(); + + updateMapWithRelationsBetweenResources + (pointedResourceName, pointedResourceType, + currentResourceEntry, typeToPointingResourcesMap); + } + } + } + + private void updateMapWithRelationsBetweenResources(String pointedResourceName, + String pointedResourceType, + Map.Entry<String, Resource> currentResourceEntry, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap) { + + initCurrentResourceTypeInMap(pointedResourceName, pointedResourceType, + currentResourceEntry.getValue().getType(), typeToPointingResourcesMap); + + typeToPointingResourcesMap.get(pointedResourceType).get(pointedResourceName).get + (currentResourceEntry.getValue().getType()).add(currentResourceEntry.getKey()); + } + + private void initCurrentResourceTypeInMap(String resourceName, String resourceType, + String pointingResourceType, + Map<String, Map<String, Map<String, List<String>>>> typeToPointingResourcesMap) { + + typeToPointingResourcesMap.putIfAbsent(resourceType, new HashMap<>()); + typeToPointingResourcesMap.get(resourceType).putIfAbsent(resourceName, new HashMap<>()); + typeToPointingResourcesMap.get(resourceType).get(resourceName).putIfAbsent + (pointingResourceType, new ArrayList<>()); + } + + private Set<String> handleGetAttrBetweenResources(Map<String, Object> properties){ + Set<String> referencedResourcesByGetAttr = new HashSet<>(); + for(Map.Entry<String, Object> proprtyEntry : properties.entrySet()){ + referencedResourcesByGetAttr.addAll(getGetAttrReferencesInCaseOfContrail(proprtyEntry + .getValue())); + } + + return referencedResourcesByGetAttr; + } + + + private Set<String> getGetAttrReferencesInCaseOfContrail(Object propertyValue){ + Object value; + Set<String> getAttrReferences = new HashSet<>(); + + if (propertyValue instanceof Map) { + if (((Map) propertyValue).containsKey("get_attr")) { + value = ((Map) propertyValue).get("get_attr"); + if (value instanceof List) { + if (((List) value).size() == 2 && ((List) value).get(1).equals("fq_name")) { + if (((List) value).get(0) instanceof String) { + getAttrReferences.add((String) ((List) value).get(0)); + return getAttrReferences; + } else { + logger.warn("invalid format of 'get_attr' function - " + propertyValue.toString()); + } + } + } + }else { + Collection<Object> valCollection = ((Map) propertyValue).values(); + for (Object entryValue : valCollection) { + getAttrReferences.addAll(getGetAttrReferencesInCaseOfContrail(entryValue)); + } + } + } else if (propertyValue instanceof List) { + for (Object prop : (List) propertyValue) { + getAttrReferences.addAll(getGetAttrReferencesInCaseOfContrail(prop)); + } + } + + return getAttrReferences; + } + + + private Set<String> getResourcesIdsPointedByCurrentResource(String fileName, + ResourceReferenceFunctions function, + Map<String, Object> properties, + GlobalValidationContext globalContext) { + + Set<String> referencedResources = new HashSet<>(); + for (Map.Entry<String, Object> propertyEntry : properties.entrySet()) { + referencedResources + .addAll(HeatStructureUtil + .getReferencedValuesByFunctionName(fileName, + function.getFunction(), + propertyEntry.getValue(), + globalContext)); + } + + return referencedResources; + } + + private Set<String> checkForBaseFilePortsExistenceAndReturnSecurityGroupNamesFromOutputsIfNot( + String baseFileName, HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + Set<String> securityGroupsNamesFromOutputsMap = new HashSet<>(); + + if (heatOrchestrationTemplate != null) { + Map<String, Resource> resourceMap = heatOrchestrationTemplate.getResources(); + if (!isPortResourceExistInBaseFile(resourceMap)) { + getSecurityGroupsReferencedResourcesFromOutputs(securityGroupsNamesFromOutputsMap, + heatOrchestrationTemplate.getOutputs(), resourceMap); + } + } + return securityGroupsNamesFromOutputsMap; + } + + private boolean isPortResourceExistInBaseFile(Map<String, Resource> resourceMap) { + for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) { + if (resourceEntry.getValue().getType() + .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) { + return true; + } + } + + return false; + } + + private void getSecurityGroupsReferencedResourcesFromOutputs( + Set<String> securityGroupsNamesFromOutputsMap, Map<String, Output> outputMap, + Map<String, Resource> resourceMap) { + + if (MapUtils.isNotEmpty(outputMap)) { + for (Map.Entry<String, Output> outputEntry : outputMap.entrySet()) { + Object outputValue = outputEntry.getValue().getValue(); + if (Objects.nonNull(outputValue) && outputValue instanceof Map) { + String resourceName = (String) ((Map) outputValue) + .get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); + if (Objects.nonNull(resourceName)) { + Resource resource = resourceMap.get(resourceName); + if (Objects.nonNull(resource) && resource.getType().equals( + HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource())) { + securityGroupsNamesFromOutputsMap.add(outputEntry.getKey()); + } + } + } + } + } + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java index c287394a54..ddc1bb49b9 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java @@ -22,13 +22,10 @@ package org.openecomp.sdc.validation.impl.validators; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; -import org.openecomp.core.utilities.json.JsonUtil; -import org.openecomp.core.utilities.yaml.YamlUtil; +import org.openecomp.sdc.validation.Validator; import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.interfaces.Validator; import org.openecomp.core.validation.types.GlobalValidationContext; -import org.openecomp.sdc.common.utils.AsdcCommon; +import org.openecomp.sdc.common.errors.Messages; import org.openecomp.sdc.datatypes.error.ErrorLevel; import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes; import org.openecomp.sdc.heat.datatypes.manifest.FileData; @@ -43,12 +40,14 @@ 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.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.impl.util.HeatValidationService; -import org.openecomp.sdc.validation.impl.util.ResourceValidationHeatValidator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.openecomp.sdc.validation.util.ValidationUtil; -import java.io.InputStream; import java.util.Collection; import java.util.HashSet; import java.util.Map; @@ -56,14 +55,17 @@ import java.util.Objects; import java.util.Set; public class HeatValidator implements Validator { + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + protected static Logger logger = (Logger) LoggerFactory.getLogger(HeatValidator.class); - protected static Logger logger = LoggerFactory.getLogger(HeatValidator.class); - - /* validation 9*/ private static void validateAllRequiredArtifactsExist(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - Set<String> artifacts, - GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate, + Set<String> artifacts, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Collection<Resource> resourcesValues = heatOrchestrationTemplate.getResources() == null ? null : heatOrchestrationTemplate.getResources().values(); @@ -85,13 +87,17 @@ public class HeatValidator implements Validator { } } - + mdcDataDebugMessage.debugExitMessage("file", fileName); } /* validation 14 */ + private static void validateAllResourceReferencesExist(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); Set<String> resourcesNames = heatOrchestrationTemplate.getResources() == null ? null : heatOrchestrationTemplate.getResources().keySet(); @@ -107,12 +113,19 @@ public class HeatValidator implements Validator { .checkResourceExistenceFromResourcesMap(fileName, resourcesNames, outputsValues, globalContext); + mdcDataDebugMessage.debugExitMessage("file", fileName); + } /* validation 16 */ + private static void validateGetParamPointToParameter(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Set<String> parametersNames = heatOrchestrationTemplate.getParameters() == null ? null : heatOrchestrationTemplate.getParameters().keySet(); Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); @@ -125,8 +138,6 @@ public class HeatValidator implements Validator { Collection<Object> propertiesValues = properties.values(); if (CollectionUtils.isNotEmpty(propertiesValues)) { for (Object propertyObject : propertiesValues) { - //Set<String> referencedParameterNames = HeatValidationService - // .getParameterNameFromGetParamMap(propertyObject); Set<String> referencedParameterNames = HeatStructureUtil .getReferencedValuesByFunctionName(fileName, "get_param", propertyObject, globalContext); @@ -138,21 +149,31 @@ public class HeatValidator implements Validator { } } } + + mdcDataDebugMessage.debugExitMessage("file", fileName); } + private static void validateReferenceParams(String fileName, String resourceName, Set<String> parametersNamesFromFile, Set<String> referencedParametersNames, GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + for (String parameterName : referencedParametersNames) { if (!isHeatPseudoParameter(parameterName) && !parametersNamesFromFile.contains(parameterName)) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.REFERENCED_PARAMETER_NOT_FOUND.getErrorMessage(), - parameterName, resourceName)); + .getErrorWithParameters(Messages.REFERENCED_PARAMETER_NOT_FOUND.getErrorMessage(), + parameterName, resourceName), + LoggerTragetServiceName.VALIDATE_PARAMETER_REFERENCE_EXITENCE, + LoggerErrorDescription.PARAMETER_NOT_FOUND); } } + + mdcDataDebugMessage.debugExitMessage("file", fileName); } private static boolean isHeatPseudoParameter(String parameterName) { @@ -160,9 +181,13 @@ public class HeatValidator implements Validator { } /* validation 18*/ + private static void validateGetAttr(String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate, GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Map<String, Output> outputMap; outputMap = heatOrchestrationTemplate.getOutputs(); @@ -170,6 +195,8 @@ public class HeatValidator implements Validator { HeatValidationService.loopOverOutputMapAndValidateGetAttrFromNested(fileName, outputMap, heatOrchestrationTemplate, globalContext); } + + mdcDataDebugMessage.debugExitMessage("file", fileName); } /* validation 17 + */ @@ -177,12 +204,16 @@ public class HeatValidator implements Validator { HeatOrchestrationTemplate heatOrchestrationTemplate, GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Environment envContent; if (!envFileName.contains(".env")) { globalContext.addMessage(envFileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(), - envFileName)); + .getErrorWithParameters(Messages + .WRONG_ENV_FILE_EXTENSION.getErrorMessage(), envFileName), + LoggerTragetServiceName.VALIDATE_ENV_FILE, LoggerErrorDescription.WRONG_FILE_EXTENSION); } envContent = HeatValidationService.validateEnvContent(fileName, envFileName, globalContext); @@ -193,12 +224,19 @@ public class HeatValidator implements Validator { heatOrchestrationTemplate); } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } private static void validateEnvContentIsSubSetOfHeatParameters(String envFile, - Environment envContent, - GlobalValidationContext globalContext, - HeatOrchestrationTemplate heatOrchestrationTemplate) { + Environment envContent, + GlobalValidationContext + globalContext, + HeatOrchestrationTemplate + heatOrchestrationTemplate) { + + mdcDataDebugMessage.debugEntryMessage("file", envFile); + Set<String> parametersNames = heatOrchestrationTemplate.getParameters() == null ? null : heatOrchestrationTemplate.getParameters().keySet(); @@ -208,24 +246,35 @@ public class HeatValidator implements Validator { String envParameter = envEntry.getKey(); if (!parametersNames.contains(envParameter)) { globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(), envFile, - envParameter)); + .getErrorWithParameters( + Messages.ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(), envFile, + envParameter), LoggerTragetServiceName.VALIDATE_ENV_FILE, + LoggerErrorDescription.ENV_PARAMETER_NOT_IN_HEAT); } } } else { for (Map.Entry<String, Object> envEntry : envContent.getParameters().entrySet()) { globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(), - envFile, envEntry.getKey())); + .getErrorWithParameters(Messages + .ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(), + envFile, envEntry.getKey()), LoggerTragetServiceName.VALIDATE_ENV_FILE, + LoggerErrorDescription.ENV_PARAMETER_NOT_IN_HEAT); } } } + + mdcDataDebugMessage.debugExitMessage("file", envFile); } + private static void validateParameterDefaultTypeAlignWithType(String fileName, - HeatOrchestrationTemplate heatOrchestrationTemplate, - GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate, + GlobalValidationContext + globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + Map<String, Parameter> parametersMap = heatOrchestrationTemplate.getParameters() == null ? null : heatOrchestrationTemplate.getParameters(); @@ -239,19 +288,28 @@ public class HeatValidator implements Validator { DefinedHeatParameterTypes.isValueIsFromGivenType(parameterDefault, parameterType); if (!isValueMatchDefault) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(), - parameterEntry.getKey(), parameterType)); + .getErrorWithParameters( + Messages.PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(), + parameterEntry.getKey(), parameterType), + LoggerTragetServiceName.VALIDATE_PARAMTER_DEFAULT_MATCH_TYPE, + LoggerErrorDescription.PARAMETER_DEFAULT_VALUE_NOT_ALIGNED_WITH_TYPE); } } } } + + mdcDataDebugMessage.debugExitMessage("file", fileName); } + private static void validateEnvParametersMatchDefinedHeatParameterTypes(String envFile, - Environment envContent, - GlobalValidationContext globalContext, - HeatOrchestrationTemplate heatOrchestrationTemplate) { + Environment envContent, + GlobalValidationContext globalContext, + HeatOrchestrationTemplate heatOrchestrationTemplate) { + + + mdcDataDebugMessage.debugEntryMessage("file", envFile); + Map<String, Parameter> heatParameters = heatOrchestrationTemplate.getParameters(); if (MapUtils.isNotEmpty(heatParameters) && MapUtils.isNotEmpty(envContent.getParameters())) { @@ -262,25 +320,29 @@ public class HeatValidator implements Validator { if (parameterFromHeatFile != null) { String parameterType = parameterFromHeatFile.getType(); if (!DefinedHeatParameterTypes.isEmptyValueInEnv(parameterEnvValue) - && !DefinedHeatParameterTypes.isValueIsFromGivenType(parameterEnvValue, - parameterType)) { + && !DefinedHeatParameterTypes + .isValueIsFromGivenType(parameterEnvValue, parameterType)) { globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters( - Messages.PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(), - parameterName)); + .getErrorWithParameters( + Messages.PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(), + parameterName), LoggerTragetServiceName.VALIDATE_ENV_PARAMETER_MATCH_TYPE, + LoggerErrorDescription.PARAMETER_DEFAULT_VALUE_NOT_ALIGNED_WITH_TYPE); } } } } + + mdcDataDebugMessage.debugExitMessage("file", envFile); } @Override - public void validate(GlobalValidationContext globalContext) { + public void validate(GlobalValidationContext globalContext) { + mdcDataDebugMessage.debugEntryMessage(null, null); ManifestContent manifestContent; try { - manifestContent = checkValidationPreCondition(globalContext); - } catch (Exception e0) { + manifestContent = ValidationUtil.checkValidationPreCondition(globalContext); + } catch (Exception exception) { return; } String baseFileName; @@ -299,8 +361,8 @@ public class HeatValidator implements Validator { globalContext.getFiles().stream() .filter(fileName -> FileData.isHeatFile(fileTypeMap.get(fileName))).forEach( - fileName -> validate(fileName, - fileEnvMap.get(fileName) == null ? null : fileEnvMap.get(fileName).getFile(), + fileName -> validate(fileName, fileEnvMap.get(fileName) == null ? null : fileEnvMap.get( + fileName).getFile(), baseFileName == null ? null : baseFileName, artifacts, securityGroupsNamesFromBaseFileOutputs, globalContext)); @@ -310,35 +372,34 @@ public class HeatValidator implements Validator { globalContext.getFiles().stream() .filter(fileName -> manifestArtifacts.contains(fileName) && !artifacts.contains(fileName)) .forEach(fileName -> globalContext.addMessage(fileName, ErrorLevel.WARNING, - Messages.ARTIFACT_FILE_NOT_REFERENCED.getErrorMessage())); + Messages.ARTIFACT_FILE_NOT_REFERENCED.getErrorMessage(), + LoggerTragetServiceName.CHECK_FOR_ORPHAN_ARTIFACTS, + LoggerErrorDescription.ARTIFACT_NOT_REFERENCED)); - ResourceValidationHeatValidator - .handleNotEmptyResourceNamesList(baseFileName, securityGroupsNamesFromBaseFileOutputs, - "SecurityGroup", globalContext); + mdcDataDebugMessage.debugExitMessage(null, null); } private void validate(String fileName, String envFileName, String baseFileName, Set<String> artifacts, Set<String> securityGroupsNamesFromBaseFileOutputs, GlobalValidationContext globalContext) { - HeatOrchestrationTemplate heatOrchestrationTemplate = - checkHeatOrchestrationPreCondition(fileName, globalContext); + HeatOrchestrationTemplate + heatOrchestrationTemplate = ValidationUtil.checkHeatOrchestrationPreCondition(fileName, globalContext); if (heatOrchestrationTemplate != null) { if (!(fileName.contains(".yaml") || fileName.contains(".yml"))) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), - fileName)); + .getErrorWithParameters(Messages + .WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), fileName), + LoggerTragetServiceName.CHECK_FOR_VALID_FILE_EXTENTION, + LoggerErrorDescription.WRONG_FILE_EXTENSION); } validateHeatBaseStructure(fileName, heatOrchestrationTemplate, globalContext); - - ResourceValidationHeatValidator - .validateResourceType(fileName, baseFileName, securityGroupsNamesFromBaseFileOutputs, - heatOrchestrationTemplate, globalContext); validateParameterDefaultTypeAlignWithType(fileName, heatOrchestrationTemplate, globalContext); validateAllResourceReferencesExist(fileName, heatOrchestrationTemplate, globalContext); + validateResourceDependsOn(fileName, heatOrchestrationTemplate, globalContext); validateGetParamPointToParameter(fileName, heatOrchestrationTemplate, globalContext); validateGetAttr(fileName, heatOrchestrationTemplate, globalContext); validateAllRequiredArtifactsExist(fileName, heatOrchestrationTemplate, artifacts, @@ -350,60 +411,80 @@ public class HeatValidator implements Validator { } } - private void validateHeatBaseStructure(String fileName, + private void validateResourceDependsOn(String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate, GlobalValidationContext globalContext) { - if (heatOrchestrationTemplate.getHeat_template_version() == null) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), - "missing template version")); - } - if (heatOrchestrationTemplate.getResources() == null - || heatOrchestrationTemplate.getResources().size() == 0) { - globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), - "heat file must have minimum one resource")); + Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); + if(MapUtils.isEmpty(resourcesMap)){ + return; } + + Set<String> resourcesNames = resourcesMap.keySet(); + + resourcesMap.entrySet().stream() + .forEach(entry -> checkResourceDependsOn(fileName, entry.getValue(), resourcesNames, globalContext)); } - protected ManifestContent checkValidationPreCondition(GlobalValidationContext globalContext) { - InputStream manifest = globalContext.getFileContent(AsdcCommon.MANIFEST_NAME); - if (manifest == null) { - throw new RuntimeException("Can't load manifest file for Heat Validator"); - } - ManifestContent manifestContent; - try { - manifestContent = JsonUtil.json2Object(manifest, ManifestContent.class); - } catch (Exception e0) { - throw new RuntimeException("Can't load manifest file for Heat Validator"); + @SuppressWarnings("unchecked") + private static void checkResourceDependsOn(String fileName, Resource resource, + Set<String> resourcesNames, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Object dependencies = resource.getDepends_on(); + if (dependencies instanceof Collection) { + ((Collection<String>) dependencies) + .stream() + .filter(resource_id -> !resourcesNames.contains(resource_id)) + .forEach(resource_id -> globalContext.addMessage(fileName, ErrorLevel.ERROR, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(), + (String) resource_id), LoggerTragetServiceName.CHECK_RESOURCE_DEPENDS_ON, + LoggerErrorDescription.MISSING_RESOURCE_DEPENDS_ON)); + } else if (dependencies instanceof String) { + if (!resourcesNames.contains(dependencies)) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(), + (String) dependencies), LoggerTragetServiceName.CHECK_RESOURCE_DEPENDS_ON, + LoggerErrorDescription.MISSING_RESOURCE_DEPENDS_ON); + } } - return manifestContent; + mdcDataDebugMessage.debugExitMessage("file", fileName); } - private HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName, - GlobalValidationContext globalContext) { - HeatOrchestrationTemplate heatOrchestrationTemplate; - try { - heatOrchestrationTemplate = new YamlUtil() - .yamlToObject(globalContext.getFileContent(fileName), HeatOrchestrationTemplate.class); - } catch (Exception e0) { + private void validateHeatBaseStructure(String fileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (heatOrchestrationTemplate.getHeat_template_version() == null) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), - getParserExceptionReason(e0))); - return null; + .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), + "missing template version"), LoggerTragetServiceName.VALIDATE_HEAT_FORMAT, + LoggerErrorDescription.INVALID_HEAT_FORMAT); + } + if (heatOrchestrationTemplate.getResources() == null + || heatOrchestrationTemplate.getResources().size() == 0) { + globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(), + "The heat file does not contain any resources"), + LoggerTragetServiceName.VALIDATE_HEAT_FORMAT, LoggerErrorDescription.INVALID_HEAT_FORMAT); } - return heatOrchestrationTemplate; + mdcDataDebugMessage.debugExitMessage("file", fileName); } - private Set<String> checkForBaseFilePortsExistenceAndReturnSecurityGroupNamesFromOutputsIfNot( String baseFileName, GlobalValidationContext globalContext) { Set<String> securityGroupsNamesFromOutputsMap = new HashSet<>(); HeatOrchestrationTemplate heatOrchestrationTemplate = - checkHeatOrchestrationPreCondition(baseFileName, globalContext); + ValidationUtil.checkHeatOrchestrationPreCondition(baseFileName, globalContext); if (heatOrchestrationTemplate != null) { Map<String, Resource> resourceMap = heatOrchestrationTemplate.getResources(); @@ -412,7 +493,6 @@ public class HeatValidator implements Validator { heatOrchestrationTemplate.getOutputs(), resourceMap); } } - return securityGroupsNamesFromOutputsMap; } @@ -450,20 +530,4 @@ public class HeatValidator implements Validator { return false; } - - - private String getParserExceptionReason(Exception e0) { - String reason; - - if (e0.getCause() != null && e0.getCause().getCause() != null) { - reason = e0.getCause().getCause().getMessage(); - } else if (e0.getCause() != null) { - reason = e0.getCause().getMessage(); - } else { - reason = Messages.GENERAL_HEAT_PARSER_ERROR.getErrorMessage(); - } - return reason; - } - - } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java index 4ce40f0007..43cafb494c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java @@ -21,38 +21,54 @@ package org.openecomp.sdc.validation.impl.validators; import org.openecomp.core.utilities.json.JsonUtil; +import org.openecomp.sdc.validation.Validator; import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.interfaces.Validator; import org.openecomp.core.validation.types.GlobalValidationContext; -import org.openecomp.sdc.common.utils.AsdcCommon; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.common.utils.SdcCommon; import org.openecomp.sdc.datatypes.error.ErrorLevel; import org.openecomp.sdc.heat.datatypes.manifest.FileData; import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +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 org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import java.util.Optional; -public class ManifestValidator implements Validator { - - private static Logger logger = LoggerFactory.getLogger(YamlValidator.class); +public class ManifestValidator implements Validator { + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static Logger logger = (Logger) LoggerFactory.getLogger(YamlValidator.class); @Override public void validate(GlobalValidationContext globalContext) { + mdcDataDebugMessage.debugEntryMessage(null, null); - - InputStream content = globalContext.getFileContent(AsdcCommon.MANIFEST_NAME); + Optional<InputStream> content = globalContext.getFileContent(SdcCommon.MANIFEST_NAME); ManifestContent manifestContent; try { - manifestContent = JsonUtil.json2Object(content, ManifestContent.class); - } catch (RuntimeException re) { - globalContext.addMessage(AsdcCommon.MANIFEST_NAME, ErrorLevel.ERROR, - Messages.INVALID_MANIFEST_FILE.getErrorMessage()); + if (content.isPresent()) { + manifestContent = JsonUtil.json2Object(content.get(), ManifestContent.class); + } else { + MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_API, + LoggerTragetServiceName.VALIDATE_MANIFEST_CONTENT, ErrorLevel.ERROR.name(), + LoggerErrorCode.DATA_ERROR.getErrorCode(), LoggerErrorDescription.EMPTY_FILE); + throw new Exception("The manifest file '" + SdcCommon.MANIFEST_NAME + "' has no content"); + } + } catch (Exception re) { + globalContext.addMessage(SdcCommon.MANIFEST_NAME, ErrorLevel.ERROR, + Messages.INVALID_MANIFEST_FILE.getErrorMessage(), + LoggerTragetServiceName.VALIDATE_MANIFEST_CONTENT, + LoggerErrorDescription.INVALID_MANIFEST); return; } @@ -60,22 +76,32 @@ public class ManifestValidator implements Validator { manifestFiles.stream().filter(name -> !globalContext.getFileContextMap().containsKey(name) ).forEach(name -> globalContext - .addMessage(name, ErrorLevel.ERROR, Messages.MISSING_FILE_IN_ZIP.getErrorMessage())); + .addMessage(name, ErrorLevel.ERROR, Messages.MISSING_FILE_IN_ZIP.getErrorMessage(), + LoggerTragetServiceName.VALIDATE_FILE_IN_ZIP, LoggerErrorDescription.MISSING_FILE)); globalContext.getFileContextMap().keySet().stream().filter(name -> - !manifestFiles.contains(name) && !AsdcCommon.MANIFEST_NAME.equals(name) + !manifestFiles.contains(name) && !SdcCommon.MANIFEST_NAME.equals(name) ).forEach(name -> globalContext.addMessage(name, ErrorLevel.WARNING, - Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()) + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage(), + LoggerTragetServiceName.VALIDATE_FILE_IN_MANIFEST, LoggerErrorDescription.MISSING_FILE) ); + mdcDataDebugMessage.debugExitMessage(null, null); } + private List<String> getManifestFileList(ManifestContent manifestContent, GlobalValidationContext context) { + + + mdcDataDebugMessage.debugEntryMessage(null, null); + ManifestScanner manifestScanner = new ManifestScanner(); manifestScanner.init(context); manifestScanner.scan(null, manifestContent.getData(), context); + + mdcDataDebugMessage.debugExitMessage(null, null); return manifestScanner.getFileList(); } @@ -98,7 +124,9 @@ public class ManifestValidator implements Validator { && childFileData.getType().equals(FileData.Type.HEAT_ENV)) { globalContext.addMessage(childFileData.getFile(), ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.ENV_NOT_ASSOCIATED_TO_HEAT.getErrorMessage())); + .getErrorWithParameters(Messages.ENV_NOT_ASSOCIATED_TO_HEAT.getErrorMessage()), + LoggerTragetServiceName.SCAN_MANIFEST_STRUCTURE, + "env file is not associated to HEAT file"); } } } @@ -109,9 +137,7 @@ public class ManifestValidator implements Validator { if (data == null) { return; } - data.stream().forEach(chileFileData -> { - scan(chileFileData, chileFileData.getData(), globalContext); - }); + data.forEach(chileFileData -> scan(chileFileData, chileFileData.getData(), globalContext)); } @@ -122,28 +148,32 @@ public class ManifestValidator implements Validator { private void validateFileTypeVsFileName(FileData fileData) { String fileName = fileData.getFile(); if (fileName == null) { - this.globalValidationContext.addMessage(AsdcCommon.MANIFEST_NAME, ErrorLevel.ERROR, - Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage()); + this.globalValidationContext.addMessage(SdcCommon.MANIFEST_NAME, ErrorLevel.ERROR, + Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage(), + LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, "Missing file name in manifest"); } FileData.Type type = fileData.getType(); if (type == null) { this.globalValidationContext - .addMessage(fileName, ErrorLevel.ERROR, Messages.INVALID_FILE_TYPE.getErrorMessage()); + .addMessage(fileName, ErrorLevel.ERROR, Messages.INVALID_FILE_TYPE.getErrorMessage(), + LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, "Invalid file type"); } else if (type.equals(FileData.Type.HEAT_NET) || type.equals(FileData.Type.HEAT_VOL) || type.equals(FileData.Type.HEAT)) { if (fileName != null && !fileName.endsWith(".yml") && !fileName.endsWith(".yaml")) { this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), - fileName)); + fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, + "Wrong HEAT file extention"); } } else if (type.equals(FileData.Type.HEAT_ENV)) { if (fileName != null && !fileName.endsWith(".env")) { this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(), - fileName)); + fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, + "Wrong env file extention"); } } } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/NamingConventionGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/NamingConventionGuideLineValidator.java new file mode 100644 index 0000000000..724b7e4735 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/NamingConventionGuideLineValidator.java @@ -0,0 +1,29 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.validation.base.ResourceBaseValidator; +import org.openecomp.sdc.validation.type.ConfigConstants; +import org.openecomp.sdc.validation.type.NamingConventionValidationContext; + +import java.util.Map; + +/** + * Created by TALIO on 2/15/2017. + */ +public class NamingConventionGuideLineValidator extends ResourceBaseValidator { + + @Override + public void init(Map<String, Object> properties){ + super.init((Map<String, Object>) properties.get(ConfigConstants.Resource_Base_Validator)); + } + + @Override + public ValidationContext createValidationContext(String fileName, String envFileName, + HeatOrchestrationTemplate + heatOrchestrationTemplate, + GlobalValidationContext globalContext){ + return new NamingConventionValidationContext(heatOrchestrationTemplate, envFileName); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java new file mode 100644 index 0000000000..f3af7d7e48 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java @@ -0,0 +1,199 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.apache.commons.collections4.CollectionUtils; +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.manifest.FileData; +import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions; +import org.openecomp.sdc.heat.services.HeatStructureUtil; +import org.openecomp.sdc.heat.services.manifest.ManifestUtil; +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.util.ValidationUtil; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Created by TALIO on 2/15/2017. + */ +public class SharedResourceGuideLineValidator implements Validator { + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(GlobalValidationContext globalContext) { + ManifestContent manifestContent; + try { + manifestContent = ValidationUtil.checkValidationPreCondition(globalContext); + } catch (Exception exception) { + return; + } + + Set<String> baseFiles = ValidationUtil.validateManifest(manifestContent, globalContext); + + Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); + Map<String, FileData> fileEnvMap = ManifestUtil.getFileAndItsEnv(manifestContent); + globalContext.getFiles().stream() + .filter(fileName -> FileData + .isHeatFile(fileTypeMap.get(fileName))) + .forEach(fileName -> validate(fileName, + fileEnvMap.get(fileName) != null ? fileEnvMap.get(fileName).getFile() : null, + fileTypeMap, baseFiles, globalContext)); + + + } + + private void validate(String fileName, String envFileName, Map<String, FileData.Type> fileTypeMap, + Set<String> baseFiles, GlobalValidationContext globalContext) { + HeatOrchestrationTemplate + heatOrchestrationTemplate = ValidationUtil.checkHeatOrchestrationPreCondition(fileName, globalContext); + if (heatOrchestrationTemplate == null) { + return; + } + + validateBaseFile(fileName, baseFiles, heatOrchestrationTemplate, globalContext); + validateHeatVolumeFile(fileName, fileTypeMap, heatOrchestrationTemplate, globalContext); + } + + + private void validateBaseFile(String fileName, Set<String> baseFiles, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + //if not base return + if (baseFiles == null || !baseFiles.contains(fileName)) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + //if no resources exist return + if (heatOrchestrationTemplate.getResources() == null + || heatOrchestrationTemplate.getResources().size() == 0) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + Set<String> expectedExposedResources = new HashSet<>(); + Set<String> actualExposedResources = new HashSet<>(); + heatOrchestrationTemplate.getResources() + .entrySet() + .stream() + .filter(entry -> ValidationUtil.isExpectedToBeExposed(entry.getValue().getType())) + .forEach(entry -> expectedExposedResources.add(entry.getKey())); + + if (heatOrchestrationTemplate.getOutputs() != null) { + + heatOrchestrationTemplate.getOutputs().entrySet() + .stream() + .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(), + globalContext)) + .forEach(entry -> actualExposedResources.add( + getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(), + globalContext))); + } + + ValidationUtil.removeExposedResourcesCalledByGetResource(fileName, actualExposedResources, + heatOrchestrationTemplate, globalContext); + + actualExposedResources.forEach(expectedExposedResources::remove); + + if (expectedExposedResources.size() > 0) { + expectedExposedResources + .stream() + .forEach(name -> globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.RESOURCE_NOT_DEFINED_IN_OUTPUT.getErrorMessage(), + name), + LoggerTragetServiceName.VALIDATE_BASE_FILE, + LoggerErrorDescription.RESOURCE_NOT_DEFINED_AS_OUTPUT)); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateHeatVolumeFile(String fileName, Map<String, FileData.Type> fileTypeMap, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + //if not heat volume return + if (!fileTypeMap.get(fileName).equals(FileData.Type.HEAT_VOL)) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + //if no resources exist return + if (heatOrchestrationTemplate.getResources() == null + || heatOrchestrationTemplate.getResources().size() == 0) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + Set<String> expectedExposedResources = new HashSet<>(); + Set<String> actualExposedResources = new HashSet<>(); + heatOrchestrationTemplate.getResources() + .entrySet() + .stream() + .filter(entry -> entry.getValue().getType() + .equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource())) + .forEach(entry -> expectedExposedResources.add(entry.getKey())); + + if (heatOrchestrationTemplate.getOutputs() != null) { + + heatOrchestrationTemplate.getOutputs().entrySet() + .stream() + .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(), + globalContext)) + .forEach(entry -> actualExposedResources.add( + getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(), + globalContext))); + } + + actualExposedResources.forEach(expectedExposedResources::remove); + + if (expectedExposedResources.size() > 0) { + expectedExposedResources + .stream() + .forEach(name -> globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.VOLUME_HEAT_NOT_EXPOSED.getErrorMessage(), name), + LoggerTragetServiceName.VALIDATE_VOLUME_FILE, + LoggerErrorDescription.VOLUME_FILE_NOT_EXPOSED)); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + + private boolean isPropertyValueGetResource(String filename, Object value, + GlobalValidationContext globalContext) { + Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename, + ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext); + return referenceValues != null && (referenceValues.size() > 0); + } + + private String getResourceIdFromPropertyValue(String filename, Object value, + GlobalValidationContext globalContext) { + Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename, + ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext); + if (referenceValues != null && CollectionUtils.isNotEmpty(referenceValues)) { + return (String) referenceValues.toArray()[0]; + } + return null; + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java index 4d05b2b066..4ae00ea2d9 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java @@ -21,76 +21,63 @@ package org.openecomp.sdc.validation.impl.validators; import org.openecomp.core.utilities.yaml.YamlUtil; +import org.openecomp.sdc.validation.Validator; import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.interfaces.Validator; import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.error.MarkedYAMLException; -import org.yaml.snakeyaml.parser.ParserException; +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.impl.util.YamlValidatorUtil; import java.io.InputStream; import java.util.Collection; import java.util.Map; +import java.util.Optional; public class YamlValidator implements Validator { - - private static final Logger logger = LoggerFactory.getLogger(YamlValidator.class); + public static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static final Logger logger = (Logger) LoggerFactory.getLogger(YamlValidator.class); @Override public void validate(GlobalValidationContext globalContext) { + mdcDataDebugMessage.debugEntryMessage(null, null); Collection<String> files = globalContext.files( (fileName, globalValidationContext) -> (fileName.endsWith(".yaml") || fileName.endsWith(".yml") || fileName.endsWith(".env"))); files.stream().forEach(fileName -> validate(fileName, globalContext)); + + mdcDataDebugMessage.debugExitMessage(null, null); } private void validate(String fileName, GlobalValidationContext globalContext) { - InputStream rowContent = globalContext.getFileContent(fileName); - if (rowContent == null) { + Optional<InputStream> rowContent = globalContext.getFileContent(fileName); + if (!rowContent.isPresent()) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), - Messages.EMPTY_YAML_FILE.getErrorMessage())); + .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + Messages.EMPTY_YAML_FILE.getErrorMessage()), + LoggerTragetServiceName.VALIDATE_YAML_CONTENT, + LoggerErrorDescription.INVALID_YAML_FORMAT); return; /* no need to continue validation */ } try { - convert(rowContent, Map.class); + convert(rowContent.get(), Map.class); } catch (Exception exception) { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder - .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), - getParserExceptionReason(exception))); - logger.error("Exception in yaml parser. message:" + exception.getMessage()); + .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + YamlValidatorUtil.getParserExceptionReason(exception)), + LoggerTragetServiceName.VALIDATE_YAML_CONTENT, + LoggerErrorDescription.INVALID_YAML_FORMAT); } } - private String getParserExceptionReason(Exception exception) { - String reason = null; - - if (exception.getCause() instanceof MarkedYAMLException) { - if (exception.getCause() != null) { - if (exception.getCause().getCause() instanceof ParserException) { - reason = exception.getCause().getCause().getMessage(); - } else { - reason = exception.getCause().getMessage(); - } - } - } else if (exception instanceof MarkedYAMLException) { - - reason = exception.getMessage(); - - } else { - reason = Messages.GENERAL_YAML_PARSER_ERROR.getErrorMessage(); - } - return reason; - } - - private <T> T convert(InputStream content, Class<T> type) { return new YamlUtil().yamlToObject(content, type); } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidator.java new file mode 100644 index 0000000000..8ca5e69061 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidator.java @@ -0,0 +1,92 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.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 org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; +import org.openecomp.sdc.validation.type.ValidatorConstants; + +import java.util.List; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class ContrailNetworkPolicyResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + validateNetworkPolicyIsUsed + (fileName, resourceEntry, globalContext, (HeatResourceValidationContext)validationContext); + + } + + private static void validateNetworkPolicyIsUsed(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, + HeatResourceValidationContext validationContext) { + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, Map<String, List<String>>> referencedNetworkAttachPoliciesResources = + validationContext.getFileLevelResourceDependencies() + .get(HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE.getHeatResource()); + + if (MapUtils.isEmpty(referencedNetworkAttachPoliciesResources)) { + globalContext + .addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.RESOURCE_NOT_IN_USE.getErrorMessage(), + ValidatorConstants.Network_Policy, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ATTACH_POLICY_IN_USE, + LoggerErrorDescription.NETWORK_ATTACH_POLICY_NOT_IN_USE); + return; + } + + handleNetworkAttachPolicyReferences + (fileName, resourceEntry, referencedNetworkAttachPoliciesResources, globalContext); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + + } + + private static void handleNetworkAttachPolicyReferences(String fileName, + Map.Entry<String, Resource> resourceEntry, + Map<String, Map<String, List<String>>> pointedNetworkAttachPolicies, + GlobalValidationContext globalContext) { + + Map<String, List<String>> resourcesPointingToCurrNetworkAttachPolicy = + pointedNetworkAttachPolicies.get(resourceEntry.getKey()); + if (isNetworkAttachPolicyNotInUse(resourcesPointingToCurrNetworkAttachPolicy)) { + globalContext + .addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.RESOURCE_NOT_IN_USE.getErrorMessage(), + ValidatorConstants.Network_Policy, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ATTACH_POLICY_IN_USE, + LoggerErrorDescription.NETWORK_ATTACH_POLICY_NOT_IN_USE); + } + } + + private static boolean isNetworkAttachPolicyNotInUse( + Map<String, List<String>> resourcesPointingToCurrNetworkAttachPolicy) { + return MapUtils.isEmpty(resourcesPointingToCurrNetworkAttachPolicy); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidator.java new file mode 100644 index 0000000000..aa7b91826c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidator.java @@ -0,0 +1,94 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.CollectionUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; +import org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.impl.util.HeatValidationService; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + +/** + * Created by TALIO on 2/22/2017. + */ +public class NestedResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext){ + + handleNestedResourceType(fileName, resourceEntry.getKey(), resourceEntry.getValue(), + Optional.empty(), globalContext); + } + + private static void handleNestedResourceType(String fileName, String resourceName, + Resource resource, Optional<String> indexVarValue, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + validateAllPropertiesMatchNestedParameters(fileName, resourceName, resource, indexVarValue, + globalContext); + validateLoopsOfNestingFromFile(fileName, resource.getType(), globalContext); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + public static void validateAllPropertiesMatchNestedParameters(String fileName, + String resourceName, + Resource resource, + Optional<String> indexVarValue, + GlobalValidationContext + globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + String resourceType = resource.getType(); + if (globalContext.getFileContextMap().containsKey(resourceType)) { + Set<String> propertiesNames = + resource.getProperties() == null ? null : resource.getProperties().keySet(); + if (CollectionUtils.isNotEmpty(propertiesNames)) { + HeatValidationService + .checkNestedParameters(fileName, resourceType, resourceName, resource, propertiesNames, + indexVarValue, globalContext); + } + } else { + globalContext.addMessage(resourceType, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_NESTED_FILE.getErrorMessage(), resourceType), + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + LoggerErrorDescription.MISSING_FILE); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + public static void validateLoopsOfNestingFromFile(String fileName, String resourceType, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + List<String> filesInLoop = new ArrayList<>(Collections.singletonList(fileName)); + if (HeatValidationService + .isNestedLoopExistInFile(fileName, resourceType, filesInLoop, globalContext)) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.NESTED_LOOP.getErrorMessage(), + HeatValidationService.drawFilesLoop(filesInLoop)), + LoggerTragetServiceName.VALIDATE_NESTING_LOOPS, LoggerErrorDescription.NESTED_LOOP); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java new file mode 100644 index 0000000000..09afec3faf --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java @@ -0,0 +1,166 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions; +import org.openecomp.sdc.heat.services.HeatStructureUtil; +import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; +import org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * Created by TALIO on 2/22/2017. + */ +public class NeutronPortResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + + validateNovaServerPortBinding + (fileName, resourceEntry, (HeatResourceValidationContext)validationContext, globalContext); + } + + + @SuppressWarnings("unchecked") + private static void validateNovaServerPortBinding(String fileName, + Map.Entry<String, Resource> resourceEntry, + HeatResourceValidationContext heatResourceValidationContext, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, Map<String, List<String>>> portIdToPointingResources = + heatResourceValidationContext.getFileLevelResourceDependencies() + .get(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource()); + + if(MapUtils.isEmpty(portIdToPointingResources)){ + globalContext + .addMessage(fileName, ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(), + resourceEntry.getKey()), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS, + LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA); + + return; + } + + for (Map.Entry<String, Map<String, List<String>>> portEntry : + portIdToPointingResources.entrySet()) { + checkPortBindingFromMap(fileName, portEntry, globalContext); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private static void checkPortBindingFromMap(String fileName, + Map.Entry<String, Map<String, List<String>>> portEntry, + GlobalValidationContext globalContext) { + Map<String, List<String>> pointingResourcesToCurrPort = portEntry.getValue(); + List<String> pointingNovaServers = pointingResourcesToCurrPort + .get(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()); + + if (CollectionUtils.isEmpty(pointingNovaServers)) { + return; + } + + handleErrorEventsForPortBinding(fileName, portEntry, globalContext, pointingNovaServers); + + + } + + private static void handleErrorEventsForPortBinding(String fileName, + Map.Entry<String, Map<String, List<String>>> portEntry, + GlobalValidationContext globalContext, + List<String> pointingNovaServers) { + if (isThereMoreThanOneBindFromNovaToPort(pointingNovaServers)) { + globalContext + .addMessage(fileName, ErrorLevel.ERROR, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT.getErrorMessage(), + portEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SERVER_PORT_BINDING, + LoggerErrorDescription.PORT_BINDS_MORE_THAN_ONE_NOVA); + } + + if(isNoNovaPointingToPort(pointingNovaServers)){ + globalContext + .addMessage(fileName, ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(), + portEntry.getKey()), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS, + LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA); + } + } + + private static boolean isNoNovaPointingToPort(List<String> pointingNovaServers) { + return pointingNovaServers.size() == 0; + } + + private static boolean isThereMoreThanOneBindFromNovaToPort(List<String> pointingNovaServers) { + return pointingNovaServers.size() > 1; + } + + @SuppressWarnings("unchecked") + private static void validateAllSecurityGroupsAreUsed(String filename, + Map.Entry<String, Resource> resourceEntry, + List<String> securityGroupResourceNameList, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", filename); + + Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); + + if (MapUtils.isEmpty(propertiesMap)) { + return; + } + + Object securityGroupsValue = propertiesMap.get("security_groups"); + + if (Objects.isNull(securityGroupsValue)) { + return; + } + + if (securityGroupsValue instanceof List) { + List<Object> securityGroupsListFromCurrResource = + (List<Object>) propertiesMap.get("security_groups"); + for (Object securityGroup : securityGroupsListFromCurrResource) { + removeSecurityGroupNamesFromListByGivenFunction(filename, + ResourceReferenceFunctions.GET_RESOURCE.getFunction(), securityGroup, + securityGroupResourceNameList, globalContext); + } + } + + mdcDataDebugMessage.debugExitMessage("file", filename); + } + + private static void removeSecurityGroupNamesFromListByGivenFunction(String filename, + String functionName, + Object securityGroup, + Collection<String> + securityGroupResourceNameList, + GlobalValidationContext globalContext) { + Set<String> securityGroupsNamesFromFunction = HeatStructureUtil + .getReferencedValuesByFunctionName(filename, functionName, securityGroup, globalContext); + securityGroupsNamesFromFunction.forEach(securityGroupResourceNameList::remove); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidator.java new file mode 100644 index 0000000000..d7e16152f9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidator.java @@ -0,0 +1,67 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; +import org.openecomp.sdc.validation.type.ValidatorConstants; + +import java.util.List; +import java.util.Map; + +/** + * Created by TALIO on 2/27/2017. + */ +public class NeutronSecurityGroupResourceValidator implements ResourceValidator { + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + + HeatResourceValidationContext heatResourceValidationContext = + (HeatResourceValidationContext) validationContext; + validateSecurityGroupIsUsed(fileName, resourceEntry, heatResourceValidationContext, globalContext); + } + + public void validateSecurityGroupIsUsed(String fileName, Map.Entry<String, Resource> resourceEntry, + HeatResourceValidationContext + heatResourceValidationContext, + GlobalValidationContext globalContext) { + + Map<String, Map<String, List<String>>> securityGroupsPointedByOtherResources = + heatResourceValidationContext.getFileLevelResourceDependencies(). + get(HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource()); + + if (MapUtils.isEmpty(securityGroupsPointedByOtherResources)) { + return; + } + + Map<String, List<String>> resourcesPointingCurrSecurityGroup = + securityGroupsPointedByOtherResources.get(resourceEntry.getKey()); + + if(isSecurityGroupNotInUse(resourcesPointingCurrSecurityGroup)){ + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.RESOURCE_NOT_IN_USE.getErrorMessage(), + ValidatorConstants.Security_Group, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ALL_SERVER_GROUP_OR_SECURITY_GROUP_IN_USE, + LoggerErrorDescription.SERVER_GROUP_SECURITY_GROUP_NOT_IN_USE); + } + + } + + public boolean isSecurityGroupNotInUse(Map<String, List<String>> + referencingResourcesToCurrSecurityGroup){ + return MapUtils.isEmpty(referencingResourcesToCurrSecurityGroup); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidator.java new file mode 100644 index 0000000000..f56d941ba4 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidator.java @@ -0,0 +1,128 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.PolicyTypes; +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 org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; +import org.openecomp.sdc.validation.type.ValidatorConstants; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Created by TALIO on 2/22/2017. + */ +public class NovaServerGroupResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + validateNovaServerGroupPolicy(fileName, resourceEntry, globalContext); + validateServerGroupIsUsed + (fileName, resourceEntry, globalContext, (HeatResourceValidationContext) validationContext); + } + + @SuppressWarnings("unchecked") + private static void validateNovaServerGroupPolicy(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Resource resource = resourceEntry.getValue(); + Object policies = + resource.getProperties() == null ? null : resource.getProperties().get("policies"); + + if (Objects.nonNull(policies) && policies instanceof List) { + List<Object> policiesList = (List<Object>) policies; + if (policiesList.size() == 1) { + Object policy = policiesList.get(0); + if (!isGivenPolicyValid(policy)) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(), + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SEVER_GROUP_POLICY, + LoggerErrorDescription.WRONG_POLICY_SERVER_GROUP); + } + } else { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(), + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SEVER_GROUP_POLICY, + LoggerErrorDescription.WRONG_POLICY_SERVER_GROUP); + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private static boolean isGivenPolicyValid(Object policy) { + if (policy instanceof Map) { + return true; + } + if (policy instanceof String) { + return PolicyTypes.isGivenPolicyValid((String) policy); + } + return false; + } + + public void validateServerGroupIsUsed(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, + HeatResourceValidationContext validationContext) { + + Map<String, Map<String, List<String>>> pointedServerGroups = + validationContext.getFileLevelResourceDependencies().get(HeatResourcesTypes + .NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource()); + + if (MapUtils.isEmpty(pointedServerGroups)) { + globalContext + .addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.RESOURCE_NOT_IN_USE.getErrorMessage(), + ValidatorConstants.Server_Group, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ALL_SERVER_GROUP_OR_SECURITY_GROUP_IN_USE, + LoggerErrorDescription.SERVER_GROUP_SECURITY_GROUP_NOT_IN_USE); + return; + } + + handleServerGroupReferences(fileName, resourceEntry, pointedServerGroups, globalContext); + + + } + + private void handleServerGroupReferences(String fileName, Map.Entry<String, Resource> + resourceEntry, Map<String, Map<String, List<String>>> pointedServerGroups, + GlobalValidationContext globalContext) { + Map<String, List<String>> resourcesPointingToCurrServerGroup = + pointedServerGroups.get(resourceEntry.getKey()); + + if (MapUtils.isEmpty(resourcesPointingToCurrServerGroup)) { + globalContext + .addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.RESOURCE_NOT_IN_USE.getErrorMessage(), + ValidatorConstants.Server_Group, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ALL_SERVER_GROUP_OR_SECURITY_GROUP_IN_USE, + LoggerErrorDescription.SERVER_GROUP_SECURITY_GROUP_NOT_IN_USE); + } + + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidator.java new file mode 100644 index 0000000000..5dc42c9b9a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidator.java @@ -0,0 +1,118 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.heat.datatypes.model.PropertiesMapKeyTypes; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions; +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.ValidationContext; +import org.openecomp.sdc.validation.type.HeatResourceValidationContext; + +import java.util.Map; + +/** + * Created by TALIO on 2/22/2017. + */ +public class NovaServerResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + + HeatResourceValidationContext heatResourceValidationContext = (HeatResourceValidationContext) + validationContext; + validateNovaServerResourceType + (fileName, resourceEntry, heatResourceValidationContext, globalContext); + } + + private static void validateNovaServerResourceType(String fileName, + Map.Entry<String, Resource> resourceEntry, + HeatResourceValidationContext heatResourceValidationContext, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + validateAssignedValueForImageOrFlavorFromNova(fileName, resourceEntry, globalContext); + validateAllServerGroupsPointedByServerExistAndDefined + (fileName, resourceEntry, + heatResourceValidationContext.getHeatOrchestrationTemplate(), globalContext); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + + } + + private static void validateAssignedValueForImageOrFlavorFromNova(String fileName, + Map.Entry<String, Resource> + resourceEntry, + GlobalValidationContext + globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Resource resource = resourceEntry.getValue(); + Map<String, Object> propertiesMap = resource.getProperties(); + if (propertiesMap.get(PropertiesMapKeyTypes.IMAGE.getKeyMap()) == null + && propertiesMap.get(PropertiesMapKeyTypes.FLAVOR.getKeyMap()) == null) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_IMAGE_AND_FLAVOR.getErrorMessage(), + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_ASSIGNED_VALUES_FOR_NOVA_IMAGE_FLAVOR, + LoggerErrorDescription.MISSING_NOVA_PROPERTIES); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + @SuppressWarnings("unchecked") + private static void validateAllServerGroupsPointedByServerExistAndDefined(String fileName, + Map.Entry<String, Resource> resourceEntry, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources(); + Map<String, Object> resourceProperties = resourceEntry.getValue().getProperties(); + Map<String, Object> schedulerHintsMap = + resourceProperties == null ? null : (Map<String, Object>) resourceProperties.get( + ResourceReferenceFunctions.SCHEDULER_HINTS.getFunction()); + + if (MapUtils.isEmpty(schedulerHintsMap)) { + return; + } + + for (Object serverGroupValue : schedulerHintsMap.values()) { + if(!(serverGroupValue instanceof Map)){ + continue; + } + Map<String, Object> currentServerMap = (Map<String, Object>) serverGroupValue; + String serverResourceName = + currentServerMap == null ? null : (String) currentServerMap + .get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()); + Resource serverResource = + serverResourceName == null || resourcesMap == null ? null + : resourcesMap.get(serverResourceName); + + if (serverResource != null && !serverResource.getType() + .equals(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource())) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.SERVER_NOT_DEFINED_FROM_NOVA.getErrorMessage(), + serverResourceName, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_SERVER_GROUP_EXISTENCE, + LoggerErrorDescription.SERVER_NOT_DEFINED_NOVA); + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidator.java new file mode 100644 index 0000000000..c94875c9f2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidator.java @@ -0,0 +1,136 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.apache.commons.collections4.CollectionUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.heat.services.HeatConstants; +import org.openecomp.sdc.heat.services.tree.HeatTreeManagerUtil; +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 org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.impl.util.HeatValidationService; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + +/** + * Created by TALIO on 2/22/2017. + */ +public class ResourceGroupResourceValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + validateResourceGroupType(fileName, resourceEntry, globalContext); + } + + private static void validateResourceGroupType(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Resource resourceDef = HeatTreeManagerUtil + .getResourceDef(fileName, resourceEntry.getKey(), resourceEntry.getValue(), globalContext); + if (resourceDef != null) { + if (Objects.nonNull(resourceDef.getType()) + && HeatValidationService.isNestedResource(resourceDef.getType())) { + Optional<String> indexVarValue = + getResourceGroupIndexVarValue(resourceEntry, fileName, globalContext); + handleNestedResourceType(fileName, resourceEntry.getKey(), resourceDef, indexVarValue, + globalContext); + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private static Optional<String> getResourceGroupIndexVarValue( + Map.Entry<String, Resource> resourceEntry, String fileName, + GlobalValidationContext globalContext) { + Object indexVar = + resourceEntry.getValue().getProperties().get(HeatConstants.INDEX_PROPERTY_NAME); + if (indexVar == null) { + return Optional.of(HeatConstants.RESOURCE_GROUP_INDEX_VAR_DEFAULT_VALUE); + } + + if (indexVar instanceof String) { + return Optional.of((String) indexVar); + } else { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.RESOURCE_GROUP_INVALID_INDEX_VAR.getErrorMessage(), + resourceEntry.getKey()), LoggerTragetServiceName.VALIDATE_RESOURCE_GROUP_TYPE, + LoggerErrorDescription.INVALID_INDEX_VAR); + return Optional.empty(); + } + } + + private static void handleNestedResourceType(String fileName, String resourceName, + Resource resource, Optional<String> indexVarValue, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + validateAllPropertiesMatchNestedParameters(fileName, resourceName, resource, indexVarValue, + globalContext); + validateLoopsOfNestingFromFile(fileName, resource.getType(), globalContext); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private static void validateAllPropertiesMatchNestedParameters(String fileName, + String resourceName, + Resource resource, + Optional<String> indexVarValue, + GlobalValidationContext + globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + String resourceType = resource.getType(); + if (globalContext.getFileContextMap().containsKey(resourceType)) { + Set<String> propertiesNames = + resource.getProperties() == null ? null : resource.getProperties().keySet(); + if (CollectionUtils.isNotEmpty(propertiesNames)) { + HeatValidationService + .checkNestedParameters(fileName, resourceType, resourceName, resource, propertiesNames, + indexVarValue, globalContext); + } + } else { + globalContext.addMessage(resourceType, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_NESTED_FILE.getErrorMessage(), resourceType), + LoggerTragetServiceName.VALIDATE_PROPERTIES_MATCH_NESTED_PARAMETERS, + LoggerErrorDescription.MISSING_FILE); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private static void validateLoopsOfNestingFromFile(String fileName, String resourceType, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + List<String> filesInLoop = new ArrayList<>(Collections.singletonList(fileName)); + if (HeatValidationService + .isNestedLoopExistInFile(fileName, resourceType, filesInLoop, globalContext)) { + globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.NESTED_LOOP.getErrorMessage(), + HeatValidationService.drawFilesLoop(filesInLoop)), + LoggerTragetServiceName.VALIDATE_NESTING_LOOPS, LoggerErrorDescription.NESTED_LOOP); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java new file mode 100644 index 0000000000..957658e8cc --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidator.java @@ -0,0 +1,81 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; +import org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.util.Map; + +import static java.util.Objects.nonNull; + +/** + * Created by TALIO on 2/24/2017. + */ +public class ContrailServiceInstanceNamingConventionValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + validateAvailabilityZoneName(fileName, resourceEntry, globalContext); + } + + private void validateAvailabilityZoneName(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + String[] regexList = new String[]{"availability_zone_(\\d+)"}; + + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + Object availabilityZoneMap = + resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry + .getValue().getProperties().get("availability_zone") : null; + + if (nonNull(availabilityZoneMap)) { + if (availabilityZoneMap instanceof Map) { + String availabilityZoneName = ValidationUtil.getWantedNameFromPropertyValueGetParam + (availabilityZoneMap); + + if (availabilityZoneName != null) { + if (!ValidationUtil.evalPattern(availabilityZoneName, regexList)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), + ValidationUtil.getMessagePartAccordingToResourceType(resourceEntry), + "Availability Zone", + availabilityZoneName, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "availability_zone", resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + } + } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java new file mode 100644 index 0000000000..05f2e4fcc7 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidator.java @@ -0,0 +1,209 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.Resource; +import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; +import org.openecomp.sdc.logging.types.LoggerErrorDescription; +import org.openecomp.sdc.logging.types.LoggerTragetServiceName; +import org.openecomp.sdc.validation.ResourceValidator; +import org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.regex.Pattern; + +import static java.util.Objects.nonNull; + +/** + * Created by TALIO on 2/24/2017. + */ +public class ContrailServiceTemplateNamingConventionValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + validateServiceTemplateImageAndFlavor(fileName, resourceEntry, globalContext); + } + + private void validateServiceTemplateImageAndFlavor(String fileName, + Map.Entry<String, Resource> entry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (MapUtils.isEmpty(entry.getValue().getProperties())) { + return; + } + + Pair<String, String> imagePair = new ImmutablePair<>("image_name", ".*_image_name"); + Pair<String, String> flavorPair = new ImmutablePair<>("flavor", ".*_flavor_name"); + List<Pair<String, String>> imageFlavorPairs = Arrays.asList(imagePair, flavorPair); + + Map<String, Object> propertiesMap = entry.getValue().getProperties(); + + boolean errorExistValidatingImageOrFlavor = false; + for (Pair<String, String> imageOrFlavor : imageFlavorPairs) { + boolean errorExistWhenValidatingImageOrFlavorNames = + isErrorExistWhenValidatingImageOrFlavorNames(fileName, imageOrFlavor, entry, + propertiesMap, globalContext); + errorExistValidatingImageOrFlavor = + errorExistValidatingImageOrFlavor || errorExistWhenValidatingImageOrFlavorNames; + } + + if (!errorExistValidatingImageOrFlavor) { + validateServiceTemplatePropertiesValuesVmtypesAreIdentical(fileName, entry, globalContext, + propertiesMap); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateServiceTemplatePropertiesValuesVmtypesAreIdentical(String fileName, + Map.Entry<String, Resource> entry, + GlobalValidationContext globalContext, + Map<String, Object> propertiesMap) { + + mdcDataDebugMessage.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); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validatePropertiesValuesVmtypesAreIdentical(List<Pair> propertiesToMatch, + String fileName, + Map.Entry<String, Resource> resourceEntry, + Map<String, Object> propertiesMap, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (CollectionUtils.isEmpty(propertiesToMatch)) { + return; + } + + String previousPropertyValueValue = null; + for (Pair propertyToMatch : propertiesToMatch) { + Optional<String> propertyVmType = + extractVmTypeFromProperty(fileName, resourceEntry, propertiesMap, globalContext, + propertyToMatch); + if (propertyVmType.isPresent()) { + String currentPropVmType = propertyVmType.get(); + previousPropertyValueValue = + handleFirstIteration(previousPropertyValueValue, currentPropVmType); + if (addWarningIfCurrentVmTypeIsDifferentFromPrevious(fileName, resourceEntry, globalContext, + previousPropertyValueValue, currentPropVmType)) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private boolean addWarningIfCurrentVmTypeIsDifferentFromPrevious(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, + String previousPropertyValueValue, + String currentPropVmType) { + if (!Objects.equals(previousPropertyValueValue, currentPropVmType)) { + globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters( + Messages.CONTRAIL_VM_TYPE_NAME_NOT_ALIGNED_WITH_NAMING_CONVENSION + .getErrorMessage(), resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_CONTRAIL_VM_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + return true; + } + + return false; + } + + private boolean isErrorExistWhenValidatingImageOrFlavorNames(String fileName, + Pair<String, String> propertyNameAndRegex, + Map.Entry<String, Resource> resourceEntry, + Map<String, Object> propertiesMap, + GlobalValidationContext globalContext) { + String propertyName = propertyNameAndRegex.getKey(); + Object nameValue = + propertiesMap.get(propertyName) == null ? null : propertiesMap.get(propertyName); + String[] regexList = new String[]{propertyNameAndRegex.getValue()}; + + if (nonNull(nameValue)) { + if (nameValue instanceof Map) { + if (ValidationUtil.validateMapPropertyValue(fileName, resourceEntry, globalContext, + propertyName, + nameValue, regexList)) { + return true; + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), propertyName, + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + return true; + } + + return false; + } + return false; + } + + + private Optional<String> extractVmTypeFromProperty(String fileName, + Map.Entry<String, Resource> resourceEntry, + Map<String, Object> propertiesMap, + GlobalValidationContext globalContext, + Pair propertyKeyRegex) { + String propertyName = (String) propertyKeyRegex.getKey(); + Object propertyVal = propertiesMap.get(propertyName); + if (nonNull(propertyVal)) { + if (propertyVal instanceof Map) { + String propertyValFromGetParam = ValidationUtil.getWantedNameFromPropertyValueGetParam + (propertyVal); + if (nonNull(propertyValFromGetParam)) { + Pattern pattern = Pattern.compile("" + propertyKeyRegex.getValue()); + return Optional.ofNullable(pattern.split(propertyValFromGetParam)[0]); + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), propertyName, + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_VM_SYNC_IN_IMAGE_FLAVOR, + LoggerErrorDescription.MISSING_GET_PARAM); + return Optional.empty(); + } + } + return Optional.empty(); + } + + private String handleFirstIteration(String previousPropertyValueValue, String currentPropVmType) { + if (Objects.isNull(previousPropertyValueValue)) { + previousPropertyValueValue = currentPropVmType; + } + + return previousPropertyValueValue; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java new file mode 100644 index 0000000000..3401e15bd8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidator.java @@ -0,0 +1,177 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.apache.commons.collections4.MapUtils; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.model.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 org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.NamingConventionValidationContext; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.util.List; +import java.util.Map; + +import static java.util.Objects.nonNull; + +/** + * Created by TALIO on 2/23/2017. + */ +public class NeutronPortNamingConventionValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + + NamingConventionValidationContext namingConventionValidationContext = + (NamingConventionValidationContext)validationContext; + validatePortNetworkNamingConvention(fileName, namingConventionValidationContext.getHeatOrchestrationTemplate(), globalContext); + validateFixedIpsNamingConvention(fileName, namingConventionValidationContext.getHeatOrchestrationTemplate(), globalContext); + } + + private void validatePortNetworkNamingConvention(String fileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + String[] regexList = new String[]{".*_net_id", ".*_net_name", ".*_net_fqdn"}; + + heatOrchestrationTemplate + .getResources() + .entrySet() + .stream() + .filter(entry -> entry.getValue().getType() + .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) + .forEach(entry -> entry.getValue() + .getProperties() + .entrySet() + .stream() + .filter(propertyEntry -> + propertyEntry.getKey().toLowerCase().equals("network".toLowerCase()) + || propertyEntry.getKey().equals("network_id")) + .forEach(propertyEntry -> validateParamNamingConvention(fileName, entry.getKey(), + propertyEntry.getValue(), "Port", "Network", regexList, + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES, globalContext))); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateFixedIpsNamingConvention(String fileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + heatOrchestrationTemplate.getResources() + .entrySet() + .stream() + .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType()) != null) + .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType()) + .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE)) + .forEach(entry -> checkNeutronPortFixedIpsName(fileName, entry, globalContext)); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void checkNeutronPortFixedIpsName(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + String[] regexList = + new String[]{"[^_]+_[^_]+_ips", "[^_]+_[^_]+_v6_ips", "[^_]+_[^_]+_ip_(\\d+)", + "[^_]+_[^_]+_v6_ip_(\\d+)"}; + + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + return; + } + + Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); + Object fixedIps = propertiesMap.get("fixed_ips"); + if (nonNull(fixedIps) && fixedIps instanceof List) { + List<Object> fixedIpsList = (List<Object>) fixedIps; + for (Object fixedIpsObject : fixedIpsList) { + Map.Entry<String, Object> fixedIpsEntry = + ((Map<String, Object>) fixedIpsObject).entrySet().iterator().next(); + if (nonNull(fixedIpsEntry)) { + if (fixedIpsEntry.getValue() instanceof Map) { + String fixedIpsName = ValidationUtil.getWantedNameFromPropertyValueGetParam + (fixedIpsEntry + .getValue()); + if (nonNull(fixedIpsName)) { + if (!ValidationUtil.evalPattern(fixedIpsName, regexList)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), + "Port", "Fixed_IPS", fixedIpsName, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_FIXED_IPS_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "fixed_ips", resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_FIXED_IPS_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + } + } + } + } + } + + private void validateParamNamingConvention(String fileName, String resourceId, + Object propertyValue, String resourceType, + String wrongPropertyFormat, String[] regexList, + Messages message, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Object paramName; + if (propertyValue instanceof Map) { + paramName = ((Map) propertyValue).get("get_param"); + if (paramName instanceof String) { + if (!ValidationUtil.evalPattern((String) paramName, regexList)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(message.getErrorMessage(), resourceType, + wrongPropertyFormat, (String) paramName, resourceId), + LoggerTragetServiceName.VALIDATE_PORT_NETWORK_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "network or network_id", resourceId), + LoggerTragetServiceName.VALIDATE_PORT_NETWORK_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java new file mode 100644 index 0000000000..cf2751bef7 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java @@ -0,0 +1,596 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.core.validation.types.GlobalValidationContext; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes; +import org.openecomp.sdc.heat.datatypes.model.Environment; +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.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 org.openecomp.sdc.validation.ValidationContext; +import org.openecomp.sdc.validation.type.NamingConventionValidationContext; +import org.openecomp.sdc.validation.util.ValidationUtil; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.TreeMap; + +import static java.util.Objects.nonNull; + +/** + * Created by TALIO on 2/23/2017. + */ +public class NovaServerNamingConventionGuideLineValidator implements ResourceValidator { + private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + + @Override + public void validate(String fileName, Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext, ValidationContext validationContext) { + + NamingConventionValidationContext namingConventionValidationContext = + (NamingConventionValidationContext)validationContext; + validateHeatNovaResource(fileName, namingConventionValidationContext.getEnvFileName(), + namingConventionValidationContext.getHeatOrchestrationTemplate(), + globalContext); + } + + private void validateHeatNovaResource(String fileName, String envFileName, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>(); + //if no resources exist return + if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { + return; + } + + heatOrchestrationTemplate + .getResources() + .entrySet() + .stream() + .filter(entry -> entry.getValue().getType() + .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource())) + .forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName, + entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext)); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateNovaServerResourceType(String resourceId, String fileName, + String envFileName, + Map.Entry<String, Resource> resourceEntry, + Map<String, String> uniqueResourcePortNetworkRole, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.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); + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + @SuppressWarnings("unchecked") + private void validateNovaServerResourceMetaData(String fileName, String resourceId, + Resource resource, + GlobalValidationContext globalValidationContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Map<String, Object> novaServerProp = resource.getProperties(); + Object novaServerPropMetadata; + if (MapUtils.isNotEmpty(novaServerProp)) { + novaServerPropMetadata = novaServerProp.get("metadata"); + if (novaServerPropMetadata == null) { + globalValidationContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_METADATA.getErrorMessage(), + resourceId), + LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME, + LoggerErrorDescription.MISSING_NOVA_PROPERTIES); + } else if (novaServerPropMetadata instanceof Map) { + TreeMap<String, Object> propertyMap = new TreeMap(new Comparator<String>() { + + @Override + public int compare(String o1, String o2) { + return o1.compareToIgnoreCase(o2); + } + + @Override + public boolean equals(Object obj) { + return false; + } + }); + propertyMap.putAll((Map) novaServerPropMetadata); + if (!propertyMap.containsKey("vf_module_id")) { + globalValidationContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.MISSING_NOVA_SERVER_VF_MODULE_ID.getErrorMessage(), resourceId), + LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME, + LoggerErrorDescription.MISSING_NOVA_PROPERTIES); + } + if (!propertyMap.containsKey("vnf_id")) { + globalValidationContext.addMessage( + fileName, ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_VNF_ID.getErrorMessage(), + resourceId), + LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME, + LoggerErrorDescription.MISSING_NOVA_PROPERTIES); + } + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateNovaServerResourceNetworkUniqueRole(String fileName, String resourceId, + Map<String, String> uniqueResourcePortNetworkRole, + HeatOrchestrationTemplate heatOrchestrationTemplate, + GlobalValidationContext globalValidationContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + Object network; + String role = null; + + Object propertyNetworkValue = + heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks"); + if (propertyNetworkValue != null && propertyNetworkValue instanceof List) { + List<String> portResourceIdList = + getNovaNetworkPortResourceList(fileName, (List) propertyNetworkValue, + globalValidationContext); + for (String portResourceId : portResourceIdList) { + Resource portResource = heatOrchestrationTemplate.getResources().get(portResourceId); + if (portResource != null && portResource.getType() + .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) { + Map portNetwork = + getPortNetwork(fileName, resourceId, portResource, globalValidationContext); + if (Objects.nonNull(portNetwork)) { + network = portNetwork.get("get_param"); + if (Objects.nonNull(network)) { + if (network instanceof String ){ + role = getNetworkRole((String)network); + }else if (network instanceof List){ + role = getNetworkRole((String)((List) network).get(0)); + } + if (role != null && uniqueResourcePortNetworkRole.containsKey(role)) { + globalValidationContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE + .getErrorMessage(), resourceId, role), + LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW, + LoggerErrorDescription.RESOURCE_UNIQUE_NETWORK_ROLE); + } else { + uniqueResourcePortNetworkRole.put(role, portResourceId); + } + } + } + } + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private List<String> getNovaNetworkPortResourceList(String filename, List propertyNetworkValue, + GlobalValidationContext globalContext) { + List<String> portResourceIdList = new ArrayList<>(); + for (Object propValue : propertyNetworkValue) { + Object portPropValue = ((Map) propValue).get("port"); + Collection<String> portResourceIds = HeatStructureUtil + .getReferencedValuesByFunctionName(filename, "get_resource", portPropValue, + globalContext); + if (portResourceIds != null) { + portResourceIdList.addAll(portResourceIds); + } + } + + return portResourceIdList; + } + + private String getNetworkRole(String network) { + if (network == null) { + return null; + } + if (network.contains("_net_id")) { + return network.substring(0, network.indexOf("_net_id")); + } else if (network.contains("net_name")) { + return network.substring(0, network.indexOf("_net_name")); + } else if (network.contains("net_fqdn")) { + return network.substring(0, network.indexOf("_net_fqdn")); + } + return null; + } + + private Map getPortNetwork(String fileName, String resourceId, Resource portResource, + GlobalValidationContext globalValidationContext) { + Object portNetwork = portResource.getProperties().get("network_id"); + if (portNetwork == null) { + portNetwork = portResource.getProperties().get("network"); + } + if (!(portNetwork instanceof Map)) { + globalValidationContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "network or network_id", resourceId), + LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW, + LoggerErrorDescription.MISSING_GET_PARAM); + return null; + } + return (Map) portNetwork; + } + + private void validateAvailabilityZoneName(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + String[] regexList = new String[]{"availability_zone_(\\d+)"}; + + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return; + } + + Object availabilityZoneMap = + resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry + .getValue().getProperties().get("availability_zone") : null; + + if (nonNull(availabilityZoneMap)) { + if (availabilityZoneMap instanceof Map) { + String availabilityZoneName = ValidationUtil.getWantedNameFromPropertyValueGetParam + (availabilityZoneMap); + + if (availabilityZoneName != null) { + if (!ValidationUtil.evalPattern(availabilityZoneName, regexList)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), + ValidationUtil.getMessagePartAccordingToResourceType(resourceEntry), + "Availability Zone", + availabilityZoneName, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "availability_zone", resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + } + } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private void validateNovaServerNameImageAndFlavor(String fileName, String envFileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + String novaName = + validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, globalContext); + Map<String, String> legalNovaNamingConventionMap = + validateImageAndFlavorFromNovaServer(fileName, resourceEntry, globalContext); + + if (Objects.nonNull(novaName)) { + legalNovaNamingConventionMap.put("name", novaName); + } + + if (legalNovaNamingConventionMap.keySet().size() > 1) { + validateNovaServerNameImageAndFlavorSync(fileName, resourceEntry, + legalNovaNamingConventionMap, globalContext); + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private String validateNovaServerNamingConvention(String fileName, String envFileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return null; + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + return checkIfNovaNameByGuidelines(fileName, envFileName, resourceEntry, globalContext); + } + + private Map<String, String> validateImageAndFlavorFromNovaServer(String fileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + mdcDataDebugMessage.debugExitMessage("file", fileName); + return null; + } + + Pair<String, String> imagePair = new ImmutablePair<>("image", ".*_image_name"); + Pair<String, String> flavorPair = new ImmutablePair<>("flavor", ".*_flavor_name"); + List<Pair<String, String>> imageFlavorPairs = Arrays.asList(imagePair, flavorPair); + Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties(); + Map<String, String> imageAndFlavorLegalNames = new HashMap<>(); + + for (Pair<String, String> imageOrFlavor : imageFlavorPairs) { + boolean isErrorInImageOrFlavor = + isErrorExistWhenValidatingImageOrFlavorNames(fileName, imageOrFlavor, resourceEntry, + propertiesMap, globalContext); + if (!isErrorInImageOrFlavor) { + Object nameValue = propertiesMap.get(imageOrFlavor.getKey()) == null ? null + : propertiesMap.get(imageOrFlavor.getKey()); + String imageOrFlavorName = ValidationUtil.getWantedNameFromPropertyValueGetParam(nameValue); + imageAndFlavorLegalNames.put(imageOrFlavor.getKey(), imageOrFlavorName); + } + } + + mdcDataDebugMessage.debugExitMessage("file", fileName); + return imageAndFlavorLegalNames; + } + + private String checkIfNovaNameByGuidelines(String fileName, String envFileName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) { + return null; + } + Object novaNameGetParam = getNovaServerName(resourceEntry); + String novaName = null; + if (nonNull(novaNameGetParam)) { + novaName = + checkNovaNameGetParamValueMap(fileName, novaNameGetParam, resourceEntry, globalContext); + checkIfNovaNameParameterInEnvIsStringOrList(fileName, envFileName, resourceEntry, novaName, + globalContext); + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), + "nova server name", resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + } + + return novaName; + } + + private boolean isErrorExistWhenValidatingImageOrFlavorNames(String fileName, + Pair<String, String> propertyNameAndRegex, + Map.Entry<String, Resource> resourceEntry, + Map<String, Object> propertiesMap, + GlobalValidationContext globalContext) { + String propertyName = propertyNameAndRegex.getKey(); + Object nameValue = + propertiesMap.get(propertyName) == null ? null : propertiesMap.get(propertyName); + String[] regexList = new String[]{propertyNameAndRegex.getValue()}; + + if (nonNull(nameValue)) { + if (nameValue instanceof Map) { + if (ValidationUtil.validateMapPropertyValue(fileName, resourceEntry, globalContext, + propertyName, + nameValue, regexList)) { + return true; + } + } else { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder + .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), propertyName, + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME, + LoggerErrorDescription.MISSING_GET_PARAM); + return true; + } + + return false; + } + return false; + } + + private Object getNovaServerName(Map.Entry<String, Resource> resourceEntry) { + Object novaServerName = resourceEntry.getValue().getProperties().get("name"); + Map novaNameMap; + if (nonNull(novaServerName)) { + if (novaServerName instanceof Map) { + novaNameMap = (Map) novaServerName; + return novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()) == null ? null + : novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()); + } + } + return null; + } + + @SuppressWarnings("unchecked") + private String checkNovaNameGetParamValueMap(String fileName, Object getParamValue, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + if (getParamValue instanceof List) { + List<Object> getParamNameList = (List) getParamValue; + String[] regexName = new String[]{".*_names"}; + return isNovaNameAsListLegal(fileName, getParamNameList, regexName, resourceEntry, + globalContext); + } else if (getParamValue instanceof String) { + String[] regexName = new String[]{".*_name_(\\d+)"}; + return isNovaNameAsStringLegal(fileName, (String) getParamValue, regexName, resourceEntry, + globalContext); + } + + return null; + } + + private void checkIfNovaNameParameterInEnvIsStringOrList(String fileName, String envFileName, + Map.Entry<String, Resource> resourceEntry, + String novaServerName, + GlobalValidationContext globalContext) { + if (nonNull(envFileName)) { + Environment environment = ValidationUtil.validateEnvContent(envFileName, globalContext); + + if (environment != null && MapUtils.isNotEmpty(environment.getParameters())) { + Object novaServerNameEnvValue = + environment.getParameters().containsKey(novaServerName) ? environment.getParameters() + .get(novaServerName) : null; + if (Objects.nonNull(novaServerNameEnvValue)) { + if (!DefinedHeatParameterTypes + .isNovaServerEnvValueIsFromRightType(novaServerNameEnvValue)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server", + "Name", novaServerNameEnvValue.toString(), resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + } + } + } + } + + private String isNovaNameAsListLegal(String fileName, List<Object> getParamNameList, + String[] regexName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + + if (getParamNameList.size() != 2 || !ValidationUtil.evalPattern(getParamNameList.get(0), + regexName)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server", + "name", getParamNameList.toString(), resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + return null; + } + + return (String) getParamNameList.get(0); + } + + private String isNovaNameAsStringLegal(String fileName, String novaName, String[] regexName, + Map.Entry<String, Resource> resourceEntry, + GlobalValidationContext globalContext) { + if (!ValidationUtil.evalPattern(novaName, regexName)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server", + "name", novaName, resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + return null; + } + return novaName; + } + + private void validateNovaServerNameImageAndFlavorSync(String fileName, + Map.Entry<String, Resource> resourceEntry, + Map<String, String> legalNovaNamingConventionNames, + GlobalValidationContext globalContext) { + + mdcDataDebugMessage.debugEntryMessage("file", fileName); + + List<String> vmNames = new LinkedList<>(); + + for (Map.Entry<String, String> nameEntry : legalNovaNamingConventionNames.entrySet()) { + vmNames.add(getVmName(nameEntry.getValue(), nameEntry.getKey())); + } + + vmNames.removeIf(VMName -> VMName == null); + + if (!isVmNameSync(vmNames)) { + globalContext.addMessage( + fileName, + ErrorLevel.WARNING, + ErrorMessagesFormatBuilder.getErrorWithParameters( + Messages.NOVA_NAME_IMAGE_FLAVOR_NOT_CONSISTENT.getErrorMessage(), + resourceEntry.getKey()), + LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME, + LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + } + mdcDataDebugMessage.debugExitMessage("file", fileName); + } + + private String getVmName(String nameToGetVmNameFrom, String stringToGetIndexOf) { + int vmIndex = + nameToGetVmNameFrom == null ? -1 : nameToGetVmNameFrom.indexOf(stringToGetIndexOf); + String vmName = vmIndex < 0 ? null + : trimNonAlphaNumericCharactersFromEndOfString(nameToGetVmNameFrom.substring(0, vmIndex)); + + return vmName; + + } + + private boolean isVmNameSync(List<String> namesToCompare) { + int size = namesToCompare.size(); + for (int i = 0; i < size - 1; i++) { + if (!namesToCompare.get(i).equals(namesToCompare.get(i + 1))) { + return false; + } + } + return true; + } + + private String trimNonAlphaNumericCharactersFromEndOfString(String toTrim) { + int stringSize = toTrim.length(); + int stringLength = stringSize - 1; + String[] regexList = new String[]{"[^a-zA-Z0-9]"}; + + while (stringLength >= 0) { + if (!ValidationUtil.evalPattern(String.valueOf(toTrim.charAt(stringLength)), regexList)) { + break; + } + stringLength--; + } + + return toTrim.substring(0, stringLength + 1); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/tos/ContrailResourcesMappingTo.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/tos/ContrailResourcesMappingTo.java new file mode 100644 index 0000000000..f351af0992 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/tos/ContrailResourcesMappingTo.java @@ -0,0 +1,118 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.tos; + +import org.apache.commons.collections4.MapUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class ContrailResourcesMappingTo { + private Map<String, List<String>> contrailV1Resources; + private Map<String, List<String>> contrailV2Resources; + + /** + * Add ContrailV1Resource. + * + * @param fileName the file name + * @param resourceName the resource name + */ + public void addContrailV1Resource(String fileName, String resourceName) { + if (MapUtils.isEmpty(contrailV1Resources)) { + contrailV1Resources = new HashMap<>(); + } + contrailV1Resources.putIfAbsent(fileName, new ArrayList<>()); + contrailV1Resources.get(fileName).add(resourceName); + } + + /** + * Add ContrailV1Resource. + * + * @param fileName the file name + * @param resourceName the resource name + */ + public void addContrailV2Resource(String fileName, String resourceName) { + if (MapUtils.isEmpty(contrailV2Resources)) { + contrailV2Resources = new HashMap<>(); + } + contrailV2Resources.putIfAbsent(fileName, new ArrayList<>()); + contrailV2Resources.get(fileName).add(resourceName); + } + + public void addAll(ContrailResourcesMappingTo contrailResourcesMappingTo) { + addContrailV1Resources(contrailResourcesMappingTo.getContrailV1Resources()); + addContrailV2Resources(contrailResourcesMappingTo.getContrailV2Resources()); + } + + public String fetchContrailV1Resources() { + return fetchContrailResources(contrailV1Resources); + } + + public String fetchContrailV2Resources() { + return fetchContrailResources(contrailV2Resources); + } + + private void addContrailV1Resources(Map<String, List<String>> contrailV1Resources) { + if (!MapUtils.isEmpty(contrailV1Resources)) { + for (Map.Entry<String, List<String>> fileResourcesEntry : contrailV1Resources.entrySet()) { + for (String resourceName : fileResourcesEntry.getValue()) { + this.addContrailV1Resource(fileResourcesEntry.getKey(), resourceName); + } + } + } + } + + private void addContrailV2Resources(Map<String, List<String>> contrailV2Resources) { + if (!MapUtils.isEmpty(contrailV2Resources)) { + for (Map.Entry<String, List<String>> fileResourcesEntry : contrailV2Resources.entrySet()) { + for (String resourceName : fileResourcesEntry.getValue()) { + this.addContrailV2Resource(fileResourcesEntry.getKey(), resourceName); + } + } + } + } + + private String fetchContrailResources(Map<String, List<String>> contrailResources) { + StringBuilder buffer = new StringBuilder(); + if (MapUtils.isEmpty(contrailResources)) { + return ""; + } + for (Map.Entry<String, List<String>> fileResourcesEntry : contrailResources.entrySet()) { + buffer.append(" file '").append(fileResourcesEntry.getKey()).append("' , resources :"); + for (String resourceName : fileResourcesEntry.getValue()) { + buffer.append("'").append(resourceName).append("', "); + } + } + buffer.deleteCharAt(buffer.lastIndexOf(",")); + return buffer.toString(); + } + + public Map<String, List<String>> getContrailV1Resources() { + return contrailV1Resources; + } + + public Map<String, List<String>> getContrailV2Resources() { + return contrailV2Resources; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/ValidatorConstants.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/ValidatorConstants.java new file mode 100644 index 0000000000..d512fb6cb3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/ValidatorConstants.java @@ -0,0 +1,10 @@ +package org.openecomp.sdc.validation.type; + +/** + * Created by TALIO on 2/22/2017. + */ +public class ValidatorConstants { + public static final String Security_Group = "SecurityGroup"; + public static final String Server_Group = "ServerGroup"; + public static final String Network_Policy = "NetworkPolicy"; +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ContrailValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ContrailValidatorTest.java new file mode 100644 index 0000000000..30b7f68230 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ContrailValidatorTest.java @@ -0,0 +1,99 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.validators; + +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.datatypes.error.ErrorMessage; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.Map; + +/** + * @author Avrahamg + * @since October 06, 2016 + */ +public class ContrailValidatorTest { + + private Validator validator = new ContrailValidator(); + + @Test + public void testWarningMessageExistWhenConrailV1AndV2ResourcesCollidesInSameHeatFile() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/"); + validateMessage(messages, + "WARNING: HEAT Package includes both Contrail 2 and Contrail 3 resources. Contrail 2 resources can be found in file 'first.yaml' , resources :'jsa_net1' . Contrail 3 resources can be found in file 'first.yaml' , resources :'jsa_net2' ", + "first.yaml", 2); + } + + @Test + public void testWarningMessageExistWhenConrailV1AndV2ResourcesCollidesInDifferentHeatFiles() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/"); + validateMessage(messages, + "WARNING: HEAT Package includes both Contrail 2 and Contrail 3 resources. Contrail 2 resources can be found in file 'first.yaml' , resources :'jsa_net1', 'jsa_net3' . Contrail 3 resources can be found in file 'second.yaml' , resources :'jsa_net2', 'jsa_net4', file 'first.yaml' , resources :'jsa_net5' ", + "first.yaml", 3); + } + + @Test + public void testWarningMessageNotExistWhenConrailV1AndV2ResourcesCollidesInNonHeatFile() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/"); + validateMessage(messages, + "WARNING: HEAT Package includes both Contrail 2 and Contrail 3 resources. Contrail 2 resources can be found in file 'first.yaml' , resources :'jsa_net1' . Contrail 3 resources can be found in file 'second.yaml' , resources :'jsa_net2' ", + "first.yaml", 2); + ; + } + + @Test + public void testWarningMessageNotExistWhenOnlyConrailV1Resources() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/"); + validateMessage(messages, + "WARNING: Contrail 2.x deprecated resource is in use, Resource ID [jsa_net1]", "first.yaml", + 2); + } + + + @Test + public void testWarningMessageOnResourceWithContrailType() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/"); + validateMessage(messages, + "WARNING: Contrail 2.x deprecated resource is in use, Resource ID [template_NetworkPolicy]", + "first.yaml", 1); + ; + } + + private void validateMessage(Map<String, MessageContainer> messages, String expectedMessage, + String fileNameWithErrorToCheck, int sizeOfFileMessageList) { + Assert.assertEquals(messages.size(), 1); + List<ErrorMessage> errorMessageList = + messages.get(fileNameWithErrorToCheck).getErrorMessageList(); + Assert.assertEquals(errorMessageList.size(), sizeOfFileMessageList); + Assert.assertEquals(errorMessageList.get(0).getMessage(), expectedMessage); + } + + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java index d762689049..345aad330d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java @@ -1,10 +1,31 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.sdc.validation.impl.validators; -import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.errors.Messages; import org.junit.Test; +import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; +import org.openecomp.sdc.common.errors.Messages; import org.testng.Assert; + public class ErrorMessagesTest { @Test diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidatorTest.java new file mode 100644 index 0000000000..7cee77c54c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidatorTest.java @@ -0,0 +1,55 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/16/2017. + */ +public class ForbiddenResourceGuideLineValidatorTest { + + private static String mockConfigFileName = + "/org/openecomp/validation/configuration/mock_resource_validator_configuration.json"; + + ForbiddenResourceGuideLineValidator forbiddenResourceGuideLineValidator = new + ForbiddenResourceGuideLineValidator(); + + @BeforeClass + public void init() throws IOException { + Map<String, Object> resourcesMap = ValidationTestUtil.getResourceMap(mockConfigFileName); + + Map<String, Object> resourceBaseValidatorMap = + (Map<String, Object>) resourcesMap.get("forbiddenResourceGuideLineValidator"); + String implementationClass = + (String) resourceBaseValidatorMap.get("implementationClass"); + Map<String, Object> properties = + (Map<String, Object>) resourceBaseValidatorMap.get("properties"); + + forbiddenResourceGuideLineValidator.init(properties); + } + + @Test + public void testFloatingIpResourceType() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(forbiddenResourceGuideLineValidator, + "/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + + messages = ValidationTestUtil.testValidator(forbiddenResourceGuideLineValidator, + "/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: OS::Neutron::FloatingIP is in use, Resource ID [FSB2]"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java new file mode 100644 index 0000000000..471ed7df10 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java @@ -0,0 +1,230 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.validators; + + +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + + +public class HeatValidatorTest { + + + private Validator validator = new HeatValidator(); + + @Test + public void testInvalidHeatFormat() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Invalid HEAT format problem - [Cannot create property=kuku for JavaBean=Resource{type='null', properties=null, metadata=null, depends_on=null, update_policy='null', deletion_policy='null'}\n" + + " in 'reader', line 25, column 5:\n" + + " kuku: kuku\n" + + " ^\n" + + "Unable to find property 'kuku' on class: org.openecomp.sdc.heat.datatypes.model.Resource\n" + + " in 'reader', line 25, column 11:\n" + + " kuku: kuku\n" + + " ^\n" + + "]"); + } + + @Test + public void testDependsOn() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: a Missing resource in depend On, Missing Resource ID [resource_not_exist]"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "ERROR: a Missing resource in depend On, Missing Resource ID [resource_3]"); + } + + + @Test + public void testResourcesReferencesExistInHeat() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Referenced resource - not_existing_resource not found"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "ERROR: invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); + } + + + @Test + public void testGetResourceValueIsValid() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: invalid get_resource syntax is in use - [param_1, param_2] , get_resource function should get the resource id of the referenced resource"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "ERROR: invalid get_resource syntax is in use - {get_param=param_1} , get_resource function should get the resource id of the referenced resource"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), + "ERROR: invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); + } + + @Test + public void testTwoResourcesDoesNotHoldSameId() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } + + @Test + public void negativeTestGetParamPointToExistingParameter() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Referenced parameter - not_existing_param_1 - not found, used in resource [server_pcrf_psm_001]"); + } + + @Test + public void testGetAttrFromNested() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: get_attr attribute not found, Attribute name [nested_output], Resource ID [server_pcrf_psm_001]"); + } + + @Test + public void testDefaultValueAlignWithType() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Parameter - pcrf_pps_image_name_1 default value not align with type number"); + } + + + @Test + public void testEnvParametersMatchDefinedHeatParameterTypes() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), + "ERROR: Parameter env value pcrf_pps_flavor_name not align with type"); + + } + + @Test + public void testReferencedArtifactsExist() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Missing artifact - nimbus-ethernet"); + + } + + @Test + public void testEnvContentIsSubSetOfHeatParameters() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), + "ERROR: Env file hot-nimbus-pps_v1.0.env includes a parameter not in HEAT - mock_param"); + } + + @Test + public void testGetParamPseudoParameters() { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), + "/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + } + @Test + public void testNoErrorWhenEmptyValueForParameterInEnv() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/heat_validator/env_empty_value/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java new file mode 100644 index 0000000000..3d560934dd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java @@ -0,0 +1,142 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.validators; + + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.common.utils.SdcCommon; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + + +public class ManifestValidatorTest { + + + private ManifestValidator validator = new ManifestValidator(); + + @Test + public void testValidManifest() { + + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/manifestValidator/validFiles"); + Assert.assertNotNull(messages); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } + + @Test + public void testManifestMissingFileInZip() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/missingFileInZip"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertTrue(messages.containsKey("singleVol.yaml")); + ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.MISSING_FILE_IN_ZIP.getErrorMessage()); + } + + @Test + public void testInvalidManifest() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/invalidManifest"); + Assert.assertNotNull(messages); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertTrue(messages.containsKey(SdcCommon.MANIFEST_NAME)); + ValidationTestUtil.validateErrorMessage( + messages.get(SdcCommon.MANIFEST_NAME).getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.INVALID_MANIFEST_FILE.getErrorMessage(), SdcCommon.MANIFEST_NAME); + + } + + @Test + public void testMissingFileInManifest() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/missingFileInManifest"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertTrue(messages.containsKey("extraFile.env")); + ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(), + "WARNING: " + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()); + + } + + @Test + public void testInvalidFileTypeInManifest() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 4); + Assert.assertTrue(messages.containsKey("single.env.illegalSuffix")); + Assert.assertTrue(messages.containsKey("illegalTypeFile.yaml")); + Assert.assertTrue(messages.containsKey("single.yaml.illegalSuffix")); + Assert.assertTrue(messages.containsKey("singleVol.yaml.illegalSuffix")); + ValidationTestUtil.validateErrorMessage( + messages.get("single.env.illegalSuffix").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(), + "single.env.illegalSuffix"); + ValidationTestUtil.validateErrorMessage( + messages.get("illegalTypeFile.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.INVALID_FILE_TYPE.getErrorMessage(), "illegalTypeFile.yaml"); + ValidationTestUtil.validateErrorMessage( + messages.get("single.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), + "single.yaml.illegalSuffix"); + ValidationTestUtil.validateErrorMessage( + messages.get("singleVol.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), + "singleVol.yaml.illegalSuffix"); + + } + + + @Test + public void testMissingFileInManifestAndInZip() { + + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 2); + Assert.assertTrue(messages.containsKey("extraFile.env")); + Assert.assertTrue(messages.containsKey("singleVol.yaml")); + ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(), + "WARNING: " + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()); + ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.MISSING_FILE_IN_ZIP.getErrorMessage()); + + } + + + @Test + public void testEnvInRoot() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(), + "/org/openecomp/validation/validators/manifestValidator/envInRoot"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertTrue(messages.containsKey("second.env")); + ValidationTestUtil.validateErrorMessage(messages.get("second.env").getErrorMessageList().get(0).getMessage(), + "ERROR: ENV file must be associated to a HEAT file"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java new file mode 100644 index 0000000000..7d994e4f13 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java @@ -0,0 +1,155 @@ +package org.openecomp.sdc.validation.impl.validators; + +import org.openecomp.sdc.validation.Validator; +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + +/** + * Created by TALIO on 2/15/2017. + */ +public class SharedResourceGuideLineValidatorTest { + + Validator validator = new SharedResourceGuideLineValidator(); + + @Test + public void testBaseHeatExposeNetwork() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [SecurityGroup_expose]"); + } + + @Test + public void testBaseHeatExposeNetworkAndVolume() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [volume_expose]"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [net_expose]"); + } + + @Test + public void testBaseHeatExposeServerGroup() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [ServerGroup_expose]"); + } + + @Test + public void testBaseHeatExposeSecurityGroup() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [SecurityGroup_expose]"); + } + + @Test + public void testBaseHeatExposeVolume() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [volume_expose]"); + } + + @Test + public void testHeatVolumeExpose() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Volume is not defined as output and thus cannot be attached volume_expose"); + + } + + @Test + public void testResourceIsExposedByCallingGetResourceNotFromOutput() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + + messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("base_virc.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("base_virc.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Resource is not defined as output and thus cannot be Shared, Resource ID [virc_RSG]"); + } + + @Test + public void testMissingBaseHeat() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), + "WARNING: Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"); + } + + @Test + public void testMultiBaseHeat() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, + "/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), + "WARNING: Multi Base HEAT. Expected only one. Files [second.yaml,first.yaml]."); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java deleted file mode 100644 index f9c5bf423b..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openecomp.sdc.validation.impl.validators; - -import org.openecomp.core.utilities.file.FileUtils; -import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; -import org.openecomp.core.validation.interfaces.Validator; -import org.openecomp.core.validation.types.GlobalValidationContext; -import org.openecomp.core.validation.types.MessageContainer; -import org.testng.Assert; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -public abstract class ValidatorBaseTest { - - private static GlobalValidationContext createGlobalContextFromPath(String path) { - GlobalValidationContext globalValidationContext = new GlobalValidationContext(); - Map<String, byte[]> contentMap = getContentMapByPath(path); - if (contentMap == null) { - return null; - } - contentMap.entrySet().stream() - .forEach(entry -> globalValidationContext.addFileContext(entry.getKey(), entry.getValue())); - - return globalValidationContext; - } - - - // New test base implementation - - private static Map<String, byte[]> getContentMapByPath(String path) { - Map<String, byte[]> contentMap = new HashMap<>(); - byte[] fileContent; - FileInputStream fis; - URL url = ValidatorBaseTest.class.getResource(path); - File pathFile = new File(url.getFile()); - File[] files; - if (pathFile.isDirectory()) { - files = pathFile.listFiles(); - } else { - files = new File[]{pathFile}; - } - - if (files == null || files.length == 0) { - return null; - } - - for (File file : files) { - try { - fis = new FileInputStream(file); - fileContent = FileUtils.toByteArray(fis); - contentMap.put(file.getName(), fileContent); - } catch (IOException e) { - e.printStackTrace(); - } - } - return contentMap; - } - - public abstract Map<String, MessageContainer> runValidation(String path); - - protected Map<String, MessageContainer> testValidator(Validator validator, String path) { - - GlobalValidationContext globalValidationContext = createGlobalContextFromPath(path); - validator.validate(globalValidationContext); - - assert globalValidationContext != null; - return globalValidationContext.getContextMessageContainers(); - - - } - - protected void validateErrorMessage(String actualMessage, String expected, String... params) { - Assert.assertEquals(actualMessage.replace("\n", "").replace("\r", ""), - ErrorMessagesFormatBuilder.getErrorWithParameters(expected, params).replace("\n", "") - .replace("\r", "")); - - } - - -} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/YamlValidatorTest.java index abce8ec88c..32e847004c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/YamlValidatorTest.java @@ -1,22 +1,40 @@ -package org.openecomp.sdc.validation.impl.validators.validators; +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.validation.impl.validators; -import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest; -import org.openecomp.sdc.validation.impl.validators.YamlValidator; -import org.openecomp.core.validation.errors.Messages; import org.openecomp.core.validation.types.MessageContainer; - +import org.openecomp.sdc.common.errors.Messages; +import org.openecomp.sdc.validation.util.ValidationTestUtil; import org.testng.Assert; import org.testng.annotations.Test; import java.util.Map; -public class YamlValidatorTest extends ValidatorBaseTest { +public class YamlValidatorTest { public Map<String, MessageContainer> runValidation(String path) { YamlValidator validator = new YamlValidator(); - return testValidator(validator, path); + return ValidationTestUtil.testValidator(validator, path); } @@ -24,21 +42,21 @@ public class YamlValidatorTest extends ValidatorBaseTest { public void testValidYaml() { Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml"); + "/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 0); } -// @Test + @Test public void testInvalidTabYaml() { Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml"); + "/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); - validateErrorMessage( + ValidationTestUtil.validateErrorMessage( messages.get("invalidYamlTab.yaml").getErrorMessageList().get(0).getMessage(), - Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + "ERROR: " + Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), "while scanning for the next tokenfound character '\\t(TAB)' that cannot start any token. (Do not use \\t(TAB) for indentation) in 'reader', line 14, column 5: \tadmin_state_up: true ^"); } @@ -48,13 +66,13 @@ public class YamlValidatorTest extends ValidatorBaseTest { public void testDuplicateKeyInYaml() { Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml"); + runValidation("/org/openecomp/validation/validators/yaml_validator/duplicateKey.yaml"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); Assert.assertTrue(messages.containsKey("duplicateKey.yaml")); - validateErrorMessage( + ValidationTestUtil.validateErrorMessage( messages.get("duplicateKey.yaml").getErrorMessageList().get(0).getMessage(), - Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + "ERROR: " + Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), "while parsing MappingNode in 'reader', line 6, column 3: Key_1_unique: ^duplicate key: Key_2_not_unique in 'reader', line 31, column 1: ^"); } @@ -62,14 +80,14 @@ public class YamlValidatorTest extends ValidatorBaseTest { @Test public void testInvalidYamlStructure() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml"); + Map<String, MessageContainer> messages = runValidation( + "/org/openecomp/validation/validators/yaml_validator/invalidYamlStructure.yaml"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); Assert.assertTrue(messages.containsKey("invalidYamlStructure.yaml")); - validateErrorMessage( + ValidationTestUtil.validateErrorMessage( messages.get("invalidYamlStructure.yaml").getErrorMessageList().get(0).getMessage(), - Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + "ERROR: " + Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), "while parsing a block mapping in 'reader', line 8, column 7: admin_state_up: true ^expected <block end>, but found BlockEntry in 'reader', line 10, column 7: - shared: true ^"); } @@ -77,12 +95,12 @@ public class YamlValidatorTest extends ValidatorBaseTest { public void testEmptyYaml() { Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml"); + runValidation("/org/openecomp/validation/validators/yaml_validator/emptyYaml.yaml"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); Assert.assertTrue(messages.containsKey("emptyYaml.yaml")); - validateErrorMessage(messages.get("emptyYaml.yaml").getErrorMessageList().get(0).getMessage(), - Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), + ValidationTestUtil.validateErrorMessage(messages.get("emptyYaml.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: " + Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(), Messages.EMPTY_YAML_FILE.getErrorMessage()); } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidatorTest.java new file mode 100644 index 0000000000..a03120c5d6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ContrailNetworkPolicyResourceValidatorTest.java @@ -0,0 +1,36 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class ContrailNetworkPolicyResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + ContrailNetworkPolicyResourceValidator resourceValidator = new + ContrailNetworkPolicyResourceValidator(); + + @Test + public void testNetworkPolicyAssociatedWithAttachPolicy() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, resourceValidator + , HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: NetworkPolicy not in use, Resource Id [not_used_server_pcrf_policy]"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidatorTest.java new file mode 100644 index 0000000000..96aa631a69 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NestedResourceValidatorTest.java @@ -0,0 +1,70 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NestedResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + NestedResourceValidator resourceValidator = new NestedResourceValidator(); + + @Test + public void testNoLoopsNesting() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, null, + "/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 4); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Nested files loop - [hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml]"); + + Assert.assertEquals( + messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(0) + .getMessage(), + "ERROR: Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]"); + Assert.assertEquals( + messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(1) + .getMessage(), + "ERROR: Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]"); + + Assert.assertEquals(messages.get("yaml-point-to-itself.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("yaml-point-to-itself.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Nested files loop - [yaml-point-to-itself.yaml -- yaml-point-to-itself.yaml]"); + + Assert.assertEquals(messages.get("nested-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Nested files loop - [nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml]"); + } + + @Test + public void testPropertiesMatchNestedParameters() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, null, + "/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Referenced parameter not found in nested file - nested-pps_v1.0.yaml, parameter name [server_pcrf_pps_001], Resource ID [parameter_not_existing_in_nested]"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java new file mode 100644 index 0000000000..359803f473 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java @@ -0,0 +1,35 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NeutronPortResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + NeutronPortResourceValidator resourceValidator = new NeutronPortResourceValidator(); + + @Test + public void testOnlyOneNovaPointsToOnePort() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Resource Port oam1_int_port exceed allowed relations from NovaServer"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidatorTest.java new file mode 100644 index 0000000000..b8e8d1ee19 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronSecurityGroupResourceValidatorTest.java @@ -0,0 +1,53 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NeutronSecurityGroupResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + NeutronSecurityGroupResourceValidator resourceValidator = new + NeutronSecurityGroupResourceValidator(); + + @Test + public void testSecurityGroupBaseFileNoPorts() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: SecurityGroup not in use, Resource Id [jsa_security_group3]"); + } + + @Test + public void testSecurityGroupsCalledByPort() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: SecurityGroup not in use, Resource Id [not_used_security_group]"); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidatorTest.java new file mode 100644 index 0000000000..b0e6ebf631 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerGroupResourceValidatorTest.java @@ -0,0 +1,51 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NovaServerGroupResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + NovaServerGroupResourceValidator resourceValidator = new NovaServerGroupResourceValidator(); + + @Test + public void testPolicyIsAffinityOrAntiAffinity() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Wrong policy in server group - pcrf_server_policies_1"); + } + + @Test + public void testServerGroupCalledByServer() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: ServerGroup not in use, Resource Id [not_used_server_group]"); + + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidatorTest.java new file mode 100644 index 0000000000..94bdf1e52f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NovaServerResourceValidatorTest.java @@ -0,0 +1,53 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NovaServerResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + NovaServerResourceValidator resourceValidator = new NovaServerResourceValidator(); + + @Test + public void testNovaPropertiesHasAssignedValue() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Missing both Image and Flavor in NOVA Server, Resource ID [nova_server_resource_missing_both]"); + } + + @Test + public void testServerGroupsPointedByServersDefinedCorrectly() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Missing server group definition - BE_Affinity_2, nova_server_1"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "ERROR: Missing server group definition - BE_Affinity_2, nova_server_2"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidatorTest.java new file mode 100644 index 0000000000..4b255ae967 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/ResourceGroupResourceValidatorTest.java @@ -0,0 +1,106 @@ +package org.openecomp.sdc.validation.impl.validators.heatresource; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class ResourceGroupResourceValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + ResourceGroupResourceValidator resourceValidator = new ResourceGroupResourceValidator(); + + @Test + public void testResourceGroupWithInvalidIndexVar() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 8); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Wrong value assigned to a ResourceGroup index_var property (functions are not allowed but only strings), Resource ID [resource_with_resources_group_1]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_2], property name [index_boolean], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(2).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_3], property name [index_boolean], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(3).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_3], property name [index_number], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(4).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_4], property name [index_boolean], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(5).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_5], property name [index_boolean], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(6).getMessage(), + "WARNING: Wrong value type assigned to a nested input parameter, nested resource [resource_with_resources_group_5], property name [index_number], nested file [yamlFile.yaml]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(7).getMessage(), + "ERROR: Wrong value assigned to a ResourceGroup index_var property (functions are not allowed but only strings), Resource ID [resource_with_resources_group_6]"); + } + + @Test + public void testResourceGroupWithInvalidType() { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 3); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_1], resource_def type [{get_param=pcrf_vnf_id}]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_2], resource_def type [OS::Nova::Server]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(2).getMessage(), + "WARNING: A resource has an invalid or unsupported type - null, Resource ID [resource_with_resources_group_3]"); + } + + @Test + public void testResourcesGroupWithNested() throws IOException { + Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 3); + + Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Referenced parameter not found in nested file - nested-from-resources-group.yaml, parameter name [resource_with_resources_group], Resource ID [property_not_in_nested]"); + Assert.assertEquals( + messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_without_resources_group], resource_def type [OS::Nova::Server]"); + + Assert.assertEquals(messages.get("nested-pps_v1.0.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Nested files loop - [nested-pps_v1.0.yaml -- nested-from-resources-group.yaml -- hot-nimbus-pps_v1.0.yaml -- nested-pps_v1.0.yaml]"); + + Assert.assertEquals(messages.get("nested-not-exist.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested-not-exist.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: Missing nested file - nested-not-exist.yaml"); + } + +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidatorTest.java new file mode 100644 index 0000000000..2e61df2b16 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceInstanceNamingConventionValidatorTest.java @@ -0,0 +1,41 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class ContrailServiceInstanceNamingConventionValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + ContrailServiceInstanceNamingConventionValidator resourceValidator = new + ContrailServiceInstanceNamingConventionValidator(); + + @Test + public void testContrailServiceInstanceAvailabilityZoneNotAlignedWithNamingConvention() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.CONTRAIL_SERVICE_INSTANCE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Service Instance 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_1a], Resource ID [service_instance_1]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testContrailServiceInstanceAvailabilityZoneAlignedWithNamingConvention() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.CONTRAIL_SERVICE_INSTANCE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidatorTest.java new file mode 100644 index 0000000000..55a3f31b19 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/ContrailServiceTemplateNamingConventionValidatorTest.java @@ -0,0 +1,58 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class ContrailServiceTemplateNamingConventionValidatorTest { + + HeatResourceValidator baseValidator = new HeatResourceValidator(); + ContrailServiceTemplateNamingConventionValidator resourceValidator = new + ContrailServiceTemplateNamingConventionValidator(); + + @Test + public void testContrailServiceTemplateImageAndFlavorNamesAlignedWithNamingConventionButDifferentVmType() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals( + messages.get(messages.keySet().iterator().next()).getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Service Template naming convention in Image and Flavor properties is not consistent in Resource, Resource ID service_template"); + } + + @Test + public void testContrailServiceTemplateImageAndFlavorNamesNotAlignedWithNamingConvention() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Service Template 'image_name' Parameter Name not aligned with Guidelines, Parameter Name [st_imaage_name], Resource ID [service_template]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Service Template 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [st_flavaor_name], Resource ID [service_template]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testContrailServiceTemplateImageAndFlavorNamesAlignedWithNamingConvention() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidatorTest.java new file mode 100644 index 0000000000..8aedf8219c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NeutronPortNamingConventionValidatorTest.java @@ -0,0 +1,64 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.openecomp.sdc.validation.impl.validators.NamingConventionGuideLineValidator; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.NamingConventionGuideLineValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NeutronPortNamingConventionValidatorTest { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + NeutronPortNamingConventionValidator resourceValidator = new + NeutronPortNamingConventionValidator(); + + @Test + public void testHeatPortNetworkNamingConvention() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Port 'Network' Parameter Name not aligned with Guidelines, Parameter Name [not_valid_network_name], Resource ID [port_resource]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testNeutronFixedIpName() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 4); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_net_v6_ip_a], Resource ID [port_resource_0]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [indx], Resource ID [port_resource_1]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(), + "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_net_ipz], Resource ID [port_resource_2]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(3).getMessage(), + "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_net_v0_ip_3], Resource ID [port_resource_2]. As a result, VF/VFC Profile may miss this information"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java new file mode 100644 index 0000000000..25b98bb6fb --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java @@ -0,0 +1,154 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.NamingConventionGuideLineValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +/** + * Created by TALIO on 2/28/2017. + */ +public class NovaServerNamingConventionGuideLineValidatorTest { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + NovaServerNamingConventionGuideLineValidator resourceValidator = new + NovaServerNamingConventionGuideLineValidator(); + + @Test + public void testHeatNovaServerMetaDataValidation() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Missing VNF_ID in Metadata property, Resource ID [FSB2]"); + } + + @Test + public void testNovaServerAvailabilityZoneName() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_a], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testNovaImageAndFlavorNames() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-flavor], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Server 'image' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-image], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testNovaResourceNetworkUniqueRole() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: A resource is connected twice to the same network role, Network Role [FSB2], Resource ID [Internal1]"); + } + + @Test + public void testNovaServerName() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_pps_server_4], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testVMNameSyncInNova() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 4); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [CE_server_name], Resource ID [FSB2_legal_2]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb_flavor_names], Resource ID [FSB2_legal_3]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(), + "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_1]"); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(3).getMessage(), + "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_2]"); + + } + + @Test + public void testAvailabilityZoneName() throws IOException { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + "/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_name], Resource ID [availability_zone_illegal_name_1]. As a result, VF/VFC Profile may miss this information"); + Assert.assertEquals( + messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [availability_zone_illegal_name_2]. As a result, VF/VFC Profile may miss this information"); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java deleted file mode 100644 index 44e9a3a580..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java +++ /dev/null @@ -1,281 +0,0 @@ -package org.openecomp.sdc.validation.impl.validators.validators; - -import org.openecomp.sdc.validation.impl.validators.EcompGuideLineValidator; - -import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest; -import org.openecomp.core.validation.types.MessageContainer; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.util.Map; - -public class EcompGuideLineValidatorTest extends ValidatorBaseTest { - - @Test - public void testMissingBaseHeat() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), - "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"); - } - - @Test - public void testMultiBaseHeat() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), - "Multi Base HEAT. Expected only one. Files [second.yaml,first.yaml]."); - } - - @Test - public void testBaseHeatExposeVolume() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - volume_expose"); - } - - @Test - public void testBaseHeatExposeServerGroup() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - ServerGroup_expose"); - } - - @Test - public void testBaseHeatExposeSecurityGroup() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - SecurityGroup_expose"); - } - - - @Test - public void testBaseHeatExposeNetwork() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - SecurityGroup_expose"); - } - - @Test - public void testBaseHeatExposeNetworkAndVolume() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - volume_expose"); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), - "Resource is not defined as output and thus cannot be Shared. resource id - net_expose"); - } - - @Test - public void testNovaResourceNetworkUniqueRole() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "A resource is connected twice to the same network role Resource ID [FSB2] Network Role [Internal1]."); - } - - @Test - public void testHeatVolumeExpose() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().get(0).getMessage(), - "Volume is not defined as output and thus cannot be attached volume_expose"); - - } - - @Test - public void testHeatPortNetworkNamingConvention() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Network Parameter Name not aligned with Guidelines Parameter Name [not_valid_network_name] Resource ID [port_resource]"); - } - - @Test - public void testHeatNovaServerMetaDataValidation() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Missing VNF_ID Resource id [FSB2]"); - } - - @Test - public void testNeutronFixedIpName() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_0]"); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_1]"); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_2]"); - } - - - @Test - public void testNovaServerName() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [FSB2]"); - } - - @Test - public void testAvailabilityZoneName() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Server Availability Zone not aligned with Guidelines, Resource ID [FSB2]"); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), - "Server Availability Zone not aligned with Guidelines, Resource ID [FSB3]"); - } - - @Test - public void testFloatingIpResourceType() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "OS::Neutron::FloatingIP is in use, Resource ID [FSB2]"); - } - - @Test - public void testImageAndFlavorNames() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - messages = runValidation( - "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), - "Wrong flavor name format in NOVA Server, Resource ID [FSB2]"); - Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(), - "Wrong image name format in NOVA Server, Resource ID [FSB3]"); - } - - - @Override - public Map<String, MessageContainer> runValidation(String path) { - EcompGuideLineValidator validator = new EcompGuideLineValidator(); - return testValidator(validator, path); - } -}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java deleted file mode 100644 index e4203945aa..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.openecomp.sdc.validation.impl.validators.validators; - -import org.openecomp.sdc.validation.impl.validators.EcompGuideLineValidator; -import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest; -import org.openecomp.core.validation.types.MessageContainer; - -import java.io.IOException; -import java.util.Map; - -import org.testng.Assert; -import org.testng.annotations.Test; - -public class EcompNamingConventionTest extends ValidatorBaseTest { - - @Test - public void testNeutronFixedIpName() throws IOException { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 2); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_1]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_2]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), - "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_3]"); - } - - - @Test - public void testNovaServerName() throws IOException { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 2); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 6); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_1]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_2]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_3]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(3).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_4]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(4).getMessage(), - "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_5]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(5).getMessage(), - "Missing get_param in nova server name, Resource Id [nova_server_ilegal_name_6]"); - } - - - @Test - public void testAvailabilityZoneName() throws IOException { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 2); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_1]"); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_2]"); - } - - - @Test - public void testFloatingIpResourceType() throws IOException { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 2); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals( - messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "OS::Neutron::FloatingIP is in use, Resource ID [floating_ip_type]"); - } - - - @Override - public Map<String, MessageContainer> runValidation(String path) { - EcompGuideLineValidator ecompGuideLineValidator = new EcompGuideLineValidator(); - return testValidator(ecompGuideLineValidator, path); - } -}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java deleted file mode 100644 index 9ff375c1a3..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java +++ /dev/null @@ -1,356 +0,0 @@ -package org.openecomp.sdc.validation.impl.validators.validators; - -import org.openecomp.sdc.validation.impl.validators.HeatValidator; -import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest; -import org.openecomp.core.validation.types.MessageContainer; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.util.Map; - -public class HeatValidatorTest extends ValidatorBaseTest { - - - @Test - public void testInvalidHeatFormat(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Invalid HEAT format problem - [Cannot create property=kuku for JavaBean=Resource{type='null', properties=null, metadata=null, depends_on=null, update_policy='null', deletion_policy='null'}\n" + - " in 'reader', line 25, column 5:\n" + - " kuku: kuku\n" + - " ^\n" + - "Unable to find property 'kuku' on class: org.openecomp.sdc.heat.datatypes.model.Resource\n" + - " in 'reader', line 25, column 11:\n" + - " kuku: kuku\n" + - " ^\n" + - "]"); - } - - - @Test - public void testResourcesReferencesExistInHeat() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced resource - not_existing_resource not found"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); - } - - - @Test - public void testGetResourceValueIsValid(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "invalid get_resource syntax is in use - [param_1, param_2] , get_resource function should get the resource id of the referenced resource"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "invalid get_resource syntax is in use - {get_param=param_1} , get_resource function should get the resource id of the referenced resource"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); - } - - @Test - public void testTwoResourcesDoesNotHoldSameId() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - } - - @Test - public void negativeTestGetParamPointToExistingParameter() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter - not_existing_param_1 - not found, used in resource - server_pcrf_psm_001"); - } - - @Test - public void testGetAttrFromNested() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "get_attr attribute not found - nested_output in resource server_pcrf_psm_001"); - } - - @Test - public void testPropertiesMatchNestedParameters() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter not found in nested file - nested-pps_v1.0.yaml, resource name - server_pcrf_pps_001, parameter name - parameter_not_existing_in_nested"); - } - - @Test - public void testNovaPropertiesHasAssignedValue() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing both Image and Flavor in NOVA Server - nova_server_resource_missing_both"); - } - - @Test - public void testNoLoopsNesting() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 4); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "A resource has an invalid or unsupported type - null, Resource ID [server_pcrf_psm_002]"); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Nested files loop - [hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml]"); - - Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]"); - Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(1).getMessage(), "Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]"); - - Assert.assertEquals(messages.get("yaml-point-to-itself.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("yaml-point-to-itself.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [yaml-point-to-itself.yaml -- yaml-point-to-itself.yaml]"); - - Assert.assertEquals(messages.get("nested-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("nested-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml]"); - } - - @Test - public void testOnlyOneNovaPointsToOnePort() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Resource Port oam1_int_port exceed allowed relations from NovaServer"); - } - - @Test - public void testServerGroupsPointedByServersDefinedCorrectly() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing server group definition - BE_Affinity_2, nova_server_1"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Missing server group definition - BE_Affinity_2, nova_server_2"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "Referenced resource - BE_Affinity_1 not found"); - } - - - @Test - public void testPolicyIsAffinityOrAntiAffinity() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Wrong policy in server group - pcrf_server_policies_1"); - } - - - @Test - public void testEnvContentIsSubSetOfHeatParameters() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), "Env file hot-nimbus-pps_v1.0.env includes a parameter not in HEAT - mock_param"); - } - - @Test - public void testDefaultValueAlignWithType() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Parameter - pcrf_pps_image_name_1 default value not align with type number"); - } - - - @Test - public void testEnvParametersMatchDefinedHeatParameterTypes() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), "Parameter env value pcrf_pps_flavor_name not align with type"); - - } - - @Test - public void testReferencedArtifactsExist() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing artifact - nimbus-ethernet"); - - } - - - @Test - public void testResourcesGroupWithNested() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 3); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter not found in nested file - nested-from-resources-group.yaml, resource name - nested-from-resources-group.yaml, parameter name - property_not_in_nested"); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_without_resources_group], resource_def type [OS::Nova::Server]"); - - Assert.assertEquals(messages.get("nested-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("nested-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-pps_v1.0.yaml -- nested-from-resources-group.yaml -- hot-nimbus-pps_v1.0.yaml -- nested-pps_v1.0.yaml]"); - - Assert.assertEquals(messages.get("nested-not-exist.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("nested-not-exist.yaml").getErrorMessageList().get(0).getMessage(), "Missing nested file - nested-not-exist.yaml"); - } - - - @Test - public void testResourceGroupWithInvalidType(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 3); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_1], resource_def type [{get_param=pcrf_vnf_id}]"); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_2], resource_def type [OS::Nova::Server]"); - Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "A resource has an invalid or unsupported type - null, Resource ID [resource_with_resources_group_3]"); - } - - - @Test - public void testNetworkPolicyAssociatedWithAttachPolicy() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "NetworkPolicy not in use, Resource Id [not_used_server_pcrf_policy]"); - } - - - @Test - public void testSecurityGroupsCalledByPort() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [not_used_security_group]"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Port not bind to any NOVA Server, Resource Id [attach_policy_resource]"); - } - - - @Test - public void testServerGroupCalledByServer() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "ServerGroup not in use, Resource Id [not_used_server_group]"); - - } - - - @Test - public void testSecurityGroupBaseFileNoPorts() throws IOException { - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().size(), 1); - Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [shared_security_group_id3]"); - } - - - @Test - public void testDependsOn(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "a Missing resource in depend On Missing Resource ID [resource_not_exist]"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "a Missing resource in depend On Missing Resource ID [resource_3]"); - } - - - @Test - public void testSharedResourcesValidation(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/shared_resources/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [not_used_security_group]"); - Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Port not bind to any NOVA Server, Resource Id [attach_policy_resource]"); - } - - - @Test - public void testNoErrorWhenEmptyValueForParameterInEnv(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_empty_value/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - - MessageContainer envMessages = messages.get("env_empty_value.env"); - Assert.assertNull(envMessages); - } - - - @Test - public void testGetParamPseudoParameters(){ - Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input"); - - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - - } - - - @Override - public Map<String, MessageContainer> runValidation(String path) { - HeatValidator heatValidator = new HeatValidator(); - return testValidator(heatValidator, path); - } -} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java deleted file mode 100644 index 479a1fb83b..0000000000 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openecomp.sdc.validation.impl.validators.validators; - - -import org.openecomp.sdc.common.utils.AsdcCommon; -import org.openecomp.sdc.validation.impl.validators.ManifestValidator; -import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest; -import org.openecomp.core.validation.errors.Messages; -import org.openecomp.core.validation.types.MessageContainer; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.util.Map; - -public class ManifestValidatorTest extends ValidatorBaseTest { - - - @Test - public void testValidManifest() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/manifestValidator/validFiles"); - Assert.assertNotNull(messages); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 0); - } - - @Test - public void testManifestMissingFileInZip() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/manifestValidator/missingFileInZip"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertTrue(messages.containsKey("singleVol.yaml")); - validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(), - Messages.MISSING_FILE_IN_ZIP.getErrorMessage()); - } - - @Test - public void testInvalidManifest() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/manifestValidator/invalidManifest"); - Assert.assertNotNull(messages); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertTrue(messages.containsKey(AsdcCommon.MANIFEST_NAME)); - validateErrorMessage( - messages.get(AsdcCommon.MANIFEST_NAME).getErrorMessageList().get(0).getMessage(), - Messages.INVALID_MANIFEST_FILE.getErrorMessage(), AsdcCommon.MANIFEST_NAME); - - } - - @Test - public void testMissingFileInManifest() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/manifestValidator/missingFileInManifest"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertTrue(messages.containsKey("extraFile.env")); - validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(), - Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()); - - } - - @Test - public void testInvalidFileTypeInManifest() { - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 4); - Assert.assertTrue(messages.containsKey("single.env.illegalSuffix")); - Assert.assertTrue(messages.containsKey("illegalTypeFile.yaml")); - Assert.assertTrue(messages.containsKey("single.yaml.illegalSuffix")); - Assert.assertTrue(messages.containsKey("singleVol.yaml.illegalSuffix")); - validateErrorMessage( - messages.get("single.env.illegalSuffix").getErrorMessageList().get(0).getMessage(), - Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(), "single.env.illegalSuffix"); - validateErrorMessage( - messages.get("illegalTypeFile.yaml").getErrorMessageList().get(0).getMessage(), - Messages.INVALID_FILE_TYPE.getErrorMessage(), "illegalTypeFile.yaml"); - validateErrorMessage( - messages.get("single.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(), - Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), "single.yaml.illegalSuffix"); - validateErrorMessage( - messages.get("singleVol.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(), - Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), "singleVol.yaml.illegalSuffix"); - - } - - - @Test - public void testMissingFileInManifestAndInZip() { - - Map<String, MessageContainer> messages = runValidation( - "/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 2); - Assert.assertTrue(messages.containsKey("extraFile.env")); - Assert.assertTrue(messages.containsKey("singleVol.yaml")); - validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(), - Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()); - validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(), - Messages.MISSING_FILE_IN_ZIP.getErrorMessage()); - - } - - - @Test - public void testEnvInRoot() { - Map<String, MessageContainer> messages = - runValidation("/openecomp/org/validation/validators/manifestValidator/envInRoot"); - Assert.assertNotNull(messages); - Assert.assertEquals(messages.size(), 1); - Assert.assertTrue(messages.containsKey("second.env")); - validateErrorMessage(messages.get("second.env").getErrorMessageList().get(0).getMessage(), - "ENV file must be associated to a HEAT file"); - } - - public Map<String, MessageContainer> runValidation(String path) { - ManifestValidator manifestValidator = new ManifestValidator(); - return testValidator(manifestValidator, path); - - } - - -} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/configuration/mock_resource_validator_configuration.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/configuration/mock_resource_validator_configuration.json new file mode 100644 index 0000000000..9fe55b0419 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/configuration/mock_resource_validator_configuration.json @@ -0,0 +1,13 @@ +{ + "forbiddenResourceGuideLineValidator": { + "enable": true, + "implementationClass": "org.openecomp.sdc.validation.impl.validators.ForbiddenResourceGuideLineValidator", + "properties": { + "forbiddenResourceTypes": { + "OS::Neutron::FloatingIP": { + "enable": true + } + } + } + } +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml index 368834e847..368834e847 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml index 08955562d4..08955562d4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml index f5c6b598cc..f5c6b598cc 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml index 0c7abd6d49..0c7abd6d49 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml index fe5effbc24..fe5effbc24 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml index 781bcba716..781bcba716 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml index 5660cc003b..5660cc003b 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml index 89fafb9d3a..89fafb9d3a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml index e2a4301249..e2a4301249 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml index 63b576edb8..63b576edb8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/MANIFEST.json new file mode 100644 index 0000000000..31d26cce5a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/MANIFEST.json @@ -0,0 +1,26 @@ +{ + "name": "virc", + "description": "", + "data": [ + { + "file": "base_virc.yaml", + "type": "HEAT", + "isBase": "true", + "data": [ + { + "file": "base_virc.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "nested_virc.yaml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "user_data.sh", + "type": "SHELL" + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.env new file mode 100644 index 0000000000..617084511c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.env @@ -0,0 +1,59 @@ +parameters: + virc_environment: 'CI-VIRC' + virc_version: '1609.0.0.0.64' + virc_version_file: 'version-VIRC_Cloud.json' + vnf_id: vnf_id_placeholder + vnf_name: 'ircc001v' + vf_module_id: vf_module_id_placeholder + vf_module_name: vf_module_name_placeholder + vm_roles: [ + 'vm_role_placeholder_0', + 'vm_role_placeholder_1', + 'vm_role_placeholder_2', + 'vm_role_placeholder_3'] + num_instances: 4 + virc_names: [ + 'irpr0001vm001pfe001p1n004v001', + 'irpr0001vm002pbe001p1n004v001', + 'irpr0001vm003mdb001p1n004v001', + 'irpr0001vm004mdb001p1n004v001'] + virc_image_name: rhel7-with-openecomp-tools + virc_flavor_name: m1.large + virc_ssh_public_key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9/ngAeNYJe8p8RvPQC4NSRu1VyWimhMx+6Q0LgD1n/UeTN+Ppn1NA0/CQDR+nX0vOMkfwkw43y3qi1kDfHSNKebxVUix1nyqXUq9n8kjhu+dsKXqiClL2B36XvsrXfkA6SRG8jsWiBgkR+hvcewjqk2pLigdi233F69GHdqKsRJOS4246/VTdXyFZX5V3W0akZ/Oh72aM+UnRb9hp+ZHzIGBHemMipkDHzCAOmWZlNuPGwqBscmMv2KWUj6Rk6b5qFoK4J1x0MjXCS/mKC3H8GsSlGhHZ6odMGEVPT5EkTQEf/ggPPPyUx0+TRv0fPh4793CxZrxo7CvpLAaoUXMH' + availability_zone_0: 'ZoneA' + virc_default_gateway: 127.0.0.1 + virc_domain: atttest.com + virc_dns1: 127.0.0.1 + management_net_name: SRE-Mgt + virc_management_dhcp: no + virc_management_default_route: yes + virc_management_ips: [ + '127.0.0.1', + '127.0.0.1', + '127.0.0.1', + '127.0.0.1'] + data_net_name: data + virc_data_ips: [ + '192.168.1.50', + '192.168.1.51', + '192.168.1.52', + '192.168.1.53'] + virc_data_dhcp: no + virc_data_default_route: no + signaling_net_name: signaling + virc_signaling_ips: [ + '127.0.0.1', + '127.0.0.1', + '127.0.0.1', + '127.0.0.1'] + virc_signaling_dhcp: no + virc_signaling_default_route: no + virc_sg_rules: [ + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "22", "port_range_max": "22", "ethertype": "IPv4" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "5060", "port_range_max": "5060", "ethertype": "IPv4" }, + { "remote_ip_prefix": "::/0", "protocol": "tcp", "port_range_min": "5060", "port_range_max": "5060", "ethertype": "IPv6" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "8080", "port_range_max": "8080", "ethertype": "IPv4" }, + { "remote_ip_prefix": "::/0", "protocol": "tcp", "port_range_min": "8080", "port_range_max": "8080", "ethertype": "IPv6" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "7113", "port_range_max": "7113", "ethertype": "IPv4" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "8113", "port_range_max": "8113", "ethertype": "IPv4" }] + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.yaml new file mode 100644 index 0000000000..7c1afa8ced --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/base_virc.yaml @@ -0,0 +1,143 @@ +heat_template_version: 2015-04-30 + +description: vIRC CC base template + +parameters: + vnf_id: + type: string + description: Unique ID for this VF instance + vnf_name: + type: string + description: Unique name for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF Module instance + vf_module_name: + type: string + description: Unique name for this VF Module instance + vm_roles: + type: comma_delimited_list + description: Unique roles for first group of instances + virc_names: + type: comma_delimited_list + description: List of names of vIRC CC instances in first availability zone + virc_image_name: + type: string + description: Image used for vIRC CC instances + virc_flavor_name: + type: string + description: Flavor of VM to use for vIRC CC instances + virc_ssh_public_key: + type: string + description: Public key for SSH access to vIRC CC instances + availability_zone_0: + type: string + description: First availability zone ID or name + management_net_name: + type: string + description: vIRC CC management network name + virc_management_dhcp: + type: string + description: For static IPs on management port, no. For DHCP assigned IPs, yes. + virc_management_ips: + type: comma_delimited_list + description: vIRC CC management network fixed ips for first availability zone if static + virc_management_netmask: + type: string + description: vIRC CC management netmask + virc_management_gateway: + type: string + description: vIRC CC management gateway + virc_management_default_route: + type: string + description: If management port is default route on OS, yes. If not, no. + data_net_name: + type: string + description: vIRC CC data network name + virc_data_dhcp: + type: string + description: For static IPs on data port, no. For DHCP assigned IPs, yes. + virc_data_ips: + type: comma_delimited_list + description: vIRC CC data network fixed ips for first availability zone if static + virc_data_netmask: + type: string + description: vIRC CC data netmask + virc_data_gateway: + type: string + description: vIRC CC data gateway + virc_data_default_route: + type: string + description: If data port is default route on OS, yes. If not, no. + signaling_net_name: + type: string + description: vIRC CC signaling network name + virc_signaling_dhcp: + type: string + description: For static IPs on data port, no. For DHCP assigned IPs, yes. + virc_signaling_ips: + type: comma_delimited_list + description: vIRC CC signaling network fixed ips for first availability zone if static + virc_signaling_netmask: + type: string + description: vIRC CC signaling netmask + virc_signaling_gateway: + type: string + description: vIRC CC signaling gateway + virc_signaling_default_route: + type: string + description: If signaling port is default route on OS, yes. If not, no. + num_instances: + type: number + description: Number of instances to deploy in first availability zone + constraints: + - range: { min: 0, max: 18} + virc_sg_rules: + type: json + description: vIRC CC security group rules + virc_domain: + type: string + description: Domain of the vIRC CC instances + virc_dns1: + type: string + description: First DNS nameserver for vIRC CC instances + virc_dns2: + type: string + description: Second DNS nameserver for vIRC CC instances + virc_default_gateway: + type: string + description: Default gateway for vIRC CC instances + virc_version: + type: string + description: vIRC CC deployment version + virc_environment: + type: string + description: vIRC CC deployment environment + virc_version_file: + type: string + description: vIRC CC version file name + +resources: + virc_keypair: + type: OS::Nova::KeyPair + properties: + name: + str_replace: + template: VNF_NAME_virc_keypair + params: + VNF_NAME: { get_param: vnf_name } + public_key: { get_param: virc_ssh_public_key } + save_private_key: false + + + virc_RSG: + type: OS::Neutron::SecurityGroup + properties: + name: + str_replace: + template: VNF_NAME_virc_sg + params: + VNF_NAME: { get_param: vnf_name } + rules: { get_param: virc_sg_rules } + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/nested_virc.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/nested_virc.yaml new file mode 100644 index 0000000000..f4e34188c0 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/nested_virc.yaml @@ -0,0 +1,207 @@ +heat_template_version: 2015-04-30 + +description: virc_nested + +parameters: + vnf_id: + type: string + description: Unique ID for this VF instance + vnf_name: + type: string + description: Unique name for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF Module instance + vf_module_name: + type: string + description: Unique name for this VF Module instance + vm_roles: + type: comma_delimited_list + description: Unique roles for this group of instances + virc_names: + type: comma_delimited_list + description: name of virc instances + virc_image_name: + type: string + description: name of virc image + virc_flavor_name: + type: string + description: flavor of instance to use + virc_keypair: + type: string + description: Key pair containing public SSH key for vIRC instances + availability_zone_0: + type: string + description: Availability zone used for this resource group + management_net_name: + type: string + description: virc management network name + virc_management_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_management_ips: + type: comma_delimited_list + description: virc management network fixed ips + virc_management_netmask: + type: string + description: virc management netmask + virc_management_gateway: + type: string + description: virc management gateway + virc_management_default_route: + type: string + description: yes if this default route is that of this nic + data_net_name: + type: string + description: virc data network name + virc_data_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_data_ips: + type: comma_delimited_list + description: virc data network fixed ips + virc_data_netmask: + type: string + description: virc data netmask + virc_data_gateway: + type: string + description: virc data gateway + virc_data_default_route: + type: string + description: yes if this default route is that of this nic + signaling_net_name: + type: string + description: virc signaling network name + virc_signaling_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_signaling_ips: + type: comma_delimited_list + description: virc signaling network fixed ips + virc_signaling_netmask: + type: string + description: virc signaling netmask + virc_signaling_gateway: + type: string + description: virc signaling gateway + virc_signaling_default_route: + type: string + description: yes if this default route is that of this nic + virc_sg: + type: string + description: virc security group + virc_domain: + type: string + description: domain of the virc instance + virc_dns1: + type: string + description: first dns nameserver for virc instance + virc_dns2: + type: string + description: second dns nameserver for virc instance + virc_default_gateway: + type: string + description: default gateway for VM + virc_version: + type: string + description: virc deployment version + virc_environment: + type: string + description: virc deployment environment + virc_version_file: + type: string + description: vIRC CC version file name + index_num: + type: number + description: Current index value of the resource group + constraints: + - range: { min: 0, max: 18 } + +resources: + virc_0: + type: OS::Nova::Server + properties: + name: {get_param: [virc_names, {get_param: index_num}]} + metadata: + vnf_id: { get_param: vnf_id } + vnf_name: { get_param: vnf_name } + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + vm_role: { get_param: [vm_roles, {get_param: index_num}]} + key_name: {get_param: virc_keypair} + image: {get_param: virc_image_name} + flavor: {get_param: virc_flavor_name} + availability_zone: {get_param: availability_zone_0} + networks: + - port: { get_resource: virc_management_0_port} + - port: { get_resource: virc_data_1_port} + - port: { get_resource: virc_signaling_2_port} + user_data_format: RAW + user_data: + str_replace: + template: {get_file: user_data.sh} + params: + __hostname__: {get_param: [virc_names, {get_param: index_num}]} + __domain__: {get_param: virc_domain} + __dns1__: {get_param: virc_dns1} + __dns2__: {get_param: virc_dns2} + __default_gateway__: {get_param: virc_default_gateway} + __port_mac_0__: {get_attr: [virc_management_0_port, mac_address]} + __port_ip_0__: {get_param: [virc_management_ips, {get_param: index_num}]} + __port_netmask_0__: {get_param: virc_management_netmask} + __port_gateway_0__: {get_param: virc_management_gateway} + __port_def_route_0__: {get_param: virc_management_default_route} + __port_dhcp_0__: {get_param: virc_management_dhcp} + __port_mac_1__: {get_attr: [virc_data_1_port, mac_address]} + __port_ip_1__: {get_param: [virc_data_ips, {get_param: index_num}]} + __port_netmask_1__: {get_param: virc_data_netmask} + __port_gateway_1__: {get_param: virc_data_gateway} + __port_def_route_1__: {get_param: virc_data_default_route} + __port_dhcp_1__: {get_param: virc_data_dhcp} + __port_ip6_1__: {get_param: [virc_data_ips, {get_param: index_num}]} + __port_mac_2__: {get_attr: [virc_signaling_2_port, mac_address]} + __port_ip_2__: {get_param: [virc_signaling_ips, {get_param: index_num}]} + __port_netmask_2__: {get_param: virc_signaling_netmask} + __port_gateway_2__: {get_param: virc_signaling_gateway} + __port_def_route_2__: {get_param: virc_signaling_default_route} + __port_dhcp_2__: {get_param: virc_signaling_dhcp} + __virc_environment__: {get_param: virc_environment} + __virc_version__: {get_param: virc_version} + __virc_version_file__: {get_param: virc_version_file} + + virc_management_0_port: + type: OS::Neutron::Port + properties: + network: { get_param: management_net_name } + fixed_ips: + - ip_address: { get_param: [virc_management_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_data_1_port: + type: OS::Neutron::Port + properties: + network: { get_param: data_net_name } + fixed_ips: + - ip_address: { get_param: [virc_data_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_signaling_2_port: + type: OS::Neutron::Port + properties: + network: { get_param: signaling_net_name } + fixed_ips: + - ip_address: { get_param: [virc_signaling_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_volume: + type: OS::Cinder::Volume + properties: +# name: {get_param: [virc_names, {get_param: index_num}]} + availability_zone: nova +# availability_zone: {get_param: availability_zone_0} + size: 1 + virc_volumeattachment: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: virc_0 } + volume_id: { get_resource: virc_volume } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/user_data.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/user_data.sh new file mode 100644 index 0000000000..1c808d4736 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/negative/user_data.sh @@ -0,0 +1,285 @@ +#!/bin/bash + +set -x +exec >> /root/user_data.out +exec 2>&1 + +MOUNT_POINT=${1:-'/opt/app/virc'} +LABEL=${2:-'VIRC_DATA'} +DESCRIPTION=${3:-'vIRC data volume'} + +TAG=VIRC_PROVISIONING + +DISK_ID=$(ls -1 /dev/disk/by-id | tail -n1) +DISK_NAME=$(readlink -f /dev/disk/by-id/${DISK_ID}) +FSTYPE=$(lsblk -o FSTYPE -n ${DISK_NAME}) +DISK_LABEL=$(lsblk -o LABEL -n ${DISK_NAME}) + +# Exit with message if not root +[[ $UID -ne 0 ]] && logger -t $TAG "Not root. Exiting." && exit 2 + +# Create filesystem if none +if [[ -z ${FSTYPE} ]] ; then + mkfs.xfs ${DISK_NAME} + if [[ $? -eq 0 ]] ; then + logger -t $TAG "Created xfs filesystem on $DISK_NAME." + else + logger -t $TAG "ERROR: Could not create xfs on $DISK_NAME. Exiting." + exit 90 + fi +fi +sleep 0.5 +DISK_UUID=$(lsblk -no UUID ${DISK_NAME}) + +# Create label if none +[[ -z ${DISK_LABEL} ]] && xfs_admin -L ${LABEL} ${DISK_NAME} + +# Create mount point if it does not exist +if [[ ! -d ${MOUNT_POINT} ]] ; then + mkdir -p ${MOUNT_POINT} + if [[ $? -eq 0 ]] ; then + logger -t $TAG "Created mount point at $MOUNT_POINT." + else + logger -t $TAG "ERROR: Could not create mount point at $MOUNT_POINT. Exiting" + exit 80 + fi +fi + +# Only add to /etc/fstab if not already there +grep -q ${DISK_UUID} /etc/fstab +if [[ $? -ne 0 ]] ; then + echo "# Following mount for ${DESCRIPTION}" >> /etc/fstab + echo "UUID=${DISK_UUID} ${MOUNT_POINT} xfs defaults 0 0" >> /etc/fstab + mount -a + mount_check_1=$? + mount | grep ${DISK_NAME} | grep ${MOUNT_POINT} + mount_check_2=$? + if [[ ${mount_check_1} -eq 0 ]] && [[ ${mount_check_2} -eq 0 ]]; then + logger -t $TAG "Successfully mounted $DISK_NAME at $MOUNT_POINT." + else + logger -t $TAG "ERROR: Could not mount $DISK_NAME at $MOUNT_POINT. Exiting." + exit 70 + fi +fi + +### +### Configure network +### + +hostname='__hostname__' +domain='__domain__' +dns1='__dns1__' +dns2='__dns2__' +default_gateway='__default_gateway__' + +# 1 disable, 0 enable +ipv6_enable=1 + +port_mac[0]='__port_mac_0__' +port_ip[0]='__port_ip_0__' +port_netmask[0]='__port_netmask_0__' +port_gateway[0]='__port_gateway_0__' +port_def_route[0]='__port_def_route_0__' +port_dhcp[0]='__port_dhcp_0__' + +port_mac[1]='__port_mac_1__' +port_ip[1]='__port_ip_1__' +port_netmask[1]='__port_netmask_1__' +port_gateway[1]='__port_gateway_1__' +port_def_route[1]='__port_def_route_1__' +port_dhcp[1]='__port_dhcp_1__' + +port_mac[2]='__port_mac_2__' +port_ip[2]='__port_ip_2__' +port_netmask[2]='__port_netmask_2__' +port_gateway[2]='__port_gateway_2__' +port_def_route[2]='__port_def_route_2__' +port_dhcp[2]='__port_dhcp_2__' + +# function to add underscore +add_underscore(){ + echo "__${1}__" +} + +# filenames +net_scripts=/etc/sysconfig/network-scripts + +# update network scripts with static ips and gateways +nic_count=($(ls -1d /sys/class/net/eth* | wc -l)) +for i in {0..2} ; do + if [[ ${port_mac[i]} != "__port_mac_${i}__" && \ + ( ${port_ip[i]} != "__port_ip_${i}__" || ${port_dhcp[i]} != "__port_dhcp_${i}__" ) ]] ; then + for (( j=0 ; j<${nic_count} ; j++ )) ; do + nic_mac=$(cat /sys/class/net/eth${j}/address) + if [[ ${port_mac[i]} == ${nic_mac} ]] ; then + echo "NAME=eth${j}" > ${net_scripts}/ifcfg-eth${j} + echo "DEVICE=eth${j}" >> ${net_scripts}/ifcfg-eth${j} + if [[ ${port_dhcp[i]} =~ (yes|Yes|True|true) ]] ; then + echo "BOOTPROTO=dhcp" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_ip[i]} != "__port_ip_${i}__" ]] && [[ ${port_ip[i]} =~ .*:.* ]] ; then + [[ ${ipv6_enable} -eq 1 ]] && ipv6_enable=0 + echo "BOOTPROTO=none" >> ${net_scripts}/ifcfg-eth${j} + echo "IPV6INIT=yes" >> ${net_scripts}/ifcfg-eth${j} + echo "IPV6ADDR=${port_ip[i]}" >> ${net_scripts}/ifcfg-eth${j} + if [[ ${port_gateway[i]} != "__port_gateway_${i}__" ]] ; then + echo "IPV6_DEFAULTGW=${port_gateway[i]}" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_gateway[i]} == $(add_underscore 'port_gateway_0') ]] && [[ ${default_gateway} != $(add_underscore 'default_gateway') ]] ; then + echo "IPV6_DEFAULTGW=${default_gateway}" >> ${net_scripts}/ifcfg-eth${j} + fi + elif [[ ${port_ip[i]} != "__port_ip_${i}__" ]] ; then + echo "BOOTPROTO=none" >> ${net_scripts}/ifcfg-eth${j} + echo "IPADDR=${port_ip[i]}" >> ${net_scripts}/ifcfg-eth${j} + # Set gateway if provided. If not set, set eth0 to default + if [[ ${port_gateway[i]} != "__port_gateway_${i}__" ]] ; then + echo "GATEWAY=${port_gateway[i]}" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_gateway[i]} == $(add_underscore 'port_gateway_0') ]] && [[ ${default_gateway} != $(add_underscore 'default_gateway') ]] ; then + echo "GATEWAY=${default_gateway}" >> ${net_scripts}/ifcfg-eth${j} + fi + # Set netmask if provided. Else set netmask to 255.255.255.0 + if [[ ${port_netmask[i]} != "__port_netmask_${i}__" ]] ; then + echo "NETMASK=${port_netmask[i]}" >> ${net_scripts}/ifcfg-eth${j} + else + echo 'NETMASK=255.255.255.0' >> ${net_scripts}/ifcfg-eth${j} + fi + fi + echo "ONBOOT=yes" >> ${net_scripts}/ifcfg-eth${j} + echo "HWADDR=${nic_mac}" >> ${net_scripts}/ifcfg-eth${j} + # Set to DEFROUTE to no, unless otherwise stated. If not stated set to yes on eth0 + if [[ ${port_def_route[i]} =~ (yes|Yes|True|true) ]] ; then + echo "DEFROUTE=yes" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_def_route[i]} == $(add_underscore 'port_def_route_0') ]] ; then + echo "DEFROUTE=yes" >> ${net_scripts}/ifcfg-eth${j} + else + echo "DEFROUTE=no" >> ${net_scripts}/ifcfg-eth${j} + fi + fi + done + fi +done + +# Set DNS +if [[ ${dns1} != $(add_underscore 'dns1') ]] ; then + echo "PEERDNS=yes" >> ${net_scripts}/ifcfg-eth0 + echo "DNS1=${dns1}" >> ${net_scripts}/ifcfg-eth0 + [[ ${dns2} != $(add_underscore 'dns2') ]] && echo "DNS2=${dns2}" >> ${net_scripts}/ifcfg-eth0 +fi +# Set default gateway +[[ ${default_gateway} != $(add_underscore 'default_gateway') ]] && echo GATEWAY=${default_gateway} >> ${net_scripts}/ifcfg-eth0 +# Set domain +if [[ ${domain} != $(add_underscore 'domain') ]] ; then + echo DOMAIN=${domain} >> ${net_scripts}/ifcfg-eth0 + echo kernel.domainname=${domain} >> /etc/sysctl.conf + sysctl -p +fi +# Set hostname +if [[ ${hostname} != $(add_underscore 'hostname') ]] ; then + hostnamectl set-hostname ${hostname} + sed -i "s/\(^127\.0\.0\.1 .*\)/\1 ${hostname}/" /etc/hosts + sed -i "s/\(^::1 .*\)/\1 ${hostname}/" /etc/hosts + sed -i "s/\(^127\.0\.0\.1 .*\)/\1 ${hostname}.${domain}/" /etc/hosts + sed -i "s/\(^::1 .*\)/\1 ${hostname}.${domain}/" /etc/hosts +fi + +# Enable ipv6 if there is an ipv6 address supplied in env +if [[ ${ipv6_enable} -eq 0 ]] ; then + echo net.ipv6.conf.all.disable_ipv6 = 0 >> /etc/sysctl.conf + echo net.ipv6.conf.default.disable_ipv6 = 0 >> /etc/sysctl.conf + echo net.ipv6.conf.lo.disable_ipv6 = 0 >> /etc/sysctl.conf + sysctl -p +fi + +service network restart + +## Disable Password Login for MechID group +echo "Match Group mechid" >> /etc/ssh/sshd_config +echo -e "\tPasswordAuthentication no" >> /etc/ssh/sshd_config +systemctl restart sshd + +### +# Install SWM +### + +## SWM variables +virc_cc_environment='__virc_cc_environment__' +virc_cc_version='__virc_cc_version__' +virc_cc_version_file='__virc_cc_version_file__' + + +## Add MechID user +mechid_user_name=$(grep 'SWM_AUTOUSER=' /tmp/input.env | cut -f 2 -d '=') +useradd -g mechid -p 'pahfhrkSZmUs.' ${mechid_user_name} + +### Workaround ### REMOVE WHEN BUG FIXED ### +#mkdir -p /etc/chef/trusted_certs/ + +# Get packages to install from input.env, then delete from input.env +. /tmp/input.env +swm_install_pkgs=(${SWM_INIT_PACKAGES}) +swm_install_pkg_deps=(${SWM_INIT_PACKAGE_DEPS}) +sed -i '/SWM_INIT_PACKAGES="/,/\"/d' /tmp/input.env + +./platform-init-1.5.5.sh /tmp/input.env + +## Install SWM packages after SWM installation +export AFTSWM_USERNAME=${mechid_user_name} +mechid_user_enc_passwd=$(grep 'SWM_AUTOCRED=' /tmp/input.env | cut -f 2 -d '=') +export AFTSWM_PASSWORD=${mechid_user_enc_passwd} +export HOSTNAME=$(hostname) +#export HOME=/root + +#/opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${swm_install_pkgs} -n $(hostname).$(domainname) -w -fi -fs +#sleep 5 +#cd +echo $SHELL +whoami +env +pwd + +# install swm packages one at a time +for package in ${swm_install_pkg_deps[@]} ; do + /opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${package} -n $(hostname).$(domainname) -w -fi +done + +for package in ${swm_install_pkgs[@]} ; do + /opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${package} -n $(hostname).$(domainname) -w -fi +done + +### Run Chef Prep Scripts ### +USER=${mechid_user_name} +COOKBOOK_NAME='virc_cc' +VERSION=${virc_cc_version} +ENV=${virc_cc_environment} +VERSION_FILE=${virc_cc_version_file} + +COOKBOOK_VERSION="" + +for v in $(echo ${VERSION} | tr "." "\n") +do + if [ "$v" -ge 0 -a "$v" -le 9 ]; then + COOKBOOK_VERSION=${COOKBOOK_VERSION}0$v + else + COOKBOOK_VERSION=${COOKBOOK_VERSION}$v + fi +done + +COOKBOOK_VERSION="${COOKBOOK_VERSION:0:4}.1${COOKBOOK_VERSION:4:4}.1${COOKBOOK_VERSION:8:4}" + +#cd /home/$USER/chef-repo +mkdir -p /home/$USER/scripts/$ENV +chown -R ${mechid_user_name}:mechid /home/$USER + +chef_config_path="/home/${mechid_user_name}/chef-repo/.chef/knife.rb" + +su - -c "/usr/bin/knife client delete $(hostname).$(domainname) -y -c ${chef_config_path}" ${mechid_user_name} +su - -c "/usr/bin/knife node delete $(hostname).$(domainname) -y -c ${chef_config_path}" ${mechid_user_name} + +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files Pyswm.py -c ${chef_config_path} > /home/${mechid_user_name}/scripts/$ENV/Pyswm.py" ${mechid_user_name} +#/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files Pyswm.pyc > /home/$USER/scripts/$ENV/Pyswm.pyc +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files install_swm.py -c ${chef_config_path} > /home/$USER/scripts/$ENV/install_swm.py" ${mechid_user_name} +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files swm-installer-config.json -c ${chef_config_path} > /home/$USER/scripts/$ENV/swm-installer-config.json" ${mechid_user_name} + +#cd /home/$USER/scripts/$ENV +su - -c "chmod 755 /home/$USER/scripts/$ENV/install_swm.py" ${mechid_user_name} +su - -c "cd /home/$USER/scripts/$ENV; ./install_swm.py $VERSION $ENV --components-nodes=\"vIRC-cc:$(hostname).$(domainname)\" --version-file=${VERSION_FILE}" ${mechid_user_name} +#./install_swm.py $VERSION $ENV --components-nodes="<<<ComponentName.FQDN>>>" + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/MANIFEST.json new file mode 100644 index 0000000000..31d26cce5a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/MANIFEST.json @@ -0,0 +1,26 @@ +{ + "name": "virc", + "description": "", + "data": [ + { + "file": "base_virc.yaml", + "type": "HEAT", + "isBase": "true", + "data": [ + { + "file": "base_virc.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "nested_virc.yaml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "user_data.sh", + "type": "SHELL" + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.env new file mode 100644 index 0000000000..617084511c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.env @@ -0,0 +1,59 @@ +parameters: + virc_environment: 'CI-VIRC' + virc_version: '1609.0.0.0.64' + virc_version_file: 'version-VIRC_Cloud.json' + vnf_id: vnf_id_placeholder + vnf_name: 'ircc001v' + vf_module_id: vf_module_id_placeholder + vf_module_name: vf_module_name_placeholder + vm_roles: [ + 'vm_role_placeholder_0', + 'vm_role_placeholder_1', + 'vm_role_placeholder_2', + 'vm_role_placeholder_3'] + num_instances: 4 + virc_names: [ + 'irpr0001vm001pfe001p1n004v001', + 'irpr0001vm002pbe001p1n004v001', + 'irpr0001vm003mdb001p1n004v001', + 'irpr0001vm004mdb001p1n004v001'] + virc_image_name: rhel7-with-openecomp-tools + virc_flavor_name: m1.large + virc_ssh_public_key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9/ngAeNYJe8p8RvPQC4NSRu1VyWimhMx+6Q0LgD1n/UeTN+Ppn1NA0/CQDR+nX0vOMkfwkw43y3qi1kDfHSNKebxVUix1nyqXUq9n8kjhu+dsKXqiClL2B36XvsrXfkA6SRG8jsWiBgkR+hvcewjqk2pLigdi233F69GHdqKsRJOS4246/VTdXyFZX5V3W0akZ/Oh72aM+UnRb9hp+ZHzIGBHemMipkDHzCAOmWZlNuPGwqBscmMv2KWUj6Rk6b5qFoK4J1x0MjXCS/mKC3H8GsSlGhHZ6odMGEVPT5EkTQEf/ggPPPyUx0+TRv0fPh4793CxZrxo7CvpLAaoUXMH' + availability_zone_0: 'ZoneA' + virc_default_gateway: 127.0.0.1 + virc_domain: atttest.com + virc_dns1: 127.0.0.1 + management_net_name: SRE-Mgt + virc_management_dhcp: no + virc_management_default_route: yes + virc_management_ips: [ + '127.0.0.1', + '127.0.0.1', + '127.0.0.1', + '127.0.0.1'] + data_net_name: data + virc_data_ips: [ + '192.168.1.50', + '192.168.1.51', + '192.168.1.52', + '192.168.1.53'] + virc_data_dhcp: no + virc_data_default_route: no + signaling_net_name: signaling + virc_signaling_ips: [ + '127.0.0.1', + '127.0.0.1', + '127.0.0.1', + '127.0.0.1'] + virc_signaling_dhcp: no + virc_signaling_default_route: no + virc_sg_rules: [ + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "22", "port_range_max": "22", "ethertype": "IPv4" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "5060", "port_range_max": "5060", "ethertype": "IPv4" }, + { "remote_ip_prefix": "::/0", "protocol": "tcp", "port_range_min": "5060", "port_range_max": "5060", "ethertype": "IPv6" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "8080", "port_range_max": "8080", "ethertype": "IPv4" }, + { "remote_ip_prefix": "::/0", "protocol": "tcp", "port_range_min": "8080", "port_range_max": "8080", "ethertype": "IPv6" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "7113", "port_range_max": "7113", "ethertype": "IPv4" }, + { "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "port_range_min": "8113", "port_range_max": "8113", "ethertype": "IPv4" }] + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.yaml new file mode 100644 index 0000000000..e0e8df50fc --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/base_virc.yaml @@ -0,0 +1,188 @@ +heat_template_version: 2015-04-30 + +description: vIRC CC base template + +parameters: + vnf_id: + type: string + description: Unique ID for this VF instance + vnf_name: + type: string + description: Unique name for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF Module instance + vf_module_name: + type: string + description: Unique name for this VF Module instance + vm_roles: + type: comma_delimited_list + description: Unique roles for first group of instances + virc_names: + type: comma_delimited_list + description: List of names of vIRC CC instances in first availability zone + virc_image_name: + type: string + description: Image used for vIRC CC instances + virc_flavor_name: + type: string + description: Flavor of VM to use for vIRC CC instances + virc_ssh_public_key: + type: string + description: Public key for SSH access to vIRC CC instances + availability_zone_0: + type: string + description: First availability zone ID or name + management_net_name: + type: string + description: vIRC CC management network name + virc_management_dhcp: + type: string + description: For static IPs on management port, no. For DHCP assigned IPs, yes. + virc_management_ips: + type: comma_delimited_list + description: vIRC CC management network fixed ips for first availability zone if static + virc_management_netmask: + type: string + description: vIRC CC management netmask + virc_management_gateway: + type: string + description: vIRC CC management gateway + virc_management_default_route: + type: string + description: If management port is default route on OS, yes. If not, no. + data_net_name: + type: string + description: vIRC CC data network name + virc_data_dhcp: + type: string + description: For static IPs on data port, no. For DHCP assigned IPs, yes. + virc_data_ips: + type: comma_delimited_list + description: vIRC CC data network fixed ips for first availability zone if static + virc_data_netmask: + type: string + description: vIRC CC data netmask + virc_data_gateway: + type: string + description: vIRC CC data gateway + virc_data_default_route: + type: string + description: If data port is default route on OS, yes. If not, no. + signaling_net_name: + type: string + description: vIRC CC signaling network name + virc_signaling_dhcp: + type: string + description: For static IPs on data port, no. For DHCP assigned IPs, yes. + virc_signaling_ips: + type: comma_delimited_list + description: vIRC CC signaling network fixed ips for first availability zone if static + virc_signaling_netmask: + type: string + description: vIRC CC signaling netmask + virc_signaling_gateway: + type: string + description: vIRC CC signaling gateway + virc_signaling_default_route: + type: string + description: If signaling port is default route on OS, yes. If not, no. + num_instances: + type: number + description: Number of instances to deploy in first availability zone + constraints: + - range: { min: 0, max: 18} + virc_sg_rules: + type: json + description: vIRC CC security group rules + virc_domain: + type: string + description: Domain of the vIRC CC instances + virc_dns1: + type: string + description: First DNS nameserver for vIRC CC instances + virc_dns2: + type: string + description: Second DNS nameserver for vIRC CC instances + virc_default_gateway: + type: string + description: Default gateway for vIRC CC instances + virc_version: + type: string + description: vIRC CC deployment version + virc_environment: + type: string + description: vIRC CC deployment environment + virc_version_file: + type: string + description: vIRC CC version file name + +resources: + virc_keypair: + type: OS::Nova::KeyPair + properties: + name: + str_replace: + template: VNF_NAME_virc_keypair + params: + VNF_NAME: { get_param: vnf_name } + public_key: { get_param: virc_ssh_public_key } + save_private_key: false + + virc_RSG: + type: OS::Neutron::SecurityGroup + properties: + name: + str_replace: + template: VNF_NAME_virc_sg + params: + VNF_NAME: { get_param: vnf_name } + rules: { get_param: virc_sg_rules } + + virc_RRG_0: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + index_var: server_count + resource_def: + type: nested_virc.yaml + properties: + vnf_id: { get_param: vnf_id } + vnf_name: { get_param: vnf_name } + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + vm_roles: { get_param: vm_roles } + virc_environment: { get_param: virc_environment } + virc_version: { get_param: virc_version } + virc_version_file: { get_param: virc_version_file } + virc_names: { get_param: virc_names } + virc_image_name: { get_param: virc_image_name } + virc_flavor_name: { get_param: virc_flavor_name } + availability_zone_0: { get_param: availability_zone_0 } + virc_keypair: { get_resource: virc_keypair } + management_net_name: { get_param: management_net_name } + virc_management_dhcp: { get_param: virc_management_dhcp } + virc_management_ips: { get_param: virc_management_ips } + virc_management_netmask: { get_param: virc_management_netmask } + virc_management_gateway: { get_param: virc_management_gateway } + virc_management_default_route: { get_param: virc_management_default_route } + data_net_name: { get_param: data_net_name } + virc_data_dhcp: { get_param: virc_data_dhcp } + virc_data_ips: { get_param: virc_data_ips } + virc_data_netmask: { get_param: virc_data_netmask } + virc_data_gateway: { get_param: virc_data_gateway } + virc_data_default_route: { get_param: virc_data_default_route } + signaling_net_name: { get_param: signaling_net_name } + virc_signaling_ips: { get_param: virc_signaling_ips } + virc_signaling_dhcp: { get_param: virc_signaling_dhcp } + virc_signaling_netmask: { get_param: virc_signaling_netmask } + virc_signaling_gateway: { get_param: virc_signaling_gateway } + virc_signaling_default_route: { get_param: virc_signaling_default_route } + virc_domain: { get_param: virc_domain } + virc_dns1: { get_param: virc_dns1 } + virc_dns2: { get_param: virc_dns2 } + virc_default_gateway: { get_param: virc_default_gateway } + virc_sg: { get_resource: virc_RSG } + index_num: server_count + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/nested_virc.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/nested_virc.yaml new file mode 100644 index 0000000000..f4e34188c0 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/nested_virc.yaml @@ -0,0 +1,207 @@ +heat_template_version: 2015-04-30 + +description: virc_nested + +parameters: + vnf_id: + type: string + description: Unique ID for this VF instance + vnf_name: + type: string + description: Unique name for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF Module instance + vf_module_name: + type: string + description: Unique name for this VF Module instance + vm_roles: + type: comma_delimited_list + description: Unique roles for this group of instances + virc_names: + type: comma_delimited_list + description: name of virc instances + virc_image_name: + type: string + description: name of virc image + virc_flavor_name: + type: string + description: flavor of instance to use + virc_keypair: + type: string + description: Key pair containing public SSH key for vIRC instances + availability_zone_0: + type: string + description: Availability zone used for this resource group + management_net_name: + type: string + description: virc management network name + virc_management_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_management_ips: + type: comma_delimited_list + description: virc management network fixed ips + virc_management_netmask: + type: string + description: virc management netmask + virc_management_gateway: + type: string + description: virc management gateway + virc_management_default_route: + type: string + description: yes if this default route is that of this nic + data_net_name: + type: string + description: virc data network name + virc_data_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_data_ips: + type: comma_delimited_list + description: virc data network fixed ips + virc_data_netmask: + type: string + description: virc data netmask + virc_data_gateway: + type: string + description: virc data gateway + virc_data_default_route: + type: string + description: yes if this default route is that of this nic + signaling_net_name: + type: string + description: virc signaling network name + virc_signaling_dhcp: + type: string + description: yes if port configured by dhcp, otherwise no + virc_signaling_ips: + type: comma_delimited_list + description: virc signaling network fixed ips + virc_signaling_netmask: + type: string + description: virc signaling netmask + virc_signaling_gateway: + type: string + description: virc signaling gateway + virc_signaling_default_route: + type: string + description: yes if this default route is that of this nic + virc_sg: + type: string + description: virc security group + virc_domain: + type: string + description: domain of the virc instance + virc_dns1: + type: string + description: first dns nameserver for virc instance + virc_dns2: + type: string + description: second dns nameserver for virc instance + virc_default_gateway: + type: string + description: default gateway for VM + virc_version: + type: string + description: virc deployment version + virc_environment: + type: string + description: virc deployment environment + virc_version_file: + type: string + description: vIRC CC version file name + index_num: + type: number + description: Current index value of the resource group + constraints: + - range: { min: 0, max: 18 } + +resources: + virc_0: + type: OS::Nova::Server + properties: + name: {get_param: [virc_names, {get_param: index_num}]} + metadata: + vnf_id: { get_param: vnf_id } + vnf_name: { get_param: vnf_name } + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + vm_role: { get_param: [vm_roles, {get_param: index_num}]} + key_name: {get_param: virc_keypair} + image: {get_param: virc_image_name} + flavor: {get_param: virc_flavor_name} + availability_zone: {get_param: availability_zone_0} + networks: + - port: { get_resource: virc_management_0_port} + - port: { get_resource: virc_data_1_port} + - port: { get_resource: virc_signaling_2_port} + user_data_format: RAW + user_data: + str_replace: + template: {get_file: user_data.sh} + params: + __hostname__: {get_param: [virc_names, {get_param: index_num}]} + __domain__: {get_param: virc_domain} + __dns1__: {get_param: virc_dns1} + __dns2__: {get_param: virc_dns2} + __default_gateway__: {get_param: virc_default_gateway} + __port_mac_0__: {get_attr: [virc_management_0_port, mac_address]} + __port_ip_0__: {get_param: [virc_management_ips, {get_param: index_num}]} + __port_netmask_0__: {get_param: virc_management_netmask} + __port_gateway_0__: {get_param: virc_management_gateway} + __port_def_route_0__: {get_param: virc_management_default_route} + __port_dhcp_0__: {get_param: virc_management_dhcp} + __port_mac_1__: {get_attr: [virc_data_1_port, mac_address]} + __port_ip_1__: {get_param: [virc_data_ips, {get_param: index_num}]} + __port_netmask_1__: {get_param: virc_data_netmask} + __port_gateway_1__: {get_param: virc_data_gateway} + __port_def_route_1__: {get_param: virc_data_default_route} + __port_dhcp_1__: {get_param: virc_data_dhcp} + __port_ip6_1__: {get_param: [virc_data_ips, {get_param: index_num}]} + __port_mac_2__: {get_attr: [virc_signaling_2_port, mac_address]} + __port_ip_2__: {get_param: [virc_signaling_ips, {get_param: index_num}]} + __port_netmask_2__: {get_param: virc_signaling_netmask} + __port_gateway_2__: {get_param: virc_signaling_gateway} + __port_def_route_2__: {get_param: virc_signaling_default_route} + __port_dhcp_2__: {get_param: virc_signaling_dhcp} + __virc_environment__: {get_param: virc_environment} + __virc_version__: {get_param: virc_version} + __virc_version_file__: {get_param: virc_version_file} + + virc_management_0_port: + type: OS::Neutron::Port + properties: + network: { get_param: management_net_name } + fixed_ips: + - ip_address: { get_param: [virc_management_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_data_1_port: + type: OS::Neutron::Port + properties: + network: { get_param: data_net_name } + fixed_ips: + - ip_address: { get_param: [virc_data_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_signaling_2_port: + type: OS::Neutron::Port + properties: + network: { get_param: signaling_net_name } + fixed_ips: + - ip_address: { get_param: [virc_signaling_ips, {get_param: index_num}]} + security_groups: + - { get_param: virc_sg } + virc_volume: + type: OS::Cinder::Volume + properties: +# name: {get_param: [virc_names, {get_param: index_num}]} + availability_zone: nova +# availability_zone: {get_param: availability_zone_0} + size: 1 + virc_volumeattachment: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: virc_0 } + volume_id: { get_resource: virc_volume } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/user_data.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/user_data.sh new file mode 100644 index 0000000000..6510c728e8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/baseHeatExposeResourceUsingGetResource/positive/user_data.sh @@ -0,0 +1,292 @@ +#!/bin/bash + +set -x +exec >> /root/user_data.out +exec 2>&1 + +MOUNT_POINT=${1:-'/opt/app/virc'} +LABEL=${2:-'VIRC_DATA'} +DESCRIPTION=${3:-'vIRC data volume'} + +TAG=VIRC_PROVISIONING + +DISK_ID=$(ls -1 /dev/disk/by-id | tail -n1) +DISK_NAME=$(readlink -f /dev/disk/by-id/${DISK_ID}) +FSTYPE=$(lsblk -o FSTYPE -n ${DISK_NAME}) +DISK_LABEL=$(lsblk -o LABEL -n ${DISK_NAME}) + +# Exit with message if not root +[[ $UID -ne 0 ]] && logger -t $TAG "Not root. Exiting." && exit 2 + +# Create filesystem if none +if [[ -z ${FSTYPE} ]] ; then + mkfs.xfs ${DISK_NAME} + if [[ $? -eq 0 ]] ; then + logger -t $TAG "Created xfs filesystem on $DISK_NAME." + else + logger -t $TAG "ERROR: Could not create xfs on $DISK_NAME. Exiting." + exit 90 + fi +fi +sleep 0.5 +DISK_UUID=$(lsblk -no UUID ${DISK_NAME}) + +# Create label if none +[[ -z ${DISK_LABEL} ]] && xfs_admin -L ${LABEL} ${DISK_NAME} + +# Create mount point if it does not exist +if [[ ! -d ${MOUNT_POINT} ]] ; then + mkdir -p ${MOUNT_POINT} + if [[ $? -eq 0 ]] ; then + logger -t $TAG "Created mount point at $MOUNT_POINT." + else + logger -t $TAG "ERROR: Could not create mount point at $MOUNT_POINT. Exiting" + exit 80 + fi +fi + +# Only add to /etc/fstab if not already there +grep -q ${DISK_UUID} /etc/fstab +if [[ $? -ne 0 ]] ; then + echo "# Following mount for ${DESCRIPTION}" >> /etc/fstab + echo "UUID=${DISK_UUID} ${MOUNT_POINT} xfs defaults 0 0" >> /etc/fstab + mount -a + mount_check_1=$? + mount | grep ${DISK_NAME} | grep ${MOUNT_POINT} + mount_check_2=$? + if [[ ${mount_check_1} -eq 0 ]] && [[ ${mount_check_2} -eq 0 ]]; then + logger -t $TAG "Successfully mounted $DISK_NAME at $MOUNT_POINT." + else + logger -t $TAG "ERROR: Could not mount $DISK_NAME at $MOUNT_POINT. Exiting." + exit 70 + fi +fi + +### +### Configure network +### + +hostname='__hostname__' +domain='__domain__' +dns1='__dns1__' +dns2='__dns2__' +default_gateway='__default_gateway__' + +# 1 disable, 0 enable +ipv6_enable=1 + +port_mac[0]='__port_mac_0__' +port_ip[0]='__port_ip_0__' +port_netmask[0]='__port_netmask_0__' +port_gateway[0]='__port_gateway_0__' +port_def_route[0]='__port_def_route_0__' +port_dhcp[0]='__port_dhcp_0__' + +port_mac[1]='__port_mac_1__' +port_ip[1]='__port_ip_1__' +port_netmask[1]='__port_netmask_1__' +port_gateway[1]='__port_gateway_1__' +port_def_route[1]='__port_def_route_1__' +port_dhcp[1]='__port_dhcp_1__' + +port_mac[2]='__port_mac_2__' +port_ip[2]='__port_ip_2__' +port_netmask[2]='__port_netmask_2__' +port_gateway[2]='__port_gateway_2__' +port_def_route[2]='__port_def_route_2__' +port_dhcp[2]='__port_dhcp_2__' + +# function to add underscore +add_underscore(){ + echo "__${1}__" +} + +# filenames +net_scripts=/etc/sysconfig/network-scripts + +# update network scripts with static ips and gateways +nic_count=($(ls -1d /sys/class/net/eth* | wc -l)) +for i in {0..2} ; do + if [[ ${port_mac[i]} != "__port_mac_${i}__" && \ + ( ${port_ip[i]} != "__port_ip_${i}__" || ${port_dhcp[i]} != "__port_dhcp_${i}__" ) ]] ; then + for (( j=0 ; j<${nic_count} ; j++ )) ; do + nic_mac=$(cat /sys/class/net/eth${j}/address) + if [[ ${port_mac[i]} == ${nic_mac} ]] ; then + echo "NAME=eth${j}" > ${net_scripts}/ifcfg-eth${j} + echo "DEVICE=eth${j}" >> ${net_scripts}/ifcfg-eth${j} + if [[ ${port_dhcp[i]} =~ (yes|Yes|True|true) ]] ; then + echo "BOOTPROTO=dhcp" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_ip[i]} != "__port_ip_${i}__" ]] && [[ ${port_ip[i]} =~ .*:.* ]] ; then + [[ ${ipv6_enable} -eq 1 ]] && ipv6_enable=0 + echo "BOOTPROTO=none" >> ${net_scripts}/ifcfg-eth${j} + echo "IPV6INIT=yes" >> ${net_scripts}/ifcfg-eth${j} + echo "IPV6ADDR=${port_ip[i]}" >> ${net_scripts}/ifcfg-eth${j} + if [[ ${port_gateway[i]} != "__port_gateway_${i}__" ]] ; then + echo "IPV6_DEFAULTGW=${port_gateway[i]}" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_gateway[i]} == $(add_underscore 'port_gateway_0') ]] && [[ ${default_gateway} != $(add_underscore 'default_gateway') ]] ; then + echo "IPV6_DEFAULTGW=${default_gateway}" >> ${net_scripts}/ifcfg-eth${j} + fi + elif [[ ${port_ip[i]} != "__port_ip_${i}__" ]] ; then + echo "BOOTPROTO=none" >> ${net_scripts}/ifcfg-eth${j} + echo "IPADDR=${port_ip[i]}" >> ${net_scripts}/ifcfg-eth${j} + # Set gateway if provided. If not set, set eth0 to default + if [[ ${port_gateway[i]} != "__port_gateway_${i}__" ]] ; then + echo "GATEWAY=${port_gateway[i]}" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_gateway[i]} == $(add_underscore 'port_gateway_0') ]] && [[ ${default_gateway} != $(add_underscore 'default_gateway') ]] ; then + echo "GATEWAY=${default_gateway}" >> ${net_scripts}/ifcfg-eth${j} + fi + # Set netmask if provided. Else set netmask to 255.255.255.0 + if [[ ${port_netmask[i]} != "__port_netmask_${i}__" ]] ; then + echo "NETMASK=${port_netmask[i]}" >> ${net_scripts}/ifcfg-eth${j} + else + echo 'NETMASK=255.255.255.0' >> ${net_scripts}/ifcfg-eth${j} + fi + fi + echo "ONBOOT=yes" >> ${net_scripts}/ifcfg-eth${j} + echo "HWADDR=${nic_mac}" >> ${net_scripts}/ifcfg-eth${j} + # Set to DEFROUTE to no, unless otherwise stated. If not stated set to yes on eth0 + if [[ ${port_def_route[i]} =~ (yes|Yes|True|true) ]] ; then + echo "DEFROUTE=yes" >> ${net_scripts}/ifcfg-eth${j} + elif [[ ${port_def_route[i]} == $(add_underscore 'port_def_route_0') ]] ; then + echo "DEFROUTE=yes" >> ${net_scripts}/ifcfg-eth${j} + else + echo "DEFROUTE=no" >> ${net_scripts}/ifcfg-eth${j} + fi + fi + done + fi +done + +# Set DNS +if [[ ${dns1} != $(add_underscore 'dns1') ]] ; then + echo "PEERDNS=yes" >> ${net_scripts}/ifcfg-eth0 + echo "DNS1=${dns1}" >> ${net_scripts}/ifcfg-eth0 + [[ ${dns2} != $(add_underscore 'dns2') ]] && echo "DNS2=${dns2}" >> ${net_scripts}/ifcfg-eth0 +fi +# Set default gateway +[[ ${default_gateway} != $(add_underscore 'default_gateway') ]] && echo GATEWAY=${default_gateway} >> ${net_scripts}/ifcfg-eth0 +# Set domain +if [[ ${domain} != $(add_underscore 'domain') ]] ; then + echo DOMAIN=${domain} >> ${net_scripts}/ifcfg-eth0 + echo kernel.domainname=${domain} >> /etc/sysctl.conf + sysctl -p +fi +# Set hostname +if [[ ${hostname} != $(add_underscore 'hostname') ]] ; then + hostnamectl set-hostname ${hostname} + sed -i "s/\(^127\.0\.0\.1 .*\)/\1 ${hostname}/" /etc/hosts + sed -i "s/\(^::1 .*\)/\1 ${hostname}/" /etc/hosts + sed -i "s/\(^127\.0\.0\.1 .*\)/\1 ${hostname}.${domain}/" /etc/hosts + sed -i "s/\(^::1 .*\)/\1 ${hostname}.${domain}/" /etc/hosts +fi + +# Enable ipv6 if there is an ipv6 address supplied in env +if [[ ${ipv6_enable} -eq 0 ]] ; then + echo net.ipv6.conf.all.disable_ipv6 = 0 >> /etc/sysctl.conf + echo net.ipv6.conf.default.disable_ipv6 = 0 >> /etc/sysctl.conf + echo net.ipv6.conf.lo.disable_ipv6 = 0 >> /etc/sysctl.conf + sysctl -p +fi + +service network restart + +## Disable Password Login for MechID group +echo "Match Group mechid" >> /etc/ssh/sshd_config +echo -e "\tPasswordAuthentication no" >> /etc/ssh/sshd_config +systemctl restart sshd + +### +# Install SWM +### + +## SWM variables +virc_cc_environment='__virc_cc_environment__' +virc_cc_version='__virc_cc_version__' +virc_cc_version_file='__virc_cc_version_file__' + +cd /tmp +wget 'https://codecloud.web.att.com/projects/ST_VIRC/repos/virc/browse/SWM/Install/input.env?raw' -O input.env +wget 'https://codecloud.web.att.com/projects/ST_VIRC/repos/virc/browse/SWM/Install/platform-init-1.5.5.sh?raw' -O platform-init-1.5.5.sh +wget 'https://codecloud.web.att.com/projects/ST_VIRC/repos/virc/browse/SWM/Install/hostname.props?raw' -O $(hostname).props +sed -i "s/$(add_underscore 'virc_environment')/${virc_environment}/g" $(hostname).props +sed -i "s/$(add_underscore 'virc_version')/${virc_version}/g" input.env +chmod +x platform-init-1.5.5.sh + +## Add MechID user +mechid_user_name=$(grep 'SWM_AUTOUSER=' /tmp/input.env | cut -f 2 -d '=') +useradd -g mechid -p 'pahfhrkSZmUs.' ${mechid_user_name} + +### Workaround ### REMOVE WHEN BUG FIXED ### +#mkdir -p /etc/chef/trusted_certs/ + +# Get packages to install from input.env, then delete from input.env +. /tmp/input.env +swm_install_pkgs=(${SWM_INIT_PACKAGES}) +swm_install_pkg_deps=(${SWM_INIT_PACKAGE_DEPS}) +sed -i '/SWM_INIT_PACKAGES="/,/\"/d' /tmp/input.env + +./platform-init-1.5.5.sh /tmp/input.env + +## Install SWM packages after SWM installation +export AFTSWM_USERNAME=${mechid_user_name} +mechid_user_enc_passwd=$(grep 'SWM_AUTOCRED=' /tmp/input.env | cut -f 2 -d '=') +export AFTSWM_PASSWORD=${mechid_user_enc_passwd} +export HOSTNAME=$(hostname) +#export HOME=/root + +#/opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${swm_install_pkgs} -n $(hostname).$(domainname) -w -fi -fs +#sleep 5 +#cd +echo $SHELL +whoami +env +pwd + +# install swm packages one at a time +for package in ${swm_install_pkg_deps[@]} ; do + /opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${package} -n $(hostname).$(domainname) -w -fi +done + +for package in ${swm_install_pkgs[@]} ; do + /opt/app/aft/aftswmcli/bin/swmcli component pkginstall -c ${package} -n $(hostname).$(domainname) -w -fi +done + +### Run Chef Prep Scripts ### +USER=${mechid_user_name} +COOKBOOK_NAME='virc_cc' +VERSION=${virc_cc_version} +ENV=${virc_cc_environment} +VERSION_FILE=${virc_cc_version_file} + +COOKBOOK_VERSION="" + +for v in $(echo ${VERSION} | tr "." "\n") +do + if [ "$v" -ge 0 -a "$v" -le 9 ]; then + COOKBOOK_VERSION=${COOKBOOK_VERSION}0$v + else + COOKBOOK_VERSION=${COOKBOOK_VERSION}$v + fi +done + +COOKBOOK_VERSION="${COOKBOOK_VERSION:0:4}.1${COOKBOOK_VERSION:4:4}.1${COOKBOOK_VERSION:8:4}" + +#cd /home/$USER/chef-repo +mkdir -p /home/$USER/scripts/$ENV +chown -R ${mechid_user_name}:mechid /home/$USER + +chef_config_path="/home/${mechid_user_name}/chef-repo/.chef/knife.rb" + +su - -c "/usr/bin/knife client delete $(hostname).$(domainname) -y -c ${chef_config_path}" ${mechid_user_name} +su - -c "/usr/bin/knife node delete $(hostname).$(domainname) -y -c ${chef_config_path}" ${mechid_user_name} + +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files Pyswm.py -c ${chef_config_path} > /home/${mechid_user_name}/scripts/$ENV/Pyswm.py" ${mechid_user_name} +#/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files Pyswm.pyc > /home/$USER/scripts/$ENV/Pyswm.pyc +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files install_swm.py -c ${chef_config_path} > /home/$USER/scripts/$ENV/install_swm.py" ${mechid_user_name} +su - -c "/usr/bin/knife cookbook show $COOKBOOK_NAME $COOKBOOK_VERSION files swm-installer-config.json -c ${chef_config_path} > /home/$USER/scripts/$ENV/swm-installer-config.json" ${mechid_user_name} + +#cd /home/$USER/scripts/$ENV +su - -c "chmod 755 /home/$USER/scripts/$ENV/install_swm.py" ${mechid_user_name} +su - -c "cd /home/$USER/scripts/$ENV; ./install_swm.py $VERSION $ENV --components-nodes=\"vIRC-cc:$(hostname).$(domainname)\" --version-file=${VERSION_FILE}" ${mechid_user_name} +#./install_swm.py $VERSION $ENV --components-nodes="<<<ComponentName.FQDN>>>" + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml index 3d3a1949b1..3d3a1949b1 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml index 2fc2a932fe..e4f29af580 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml @@ -18,7 +18,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml index 5d6cea4d84..f9893b63ee 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml @@ -18,7 +18,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml index 2fc2a932fe..e4f29af580 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml @@ -18,7 +18,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml index 60f8c45630..fbec8ccf73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml @@ -6,7 +6,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_4 } + name: { get_param: fsb2_name_4 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_a } @@ -21,7 +21,7 @@ resources: FSB3: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [fsb2_names, 0] } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone} @@ -36,7 +36,7 @@ resources: FSB4: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [fsb2_names, 0] } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_blabla} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml index 372761514f..323230ff28 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml @@ -7,7 +7,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_4 } + name: { get_param: fsb2_name_4 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } @@ -21,7 +21,7 @@ resources: FSB3: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [fsb2_names, 0] } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml index 58e645e168..74b16bdc5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml @@ -6,7 +6,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2-flavor } availability_zone: { get_param: availability_zone_0 } @@ -21,7 +21,7 @@ resources: FSB3: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] image: { get_param: fsb2-image } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml index 2c9fd08fb2..e4f29af580 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml @@ -18,22 +18,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } - block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] - flavor: { get_param: fsb2_flavor_name } - availability_zone: { get_param: availability_zone_0 } - metadata: - VNF_id: { get_param: vnfvfVF_id } - vf_module_id: { get_param: vf_module_id } - networks: - - port: { get_resource: FSB2_Internal1 } - - port: { get_resource: FSB2_Internal2 } - - port: { get_resource: FSB2_OAM } - - FSB3: - type: OS::Nova::Server - properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml index d82e1ee2d3..d9ddcbc7ed 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml @@ -7,7 +7,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml index 85bb15837b..b6be85b4fa 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml @@ -7,7 +7,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: fsb_name_2 } + name: { get_param: fsb2_name_2 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml index 3a8e71939f..3a8e71939f 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml index 13fc942865..ff17c6940a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml @@ -7,7 +7,7 @@ resources: FSB2: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_4 } + name: { get_param: fsb2_name_4 } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } @@ -21,21 +21,7 @@ resources: FSB3: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } - block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] - flavor: { get_param: fsb2_flavor_name } - availability_zone: { get_param: availability_zone_0 } - metadata: - VnF_id: { get_param: vnfvfVF_id } - vf_module_id: { get_param: vf_module_id } - networks: - - port: { get_resource: FSB2_Internal1 } - - port: { get_resource: FSB2_Internal2 } - - port: { get_resource: FSB2_OAM } - FSB4: - type: OS::Nova::Server - properties: - name: { get_param: [pcrf_pps_server_names, {get_param: index_num}] } + name: { get_param: [fsb2_names, 0] } block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }] flavor: { get_param: fsb2_flavor_name } availability_zone: { get_param: availability_zone_0 } @@ -46,6 +32,7 @@ resources: - port: { get_resource: FSB2_Internal1 } - port: { get_resource: FSB2_Internal2 } - port: { get_resource: FSB2_OAM } + outputs: expose_resource_nove_output2: description: the pcrf_server diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml index 85a4c58334..85a4c58334 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml index 7e0aaa373d..7e0aaa373d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml index abbf650c8d..abbf650c8d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml index c6128e9470..12ee08952d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml @@ -23,11 +23,11 @@ outputs: expose_resource_port_output_0: description: the pcrf_server value: { get_resource: port_resource_0 } -expose_resource_port_output_1: - description: the pcrf_server - value: { get_resource: port_resource_1 } -expose_resource_port_output_2: - description: the pcrf_server - value: { get_resource: port_resource_2 } + expose_resource_port_output_1: + description: the pcrf_server + value: { get_resource: port_resource_1 } + expose_resource_port_output_2: + description: the pcrf_server + value: { get_resource: port_resource_2 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/first.yaml index 3173885d7e..3173885d7e 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml index 4f0d65a735..4f0d65a735 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/negative/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json index 76ce6de6e6..76ce6de6e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/first.yaml index 63b576edb8..63b576edb8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml index 7e82b2a7e6..7e82b2a7e6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatVolumeExpose/positive/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/first.yaml new file mode 100644 index 0000000000..acbc8ca33b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/aligned/first.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + service_instance_1: + type: OS::Contrail::ServiceInstance + depends_on: [ hsl_ip_subnet] + properties: + name: { get_param: service_instance_name } + availability_zone: { get_param: availability_zone_1 } + service_template: { get_resource: service_template_1 } + scale_out: + max_instances: {get_param: max_num_fw_instances} + interface_list: [ + { + virtual_network: { get_param: oam_mgmt_net_0_id } + }, + { + virtual_network: { get_param: Cricket_OCS_direct_net_id } + }, + { + virtual_network: { get_resource: hsl_direct_net } + }, + { + virtual_network: {get_param: oam_mgmt_net_1_id}, + static_routes: [ + { "prefix": {get_param: prefix_0} }, + { "prefix": {get_param: prefix_1} }, + { "prefix": {get_param: prefix_2} }, + ], + } + ] + service_template_1: + type: OS::Contrail::ServiceTemplate + properties: + name: { get_param: st_name } + service_mode: { get_param: st_mode } + service_type: { get_param: st_type } + image_name: { get_param: st_image_name } + flavor: { get_param: st_flavor_name } + service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] } + shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] } + static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] } + service_scaling: { get_param: st_scaling }
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/first.yaml new file mode 100644 index 0000000000..cc9d40fd5a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailserviceinstanceavailabilityzone/notaligned/first.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + service_instance_1: + type: OS::Contrail::ServiceInstance + depends_on: [ hsl_ip_subnet] + properties: + name: { get_param: service_instance_name } + availability_zone: { get_param: availability_zone_1a } + service_template: { get_resource: service_template_1 } + scale_out: + max_instances: {get_param: max_num_fw_instances} + interface_list: [ + { + virtual_network: { get_param: oam_mgmt_net_0_id } + }, + { + virtual_network: { get_param: Cricket_OCS_direct_net_id } + }, + { + virtual_network: { get_resource: hsl_direct_net } + }, + { + virtual_network: {get_param: oam_mgmt_net_1_id}, + static_routes: [ + { "prefix": {get_param: prefix_0} }, + { "prefix": {get_param: prefix_1} }, + { "prefix": {get_param: prefix_2} }, + ], + } + ] + service_template_1: + type: OS::Contrail::ServiceTemplate + properties: + name: { get_param: st_name } + service_mode: { get_param: st_mode } + service_type: { get_param: st_type } + image_name: { get_param: st_image_name } + flavor: { get_param: st_flavor_name } + service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] } + shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] } + static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] } + service_scaling: { get_param: st_scaling }
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/first.yaml new file mode 100644 index 0000000000..1eb7bc914d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/aligned/first.yaml @@ -0,0 +1,17 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + service_template: + type: OS::Contrail::ServiceTemplate + properties: + name: { get_param: st_name } + service_mode: { get_param: st_mode } + service_type: { get_param: st_type } + image_name: { get_param: st_image_name } + flavor: { get_param: st_flavor_name } + service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] } + shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] } + static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] } + service_scaling: { get_param: st_scaling }
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/first.yaml new file mode 100644 index 0000000000..9da16fe0d2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/imageandflavordifferentvmtype/first.yaml @@ -0,0 +1,17 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + service_template: + type: OS::Contrail::ServiceTemplate + properties: + name: { get_param: st_name } + service_mode: { get_param: st_mode } + service_type: { get_param: st_type } + image_name: { get_param: st1_image_name } + flavor: { get_param: st_flavor_name } + service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] } + shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] } + static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] } + service_scaling: { get_param: st_scaling }
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/first.yaml new file mode 100644 index 0000000000..325cb78450 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/heatcontrailservicetemplateimageandflavor/notaligned/first.yaml @@ -0,0 +1,17 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + service_template: + type: OS::Contrail::ServiceTemplate + properties: + name: { get_param: st_name } + service_mode: { get_param: st_mode } + service_type: { get_param: st_type } + image_name: { get_param: st_imaage_name } + flavor: { get_param: st_flavaor_name } + service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] } + shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] } + static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] } + service_scaling: { get_param: st_scaling }
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/MANIFEST.json index a189124e6c..a189124e6c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/first.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/firstVol.yaml index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/second.yaml index bb06b9d60a..bb06b9d60a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/missingBaseHeat/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/MANIFEST.json index 3de70a21df..3de70a21df 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/first.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/firstVol.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/firstVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/second.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/multiBaseHeat/second.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/MANIFEST.json new file mode 100644 index 0000000000..76ce6de6e6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/MANIFEST.json @@ -0,0 +1,27 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true, + "data": [ + { + "file": "first.env", + "type": "HEAT_ENV" + }, + { + "file": "firstVol.yaml", + "type": "HEAT_VOL" + } + ] + }, + { + "file": "second.yaml", + "type": "HEAT", + "isBase": false + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/first.yaml new file mode 100644 index 0000000000..2fe03959bd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/first.yaml @@ -0,0 +1,61 @@ +heat_template_version: 2013-05-23 + +description: heat expose volume resource + +resources: + FSB2_legal_1: + type: OS::Nova::Server + properties: + name: { get_param: fsb_name_2 } + flavor: { get_param: fsb_flavor_name } + image: { get_param: fsb_image_name } + metadata: + VnF_id: { get_param: vnfvfVF_id } + vf_module_id: { get_param: vf_module_id } + + FSB2_legal_2: + type: OS::Nova::Server + properties: + name: { get_param: CE_server_name } + image: { get_param: CE_image_name } + flavor: { get_param: CE_flavor_name } + metadata: + VnF_id: { get_param: vnfvfVF_id } + vf_module_id: { get_param: vf_module_id } + + FSB2_legal_3: + type: OS::Nova::Server + properties: + name: { get_param: fsb_name_2 } + flavor: { get_param: fsb_flavor_names } + image: { get_param: fsb_image_name } + metadata: + VnF_id: { get_param: vnfvfVF_id } + vf_module_id: { get_param: vf_module_id } + + FSB2_illegal_1: + type: OS::Nova::Server + properties: + name: { get_param: fsb_name_2 } + flavor: {get_param: scp_flavor_name} + image: { get_param: pcrf_image_name } + metadata: + VnF_id: { get_param: vnfvfVF_id } + vf_module_id: { get_param: vf_module_id } + + FSB2_illegal_2: + type: OS::Nova::Server + properties: + name: { get_param: [fsb_names, 1] } + flavor: {get_param: scp_flavor_name} + image: { get_param: scp_image_name } + metadata: + VnF_id: { get_param: vnfvfVF_id } + vf_module_id: { get_param: vf_module_id } + +outputs: + expose_resource_nove_output: + description: the pcrf_server + value: { get_resource: FSB2 } + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/firstVol.yaml new file mode 100644 index 0000000000..7e82b2a7e6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/firstVol.yaml @@ -0,0 +1,19 @@ + +heat_template_version: 2013-05-23 + +parameters: + not_null: + type: number + label: not_number + + +resources: + volume_expose: + type: OS::Cinder::Volume + properties: + not_null: not_null +outputs: + not_expose_resource_network_output: + description: the pcrf_server + value: { get_resource: volume_expose } + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/second.yaml new file mode 100644 index 0000000000..bb06b9d60a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/attGuideLineValidator/novaVMNameSync/input/second.yaml @@ -0,0 +1,14 @@ +heat_template_version: 2013-05-23 + +description: heat second + +resources: + network_expose: + type: OS::Neutron::Net + +outputs: + expose_resource_network_output: + description: the pcrf_server + value: { get_resource: network_expose } + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/expected_output/expected_output.json index e9106a850c..e9106a850c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env index 809835d2b8..809835d2b8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml index 1b865e75d5..011a36fa2c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml @@ -52,7 +52,7 @@ resources: availability_zone_legal_name_1: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } availability_zone: {get_param: availability_zone_1} flavor: { get_param: pcrf_flavor_name } metadata: @@ -62,7 +62,7 @@ resources: availability_zone_legal_name_2: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } availability_zone: {get_resource: availability_zone_1} flavor: { get_param: pcrf_flavor_name } metadata: @@ -72,7 +72,7 @@ resources: availability_zone_illegal_name_1: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } availability_zone: {get_param: availability_zone_name} flavor: { get_param: pcrf_flavor_name } metadata: @@ -82,7 +82,7 @@ resources: availability_zone_illegal_name_2: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } availability_zone: {get_param: availability_zone} flavor: { get_param: pcrf_flavor_name } metadata: diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/expected_output/expected_output.json index f0dc0d21a1..f0dc0d21a1 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env index 809835d2b8..809835d2b8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml index 05724cf55b..ab4279d153 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml @@ -50,7 +50,7 @@ resources: legal_resource_type1: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } availability_zone: {get_param: availability_zone_1} flavor: {get_param: pcrf_flavor_name} metadata: diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json index 7eefd3d36e..7eefd3d36e 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env index 809835d2b8..809835d2b8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml index 749b7144b6..749b7144b6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/expected_output/expected_output.json index ca1f58c1f8..ca1f58c1f8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env index 809835d2b8..809835d2b8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml index 766cbf150f..aaefcfb596 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/att_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml @@ -58,7 +58,7 @@ resources: nova_server_legal_name_1: type: OS::Nova::Server properties: - name: { get_param: [pcrf_pps_server_names, 0] } + name: { get_param: [pcrf_names, 0] } flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -68,7 +68,7 @@ resources: nova_server_legal_name_2: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_4 } + name: { get_param: pcrf_name_4 } flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -77,7 +77,7 @@ resources: nova_server_legal_name_3: type: OS::Nova::Server properties: - name: { get_resource: pcrf_pps_server_name_4 } + name: { get_param: pcrf_name_4 } flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -86,7 +86,7 @@ resources: nova_server_ilegal_name_1: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_a } + name: { get_param: pcrf_name_a } flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -95,7 +95,7 @@ resources: nova_server_ilegal_name_2: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_nameds_a } + name: { get_param: pcrf_nameds_a } flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -104,7 +104,7 @@ resources: nova_server_ilegal_name_3: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_a } + name: { get_param: pcrf_pps_name_a } flavor: { get_param: pcrf_pps_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } @@ -113,8 +113,8 @@ resources: nova_server_ilegal_name_4: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_a } - flavor: { get_param: pcrf_pps_flavor_name } + name: { get_param: pcrf_name_a } + flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } vf_module_id: { get_param: pcrf_vnf_module_id } @@ -122,8 +122,8 @@ resources: nova_server_ilegal_name_5: type: OS::Nova::Server properties: - name: { get_param: pcrf_pps_server_name_a } - flavor: { get_param: pcrf_pps_flavor_name } + name: { get_param: pcrf_name_a } + flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } vf_module_id: { get_param: pcrf_vnf_module_id } @@ -131,8 +131,8 @@ resources: nova_server_ilegal_name_6: type: OS::Nova::Server properties: - name: pcrf_pps_server_name_a - flavor: { get_param: pcrf_pps_flavor_name } + name: pcrf_name_a + flavor: { get_param: pcrf_flavor_name } metadata: vnf_id: { get_param: pcrf_vnf_id } vf_module_id: { get_param: pcrf_vnf_module_id } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/MANIFEST.json new file mode 100644 index 0000000000..15650ae299 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + }, + { + "file": "second.yaml", + "type": "HEAT", + "isBase": false + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/first.yaml new file mode 100644 index 0000000000..b8be8b3df9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/first.yaml @@ -0,0 +1,22 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net1: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + jsa_net3: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + jsa_net5: + type: OS::ContrailV2::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/second.yaml new file mode 100644 index 0000000000..f8cadfee51 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesindifferentheatfiles/second.yaml @@ -0,0 +1,19 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net2: + type: OS::ContrailV2::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + jsa_net4: + type: OS::ContrailV2::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/MANIFEST.json new file mode 100644 index 0000000000..d50ac7074b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + }, + { + "file": "second.yaml", + "type": "HEAT_VOL", + "isBase": false + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/first.yaml new file mode 100644 index 0000000000..ea8413c68f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/first.yaml @@ -0,0 +1,14 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net1: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/second.yaml new file mode 100644 index 0000000000..7a0f5e99a2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinnontheatfiles/second.yaml @@ -0,0 +1,15 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net2: + type: OS::ContrailV2::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/first.yaml new file mode 100644 index 0000000000..c53fa03c92 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/collidesinsameheatfile/first.yaml @@ -0,0 +1,19 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net1: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + jsa_net2: + type: OS::ContrailV2::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/first.yaml new file mode 100644 index 0000000000..57eb2d9c23 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/notcollides/first.yaml @@ -0,0 +1,18 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + jsa_net1: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} + jsa_net2: + type: OS::Contrail::VirtualNetwork + properties: + name: {get_param: nems_traffic_name} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/MANIFEST.json new file mode 100644 index 0000000000..0e8bebb1d1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/MANIFEST.json @@ -0,0 +1,12 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "first.yaml", + "type": "HEAT", + "isBase": true + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/first.yaml new file mode 100644 index 0000000000..e56d886090 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/contrailvalidatorresources/validatenocontrailresource/first.yaml @@ -0,0 +1,15 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + nems_traffic_name: + description: dummy + type: string + +resources: + template_NetworkPolicy: + type: OS::Contrail::NetworkPolicy + properties: + name: + get_param: policy_name
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env index 8ae6fc021a..8ae6fc021a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml index 555f6ae852..555f6ae852 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json index a1ec6bc0f7..a1ec6bc0f7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml index 35a0efb28d..35a0efb28d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env index 809835d2b8..809835d2b8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml index 4605195eaf..4605195eaf 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json index d383ab6c95..d383ab6c95 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env index 20f9eed60d..20f9eed60d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml index 9d01d63908..9d01d63908 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json index 06df1e696d..06df1e696d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env index 089284d177..089284d177 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml index 4944424af8..4944424af8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json index c27fba2205..c27fba2205 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml index 4a66bf5bf6..4a66bf5bf6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml index c26a0dd3a8..c26a0dd3a8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml index 4ab762d34b..4ab762d34b 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml index 4b7aac8f44..4b7aac8f44 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json index c27fba2205..c27fba2205 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml index 6eb260e380..6eb260e380 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json index a1ec6bc0f7..a1ec6bc0f7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml index 9a8e58ffe2..9a8e58ffe2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json index 5513de2ba2..5513de2ba2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml index a5ee917b2c..a5ee917b2c 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/MANIFEST.json index 02118a7b23..02118a7b23 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.env new file mode 100644 index 0000000000..5d1e0b0887 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.env @@ -0,0 +1,10 @@ +parameters: + pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006 + pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2 + pcrf_pps_flavor_name: lc.3xlarge + availabilityzone_name: nova + pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0 + pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12 + pcrf_cps_net_mask: 255.255.255.0 + pcrf_security_group_name: nimbus_security_group + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.yaml new file mode 100644 index 0000000000..17f9ea384e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/hot-nimbus-pps_v1.0.yaml @@ -0,0 +1,52 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Policy Server stack + +parameters: + pcrf_pps_server_names: + type: comma_delimited_list + label: PCRF PS server names + description: PCRF PS server names + pcrf_pps_image_name: + type: string + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_flavor_name: + type: string + label: PCRF PS flavor name + description: flavor name of PCRF PS instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + parameter_not_match_nested_type_param: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + +resources: + server_pcrf_pps_001: + type: nested-pps_v1.0.yaml + properties: + pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] } + pcrf_pps_image_name: { get_param: pcrf_pps_image_name } + parameter_not_match_nested_type: { get_param: parameter_not_match_nested_type_param } + static_value_legal_1: 3 + static_value_illegal_1: 4 + static_value_legal_2: abc diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/nested-pps_v1.0.yaml new file mode 100644 index 0000000000..76f15202dc --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nested_input_parameter_match_parent/input/nested-pps_v1.0.yaml @@ -0,0 +1,86 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Policy Server stack + +parameters: + pcrf_pps_server_name: + type: string + label: PCRF PS server name + description: PCRF PS server name + pcrf_pps_image_name: + type: string + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_flavor_name: + type: string + label: PCRF PS flavor name + description: flavor name of PCRF PS instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + static_value_legal_1: + type: number + label: PCRF VNF Id + description: PCRF VNF Id + static_value_illegal_1: + type: boolean + label: PCRF VNF Id + description: PCRF VNF Id + static_value_legal_2: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + parameter_not_match_nested_type: + type: boolean + label: PCRF VNF Id + description: PCRF VNF Id + +resources: + script_init: + type: OS::Heat::SoftwareConfig + properties: + group: ungrouped + config: + str_replace: + params: + $vm_name: { get_param: pcrf_pps_server_name } + network: + type: OS::Heat::CloudConfig + properties: + cloud_config: + write_files: + - path: /etc/sysconfig/network-scripts/ifcfg-eth0 + permissions: "0644" + content: + str_replace: + params: + $dev: eth0 + $ip: { get_param: pcrf_cps_net_ip } + $netmask: { get_param: pcrf_cps_net_mask } + runcmd: + - ifdown eth0 && ifup eth0 + + pcrf_server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml index b2b91ec36d..b2b91ec36d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json index e789fd7b1d..e789fd7b1d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml index 49e03e0a16..49e03e0a16 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml index 981c08c011..981c08c011 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml index bfc412d715..bfc412d715 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml index ec2a02a5d2..ec2a02a5d2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json index dd26e5ac45..dd26e5ac45 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml index 8ef73ded21..8ef73ded21 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml index 25a4545311..25a4545311 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json index dd26e5ac45..dd26e5ac45 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml index f7678ed6b7..f7678ed6b7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml index c173fce968..c173fce968 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json index ce04d8c601..ce04d8c601 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml index c86aa34713..c86aa34713 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json index dd26e5ac45..dd26e5ac45 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env index f613758633..f613758633 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml index 82edacf101..82edacf101 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml index a7966d6d47..a7966d6d47 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml index 681117d275..681117d275 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml index c86aa34713..c86aa34713 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml index c86aa34713..c86aa34713 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json new file mode 100644 index 0000000000..02118a7b23 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json @@ -0,0 +1,21 @@ +{ + "name": "hot-mog", + "description": "HOT template to create hot mog server", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pps_v1.0.yaml", + "type": "HEAT", + "data": [ + { + "file": "hot-nimbus-pps_v1.0.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "nested-pps_v1.0.yaml", + "type": "HEAT" + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml index 5d93b2f4f7..5d93b2f4f7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml index 0ed9043fc2..0ed9043fc2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json index d038fb2a7e..d038fb2a7e 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml index 8dd378ccbd..8dd378ccbd 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json index a1ec6bc0f7..a1ec6bc0f7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml index c4680ab619..c4680ab619 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json index ea7f326c76..ea7f326c76 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml index a591692753..a591692753 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml index c86aa34713..c86aa34713 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet index fc5b6f74c3..fc5b6f74c3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/MANIFEST.json index 5513de2ba2..5513de2ba2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/hot-nimbus-psm_v1.0.yaml new file mode 100644 index 0000000000..5181f94932 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/hot-nimbus-psm_v1.0.yaml @@ -0,0 +1,138 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Session Manager stack + +parameters: + num_instances: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_server_names: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_image_name: + type: string + label: PCRF SM image name + description: PCRF SM image name + pcrf_psm_flavor_name: + type: string + label: PCRF SM flavor name + description: flavor name of PCRF SM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + pcrf_pps_server_names: + type: string + + pcrf_pps_image_name: + type: string + pcrf_pps_flavor_name: + type: string + availability_zone_0: + type: string +resources: + resource_with_resources_group_1: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + index_var: { get_param: num_instances } + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_string: { get_param: num_instances } + index_number: { get_param: num_instances } + + resource_with_resources_group_2: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + index_var: myIndex + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_boolean: myIndex + index_number: myIndex + index_string: myIndex + + resource_with_resources_group_3: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + index_var: '%myIndex%' + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_boolean: "%myIndex%" + index_number: "%index%" + index_string: "%myIndex%" + index_number_v2: "%myIndex%" + + resource_with_resources_group_4: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_boolean: "%index%" + index_number: "%index%" + index_string: "%index%" + + resource_with_resources_group_5: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_boolean: "%index%_ttt" + index_number: "%index%_ttt" + index_string: "%index%_ttt" + + resource_with_resources_group_6: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + index_var: { remote_ip_prefix: '0.0.0.0/0', protocol: tcp, port_range_min: 22, port_range_max: 22, ethertype: IPv4 } + resource_def: + type: yamlFile.yaml + properties: + pcrf_psm_server_names: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + index_string: { get_param: num_instances } + index_number: { get_param: num_instances } + + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/yamlFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/yamlFile.yaml new file mode 100644 index 0000000000..5e421d57eb --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_indexvar/negative_test/input/yamlFile.yaml @@ -0,0 +1,56 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Session Manager stack + +parameters: + num_instances: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_server_names: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_image_name: + type: string + label: PCRF SM image name + description: PCRF SM image name + pcrf_psm_flavor_name: + type: string + label: PCRF SM flavor name + description: flavor name of PCRF SM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + pcrf_pps_server_names: + type: string + index_boolean: + type: boolean + index_string: + type: string + index_number: + type: number + index_number_v2: + type: number + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json new file mode 100644 index 0000000000..5513de2ba2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json @@ -0,0 +1,11 @@ +{ + "name": "hot-mog", + "description": "HOT template to create hot mog server", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-psm_v1.0.yaml", + "type": "HEAT" + } + ] +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml index 14ee7b10d2..14ee7b10d2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml index 12a838bcf5..12a838bcf5 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json index 3a4d09caa9..3a4d09caa9 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml index 1154c06f4d..1154c06f4d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml index 05bd6c9318..05bd6c9318 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json index 0c8e740434..0c8e740434 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml index e3779ed99d..e3779ed99d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml index dc78b37ca2..dc78b37ca2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml index 836ab5c1f8..836ab5c1f8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml index bdf957c59e..bdf957c59e 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env index a1ea053e07..a1ea053e07 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml index b12de0def4..b12de0def4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml index 3f91e94d74..3f91e94d74 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json index f487bae31f..f487bae31f 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml index 9446d6fde0..7b48f5bafa 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml @@ -37,7 +37,4 @@ outputs: value: {get_resource: jsa_security_group1} shared_security_group_id2: - value: {get_resource: jsa_security_group2} - - shared_security_group_id3: - value: {get_resource: jsa_security_group3}
\ No newline at end of file + value: {get_resource: jsa_security_group2}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml index 7ac05194ac..7ac05194ac 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml index 51b9481bfa..51b9481bfa 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml index 63eea76e2e..63eea76e2e 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml index 1955922940..8ee534e43a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml @@ -61,7 +61,7 @@ resources: scheduler_hints: { group_1: , group_2: { get_resource: BE_Affinity_2 } } BE_Affinity_2: - type: OS::Neutron::Port + type: OS::Contrail::NetworkIpam properties: network: { get_param: pcrf_pps_server_names } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json index fe7d8bdf5a..fe7d8bdf5a 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env index a1ea053e07..a1ea053e07 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml index b12de0def4..b12de0def4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml index c2d7b05ead..c2d7b05ead 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml index b7291d69d3..b7291d69d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml index 6868728b73..6868728b73 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/MANIFEST.json index 1e719efb31..1e719efb31 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml index 1114734097..1114734097 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json index 06df1e696d..06df1e696d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env index 340be2b815..340be2b815 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml index 717b915c68..717b915c68 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml index de8d6b7658..de8d6b7658 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml index 153820b2c2..153820b2c2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml index f982cc9195..f982cc9195 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json index 9e26dfeeb6..9e26dfeeb6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json index dd26e5ac45..dd26e5ac45 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env index f24e4763c6..f24e4763c6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml index 5e940bdd49..5e940bdd49 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/MANIFEST.json index 5524f47fa8..5524f47fa8 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/first.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/first.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/first.yaml index 368834e847..368834e847 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/first.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/second.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/envInRoot/second.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json index de35dfc0db..de35dfc0db 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/MANIFEST.json index 7b3dd77ed7..7b3dd77ed7 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/single.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/single.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/single.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/single.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/singleVol.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/invalidManifest/singleVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json index fd2b2c3f6d..fd2b2c3f6d 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/extraFile.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/extraFile.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/single.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/single.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/single.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/single.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json index 60a8efe769..60a8efe769 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json index 60a8efe769..60a8efe769 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/single.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/single.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/single.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileInZip/single.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/MANIFEST.json index 60a8efe769..60a8efe769 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/single.env index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/single.env diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/single.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/single.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/singleVol.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/validFiles/singleVol.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/duplicateKey.yaml index 418cc59c71..418cc59c71 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/duplicateKey.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/emptyYaml.yaml index e69de29bb2..e69de29bb2 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/emptyYaml.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalidTabYamlStructure.yaml index 9cc18cef35..9cc18cef35 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalidTabYamlStructure.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalidYamlStructure.yaml index 65205e01f9..65205e01f9 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalidYamlStructure.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json index a4065d0b68..a4065d0b68 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml index 318c8f1283..318c8f1283 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json index dedbeaf5db..dedbeaf5db 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json index a4065d0b68..a4065d0b68 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml index 042f301507..042f301507 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml index b47d7d32f4..b47d7d32f4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml index 2dc0c63941..2dc0c63941 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml index 54626a9d62..54626a9d62 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json index a4065d0b68..a4065d0b68 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml index 318c8f1283..318c8f1283 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml index d5608abfb4..d5608abfb4 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml |