X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ms%2Fcontrollerblueprints%2Fmodules%2Fblueprint-validation%2Fsrc%2Fmain%2Fkotlin%2Forg%2Fonap%2Fccsdk%2Fcds%2Fcontrollerblueprints%2Fvalidation%2FBluePrintDesignTimeValidatorService.kt;h=5df2decdb10ec01f2e52d78fa4809a3891c0b2ba;hb=341db21b2ac0a14a1ed2b8bf7930914dda054bfe;hp=72fb7ac1341c04fc803d167ce75c1ec9e127beec;hpb=1e26e98ddf10a4a45c8cefbd3d6dd09443bf906b;p=ccsdk%2Fcds.git diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt index 72fb7ac13..5df2decdb 100644 --- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt +++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt @@ -17,8 +17,6 @@ package org.onap.ccsdk.cds.controllerblueprints.validation -import com.att.eelf.configuration.EELFLogger -import com.att.eelf.configuration.EELFManager import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService @@ -29,17 +27,19 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator +import org.slf4j.LoggerFactory import org.springframework.stereotype.Service import java.io.File -import java.util.* +import java.util.UUID +@Service("bluePrintDesignTimeValidatorService") +open class BluePrintDesignTimeValidatorService( + private val bluePrintTypeValidatorService: BluePrintTypeValidatorService, + private val resourceDefinitionValidator: ResourceDefinitionValidator +) : + BluePrintValidatorService { -@Service -open class BluePrintDesignTimeValidatorService(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService, - private val resourceDefinitionValidator: ResourceDefinitionValidator) - : BluePrintValidatorService { - - private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintDesignTimeValidatorService::class.toString()) + private val log = LoggerFactory.getLogger(BluePrintDesignTimeValidatorService::class.toString()) override fun validateBluePrints(basePath: String): Boolean { @@ -49,8 +49,10 @@ open class BluePrintDesignTimeValidatorService(private val bluePrintTypeValidato override fun validateBluePrints(bluePrintRuntimeService: BluePrintRuntimeService<*>): Boolean { - bluePrintTypeValidatorService.validateServiceTemplate(bluePrintRuntimeService, "service_template", - bluePrintRuntimeService.bluePrintContext().serviceTemplate) + bluePrintTypeValidatorService.validateServiceTemplate( + bluePrintRuntimeService, "service_template", + bluePrintRuntimeService.bluePrintContext().serviceTemplate + ) // Validate Resource Definitions validateResourceDefinitions(bluePrintRuntimeService) @@ -66,8 +68,8 @@ open class BluePrintDesignTimeValidatorService(private val bluePrintTypeValidato val blueprintBasePath = bluePrintRuntimeService.bluePrintContext().rootPath val resourceDefinitionsPath = blueprintBasePath.plus(File.separator) - .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator) - .plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json") + .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator) + .plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json") val resourceDefinitionFile = File(resourceDefinitionsPath)