summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2019-08-22 17:17:52 -0400
committerOleg Mitsura <oleg.mitsura@amdocs.com>2019-08-23 10:08:17 -0400
commitc720be06d1f8e63fa922506103c361f8b01c8ac4 (patch)
treef41b6b61229602e60e9104b08b24025aef864302
parentb496e93839fba89a8ea2ab026954a6f6359bc4c2 (diff)
Add output filename param to compresToFilePart
Currently, just defaults to "enhanced-cba.zip" as before; Should be part of the feature that names enhanced files yyyy-mm-dd-BPname-BPver Issue-Id: CCSDK-1652 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I464c242bf5651958671a06e1acf4148c28e69147
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt
index a0f8ca9c5..97b9a813a 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt
@@ -107,8 +107,9 @@ class BluePrintEnhancerUtils {
return filePartFile.deCompress(deCompressFileName)
}
- suspend fun compressToFilePart(enhanceDir: String, archiveDir: String): ResponseEntity<Resource> {
- val compressedFile = normalizedFile(archiveDir, "enhanced-cba.zip")
+ suspend fun compressToFilePart(enhanceDir: String, archiveDir: String,
+ outputFileName:String="enhanced-cba.zip"): ResponseEntity<Resource> {
+ val compressedFile = normalizedFile(archiveDir, outputFileName)
BluePrintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
return prepareResourceEntity(compressedFile.name, compressedFile.readBytes())
}