diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-08-29 22:40:48 -0400 |
---|---|---|
committer | Brinda Santh <brindasanth@in.ibm.com> | 2019-08-29 22:40:48 -0400 |
commit | 0fbfc6eab2d42c8ee2f8601db43813a4e33ffc4d (patch) | |
tree | 240a92c46f7bc1a46605c6aa895c0ec6c56e936e /ms/blueprintsprocessor | |
parent | b12d13b0b78b7e87912c07a7c946cbbfcee41d47 (diff) |
Resolve duplicate application property values
Change-Id: I0813ff96388bce77eba9fbc9eff0eccf59a6be6a
Issue-ID: CCSDK-1663
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor')
9 files changed, 61 insertions, 72 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties index 9b248aa0f..019c5aabc 100755 --- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties +++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties @@ -29,21 +29,21 @@ server.port=8081 resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration -controllerblueprints.blueprintDeployPath=blueprints/deploy -controllerblueprints.blueprintArchivePath=blueprints/archive -controllerblueprints.blueprintWorkingPath=blueprints/work +blueprintsprocessor.blueprintDeployPath=blueprints/deploy +blueprintsprocessor.blueprintArchivePath=blueprints/archive +blueprintsprocessor.blueprintWorkingPath=blueprints/work # Controller Blueprint Load Configurations # blueprints.load.initial-data may be overridden by ENV variables -controllerblueprints.loadInitialData=true -controllerblueprints.loadBluePrint=false -controllerblueprints.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint -controllerblueprints.loadModelType=true -controllerblueprints.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type -controllerblueprints.loadResourceDictionary=true -controllerblueprints.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary +blueprintsprocessor.loadInitialData=true +blueprintsprocessor.loadBluePrint=false +blueprintsprocessor.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint +blueprintsprocessor.loadModelType=true +blueprintsprocessor.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type +blueprintsprocessor.loadResourceDictionary=true +blueprintsprocessor.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary # CBA file extension -controllerblueprints.loadCbaExtension=zip +blueprintsprocessor.loadCbaExtension=zip ### END -Controller Blueprints Properties @@ -63,9 +63,6 @@ blueprintsprocessor.grpcPort=9111 ### blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy ### blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive ### blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working -blueprintsprocessor.blueprintDeployPath=blueprints/deploy -blueprintsprocessor.blueprintArchivePath=blueprints/archive -blueprintsprocessor.blueprintWorkingPath=blueprints/work # Primary Database Configuration blueprintsprocessor.db.url=jdbc:mysql://localhost:3306/sdnctl blueprintsprocessor.db.username=sdnctl diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties index 136df9a5a..4a4f79459 100755 --- a/ms/blueprintsprocessor/application/src/main/resources/application.properties +++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties @@ -19,19 +19,19 @@ resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration -controllerblueprints.blueprintDeployPath=/opt/app/onap/blueprints/deploy -controllerblueprints.blueprintArchivePath=/opt/app/onap/blueprints/archive -controllerblueprints.blueprintWorkingPath=/opt/app/onap/blueprints/working +blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy +blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive +blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working # Controller Blueprint Load Configurations # blueprints.load.initial-data may be overridden by ENV variables -controllerblueprints.loadInitialData=false -controllerblueprints.loadBluePrint=false -controllerblueprints.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint -controllerblueprints.loadModelType=false -controllerblueprints.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type -controllerblueprints.loadResourceDictionary=false -controllerblueprints.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary +blueprintsprocessor.loadInitialData=false +blueprintsprocessor.loadBluePrint=false +blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint +blueprintsprocessor.loadModelType=false +blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type +blueprintsprocessor.loadResourceDictionary=false +blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary # CBA file extension controllerblueprints.loadCbaExtension=zip @@ -42,11 +42,6 @@ blueprintsprocessor.grpcEnable=false blueprintsprocessor.httpPort=8080 blueprintsprocessor.grpcPort=9111 -# Blueprint Processor File Execution and Handling Properties -blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy -blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive -blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working - # Primary Database Configuration blueprintsprocessor.db.url=jdbc:mysql://db:3306/sdnctl blueprintsprocessor.db.username=sdnctl diff --git a/ms/blueprintsprocessor/application/src/test/resources/application.properties b/ms/blueprintsprocessor/application/src/test/resources/application.properties index 9a8bc1222..766498fdc 100644 --- a/ms/blueprintsprocessor/application/src/test/resources/application.properties +++ b/ms/blueprintsprocessor/application/src/test/resources/application.properties @@ -22,19 +22,19 @@ server.port=8080 resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration -controllerblueprints.blueprintDeployPath=/opt/app/onap/blueprints/deploy -controllerblueprints.blueprintArchivePath=/opt/app/onap/blueprints/archive -controllerblueprints.blueprintWorkingPath=/opt/app/onap/blueprints/working +blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy +blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive +blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working # Controller Blueprint Load Configurations # blueprints.load.initial-data may be overridden by ENV variables -controllerblueprints.loadInitialData=false -controllerblueprints.loadBluePrint=false -controllerblueprints.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint -controllerblueprints.loadModelType=false -controllerblueprints.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type -controllerblueprints.loadResourceDictionary=false -controllerblueprints.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary +blueprintsprocessor.loadInitialData=false +blueprintsprocessor.loadBluePrint=false +blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint +blueprintsprocessor.loadModelType=false +blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type +blueprintsprocessor.loadResourceDictionary=false +blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary # CBA file extension controllerblueprints.loadCbaExtension=zip @@ -44,10 +44,7 @@ controllerblueprints.loadCbaExtension=zip blueprintsprocessor.grpcEnable=false blueprintsprocessor.httpPort=8080 blueprintsprocessor.grpcPort=9111 -# Blueprint Processor File Execution and Handling Properties -blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy -blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive -blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/work + # Primary Database Configuration blueprintsprocessor.db.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE blueprintsprocessor.db.username=sa diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt index 153e88937..e6cf05955 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt @@ -20,7 +20,7 @@ import org.junit.Test import org.junit.runner.RunWith import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties -import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintProcessorProperties +import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice @@ -41,7 +41,7 @@ import kotlin.test.assertNotNull @ContextConfiguration(classes = [DatabaseResourceAssignmentProcessor::class, BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibPropertySevice::class, BluePrintDBLibConfiguration::class, BluePrintCoreConfiguration::class, MockDatabaseConfiguration::class, MockBlueprintProcessorCatalogServiceImpl::class, - BlueprintProcessorProperties::class]) + BlueprintPropertiesService::class]) @TestPropertySource(locations = ["classpath:application-test.properties"]) class DatabaseResourceResolutionProcessorTest { diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt index 9d5d630de..ce2aa95b5 100755 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt @@ -23,7 +23,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcess import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintProcessorModelRepository import org.onap.ccsdk.cds.controllerblueprints.core.* import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants -import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration +import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache @@ -41,20 +41,20 @@ import java.util.* */ @Service("blueprintsProcessorCatalogService") class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: BluePrintValidatorService, - private val bluePrintPathConfiguration: BluePrintPathConfiguration, + private val bluePrintLoadConfiguration: BluePrintLoadConfiguration, private val blueprintModelRepository: BlueprintProcessorModelRepository) - : BlueprintCatalogServiceImpl(bluePrintPathConfiguration, bluePrintRuntimeValidatorService) { + : BlueprintCatalogServiceImpl(bluePrintLoadConfiguration, bluePrintRuntimeValidatorService) { private val log = LoggerFactory.getLogger(BlueprintProcessorCatalogServiceImpl::class.toString()) override suspend fun delete(name: String, version: String) { // Clean blueprint script cache val cacheKey = BluePrintFileUtils - .compileCacheKey(normalizedPathName(bluePrintPathConfiguration.blueprintDeployPath, name, version)) + .compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, name, version)) BluePrintCompileCache.cleanClassLoader(cacheKey) log.info("removed cba file name($name), version($version) from cache") // Cleaning Deployed Blueprint - deleteNBDir(bluePrintPathConfiguration.blueprintDeployPath, name, version) + deleteNBDir(bluePrintLoadConfiguration.blueprintDeployPath, name, version) log.info("removed cba file name($name), version($version) from deploy location") // Cleaning Data Base blueprintModelRepository @@ -65,8 +65,8 @@ class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: Blu override suspend fun get(name: String, version: String, extract: Boolean): Path? { - val deployFile = normalizedFile(bluePrintPathConfiguration.blueprintDeployPath, name, version) - val cbaFile = normalizedFile(bluePrintPathConfiguration.blueprintArchivePath, + val deployFile = normalizedFile(bluePrintLoadConfiguration.blueprintDeployPath, name, version) + val cbaFile = normalizedFile(bluePrintLoadConfiguration.blueprintArchivePath, UUID.randomUUID().toString(), "cba.zip") if (extract && deployFile.exists()) { @@ -117,7 +117,7 @@ class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: Blu log.info("Overwriting blueprint model :$artifactName::$artifactVersion") blueprintModelRepository.deleteByArtifactNameAndArtifactVersion(artifactName, artifactVersion) val deployFile = - normalizedPathName(bluePrintPathConfiguration.blueprintDeployPath, artifactName, artifactVersion) + normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, artifactName, artifactVersion) deleteNBDir(deployFile).let { if (it) log.info("Deleted deployed blueprint model :$artifactName::$artifactVersion") else log.info("Fail to delete deployed blueprint model :$artifactName::$artifactVersion") diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt index fe8172b85..1a1aa0b49 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt @@ -109,9 +109,9 @@ class BlueprintProcessorCatalogServiceImplTest { blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true) } - assertTrue(File(blueprintCoreConfiguration.bluePrintPathConfiguration().blueprintArchivePath + + assertTrue(File(blueprintCoreConfiguration.bluePrintLoadConfiguration().blueprintArchivePath + "/baseconfiguration").deleteRecursively(),"Couldn't get blueprint archive " + - "${blueprintCoreConfiguration.bluePrintPathConfiguration().blueprintArchivePath}/baseconfiguration " + + "${blueprintCoreConfiguration.bluePrintLoadConfiguration().blueprintArchivePath}/baseconfiguration " + "from data base.") } diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt index 1cb66b8ab..9980b9efb 100644 --- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2019 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +17,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.core -import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration +import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired @@ -31,18 +32,17 @@ import org.springframework.core.env.Environment import org.springframework.stereotype.Service @Configuration -open class BluePrintCoreConfiguration(private val bluePrintProperties: BlueprintProcessorProperties) { +open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: BlueprintPropertiesService) { companion object { const val PREFIX_BLUEPRINT_PROCESSOR = "blueprintsprocessor" } @Bean - open fun bluePrintPathConfiguration(): BluePrintPathConfiguration { - return bluePrintProperties - .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BluePrintPathConfiguration::class.java) + open fun bluePrintLoadConfiguration(): BluePrintLoadConfiguration { + return bluePrintPropertiesService + .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BluePrintLoadConfiguration::class.java) } - } @Configuration @@ -58,7 +58,7 @@ open class BlueprintPropertyConfiguration { } @Service -open class BlueprintProcessorProperties(private var bluePrintPropertyBinder: Binder) { +open class BlueprintPropertiesService(private var bluePrintPropertyBinder: Binder) { fun <T> propertyBeanType(prefix: String, type: Class<T>): T { return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get() } diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt index 81f3ec309..451f827b6 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.runBlocking import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.currentTimestamp import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader import org.onap.ccsdk.cds.controllerblueprints.common.api.Status -import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration +import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile @@ -40,7 +40,7 @@ import java.io.File import java.util.* @Service -open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration, +open class BluePrintManagementGRPCHandler(private val bluePrintLoadConfiguration: BluePrintLoadConfiguration, private val blueprintsProcessorCatalogService: BluePrintCatalogService) : BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase() { @@ -54,7 +54,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration log.info("request(${request.commonHeader.requestId})") val uploadId = UUID.randomUUID().toString() try { - val cbaFile = normalizedFile(bluePrintPathConfiguration.blueprintArchivePath, uploadId, "cba-zip") + val cbaFile = normalizedFile(bluePrintLoadConfiguration.blueprintArchivePath, uploadId, "cba-zip") saveToDisk(request, cbaFile) @@ -64,8 +64,8 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration } catch (e: Exception) { responseObserver.onError(failStatus("request(${request.commonHeader.requestId}): Failed to upload CBA", e)) } finally { - deleteDir(bluePrintPathConfiguration.blueprintArchivePath, uploadId) - deleteDir(bluePrintPathConfiguration.blueprintWorkingPath, uploadId) + deleteDir(bluePrintLoadConfiguration.blueprintArchivePath, uploadId) + deleteDir(bluePrintLoadConfiguration.blueprintWorkingPath, uploadId) } } } diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt index a81d35eac..9dd04bf95 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt @@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.* import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.toProto import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType import org.onap.ccsdk.cds.controllerblueprints.core.* -import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration +import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService @@ -42,7 +42,7 @@ import java.util.* import java.util.stream.Collectors @Service -class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration, +class ExecutionServiceHandler(private val bluePrintLoadConfiguration: BluePrintLoadConfiguration, private val blueprintsProcessorCatalogService: BluePrintCatalogService, private val bluePrintWorkflowExecutionService : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>) { @@ -51,8 +51,8 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP suspend fun upload(filePart: FilePart): String { val saveId = UUID.randomUUID().toString() - val blueprintArchive = normalizedPathName(bluePrintPathConfiguration.blueprintArchivePath, saveId) - val blueprintWorking = normalizedPathName(bluePrintPathConfiguration.blueprintWorkingPath, saveId) + val blueprintArchive = normalizedPathName(bluePrintLoadConfiguration.blueprintArchivePath, saveId) + val blueprintWorking = normalizedPathName(bluePrintLoadConfiguration.blueprintWorkingPath, saveId) try { val compressedFile = normalizedFile(blueprintArchive, "cba.zip") @@ -67,7 +67,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP } finally { // Clean blueprint script cache val cacheKey = BluePrintFileUtils - .compileCacheKey(normalizedPathName(bluePrintPathConfiguration.blueprintWorkingPath,saveId)) + .compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintWorkingPath,saveId)) BluePrintCompileCache.cleanClassLoader(cacheKey) deleteNBDir(blueprintArchive) deleteNBDir(blueprintWorking) |