From f2136a47fd53fcbdc117899c6e134d7ceea46d85 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Wed, 24 Apr 2019 10:05:02 -0400 Subject: Multiples fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I83782006dc47a224e546b6877070d5e7e56dd2e6 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët Delete the deployed blueprint if overriten Change-Id: I7e4f3a5c98388a965ef756467497ed31d23bc047 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët Fix enhancement of workflow step for component Change-Id: I62c7904265495edb2b0a5bec0d64cfecd7573f97 Issue-ID: CCSDK-1168 Signed-off-by: Alexis de Talhouët Update golden package Change-Id: I969fe9cf9b563911ebe4500fe8f3211aedb84593 Issue-ID: CCSDK-1231 Signed-off-by: Alexis de Talhouët Do not fail to get execution property When prepareEnv fail, we should not fail by saying to property is not set. So set it as N/A until is get sets further done in the processing Change-Id: I06b9fcb9b1cf9e1605cef77864da9dbd18243800 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët --- .../db/BlueprintProcessorCatalogServiceImpl.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ms/blueprintsprocessor/modules/commons/db-lib') 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 79f74e5dc..452dd0f5c 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 @@ -56,7 +56,7 @@ class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: Blu log.info("removed cba file name($name), version($version) from deploy location") // Cleaning Data Base blueprintModelRepository - .deleteByArtifactNameAndArtifactVersion(name, version) + .deleteByArtifactNameAndArtifactVersion(name, version) log.info("removed cba file name($name), version($version) from database") } @@ -65,7 +65,7 @@ class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: Blu val deployFile = normalizedFile(bluePrintPathConfiguration.blueprintDeployPath, name, version) val cbaFile = normalizedFile(bluePrintPathConfiguration.blueprintArchivePath, - UUID.randomUUID().toString(), "cba.zip") + UUID.randomUUID().toString(), "cba.zip") if (extract && deployFile.exists()) { log.info("cba file name($name), version($version) already present(${deployFile.absolutePath})") @@ -114,6 +114,12 @@ class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: Blu blueprintModelRepository.findByArtifactNameAndArtifactVersion(artifactName!!, artifactVersion!!)?.let { log.info("Overwriting blueprint model :$artifactName::$artifactVersion") blueprintModelRepository.deleteByArtifactNameAndArtifactVersion(artifactName, artifactVersion) + val deployFile = + normalizedPathName(bluePrintPathConfiguration.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") + } } val blueprintModel = BlueprintProcessorModel() -- cgit 1.2.3-korg