package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@Service("default-topology-template-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BluePrintTopologyTemplateValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
- BluePrintTopologyTemplateValidator {
+open class BlueprintTopologyTemplateValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
+ BlueprintTopologyTemplateValidator {
- private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
+ override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
log.trace("Validating Topology Template..")
this.bluePrintRuntimeService = bluePrintRuntimeService
topologyTemplate.workflows?.let { validateWorkflows(topologyTemplate.workflows!!) }
}
- @Throws(BluePrintException::class)
+ @Throws(BlueprintException::class)
fun validateInputs(inputs: MutableMap<String, PropertyDefinition>) {
bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, inputs)
}
- @Throws(BluePrintException::class)
+ @Throws(BlueprintException::class)
fun validateNodeTemplates(nodeTemplates: MutableMap<String, NodeTemplate>) {
nodeTemplates.forEach { nodeTemplateName, nodeTemplate ->
}
}
- @Throws(BluePrintException::class)
+ @Throws(BlueprintException::class)
open fun validateWorkflows(workflows: MutableMap<String, Workflow>) {
workflows.forEach { workflowName, workflow ->