summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-07-31 12:31:09 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-07-31 12:31:09 -0400
commit82753f0646ae2181baf247f51d2909058dcc3707 (patch)
treef210b615c87483a0f315ab193a4e876da21e68c6 /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src
parentd8183b1c5fb1a6ee0cd85fa0f65a10912a1ba529 (diff)
Fix conflicting catalog service instance names.
Change-Id: Iec330d87f9609d42c05f8d4c7c8515fa37310a6e Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt6
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt9
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt2
3 files changed, 8 insertions, 9 deletions
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 549d6cd9f..81f3ec309 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
@@ -41,7 +41,7 @@ import java.util.*
@Service
open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration,
- private val bluePrintCatalogService: BluePrintCatalogService)
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService)
: BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase() {
private val log = LoggerFactory.getLogger(BluePrintManagementGRPCHandler::class.java)
@@ -58,7 +58,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
saveToDisk(request, cbaFile)
- val blueprintId = bluePrintCatalogService.saveToDatabase(uploadId, cbaFile)
+ val blueprintId = blueprintsProcessorCatalogService.saveToDatabase(uploadId, cbaFile)
responseObserver.onNext(successStatus("Successfully uploaded CBA($blueprintId)...", request.commonHeader))
responseObserver.onCompleted()
} catch (e: Exception) {
@@ -83,7 +83,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
try {
- bluePrintCatalogService.deleteFromDatabase(blueprintName, blueprintVersion)
+ blueprintsProcessorCatalogService.deleteFromDatabase(blueprintName, blueprintVersion)
responseObserver.onNext(successStatus("Successfully deleted $blueprint", request.commonHeader))
responseObserver.onCompleted()
} catch (e: Exception) {
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 347e5eac4..094fb68da 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
@@ -17,7 +17,6 @@
package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
-import com.fasterxml.jackson.databind.node.JsonNodeFactory
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@@ -42,7 +41,7 @@ import java.util.stream.Collectors
@Service
class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration,
- private val bluePrintCatalogService: BluePrintCatalogService,
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService,
private val bluePrintWorkflowExecutionService
: BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>) {
@@ -59,7 +58,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
// Copy the File Part to Local File
copyFromFilePart(filePart, compressedFile)
// Save the Copied file to Database
- return bluePrintCatalogService.saveToDatabase(saveId, compressedFile, true)
+ return blueprintsProcessorCatalogService.saveToDatabase(saveId, compressedFile, true)
} catch (e: IOException) {
throw BluePrintException(ErrorCode.IO_FILE_INTERRUPT.value,
"Error in Upload CBA: ${e.message}", e)
@@ -70,7 +69,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
}
suspend fun remove(name: String, version: String) {
- bluePrintCatalogService.deleteFromDatabase(name, version)
+ blueprintsProcessorCatalogService.deleteFromDatabase(name, version)
}
suspend fun process(executionServiceInput: ExecutionServiceInput,
@@ -102,7 +101,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
val blueprintName = actionIdentifiers.blueprintName
val blueprintVersion = actionIdentifiers.blueprintVersion
try {
- val basePath = bluePrintCatalogService.getFromDatabase(blueprintName, blueprintVersion)
+ val basePath = blueprintsProcessorCatalogService.getFromDatabase(blueprintName, blueprintVersion)
log.info("blueprint base path $basePath")
val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
index 707439ddb..ab0d4256c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
@@ -21,7 +21,7 @@ import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintDesignTimeVal
import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import org.springframework.stereotype.Service
-@Service
+@Service("bluePrintRuntimeValidatorService")
open class BluePrintRuntimeValidatorService(bluePrintTypeValidatorService: BluePrintTypeValidatorService,
resourceDefinitionValidator: ResourceDefinitionValidator)
: BluePrintDesignTimeValidatorService(bluePrintTypeValidatorService, resourceDefinitionValidator)