From f1560d8c10819106feb56443ade73de720242ccf Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Fri, 25 Jan 2019 14:54:56 -0500 Subject: Controller Design Studio: Blueprint Manager Blueprint Manager JUnit Test Case Enhacements Change-Id: I6d98436f13ee58450ba9459266ec657ca30a2d99 Issue-ID: CCSDK-1005 Signed-off-by: Singal, Kapil (ks220y) --- .../selfservice/api/BluePrintManagementGRPCHandler.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main') diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt index b80f9909..fb0bc567 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt @@ -19,7 +19,6 @@ package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api import io.grpc.StatusException import io.grpc.stub.StreamObserver -import org.apache.commons.io.FileUtils import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils.currentTimestamp import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader @@ -82,9 +81,11 @@ class BluePrintManagementGRPCHandler(private val bluePrintCoreConfiguration: Blu log.info("request(${request.commonHeader.requestId}): Writing CBA File under :${blueprintDir.absolutePath}") if (blueprintDir.exists()) { log.info("request(${request.commonHeader.requestId}): Re-creating blueprint directory(${blueprintDir.absolutePath})") - FileUtils.deleteDirectory(blueprintDir.parentFile) + //FileUtils.deleteDirectory(blueprintDir.parentFile) + blueprintDir.parentFile.deleteRecursively() } - FileUtils.forceMkdir(blueprintDir.parentFile) + blueprintDir.parentFile.mkdirs() + //FileUtils.forceMkdir(blueprintDir.parentFile) blueprintDir.writeBytes(request.fileChunk.chunk.toByteArray()).apply { log.info("request(${request.commonHeader.requestId}): CBA file(${blueprintDir.absolutePath} written successfully") } -- cgit 1.2.3-korg