summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-26 19:21:34 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-26 19:21:34 +0000
commit68676761d63eefc4dccc96dd2df6853cb8e10c42 (patch)
tree2a3cc20a62c43b149b05c1e716bac292c8dce8f4 /ms/controllerblueprints
parent955b4242da37028f0922ceac2971c574fcd712ed (diff)
parentc720be06d1f8e63fa922506103c361f8b01c8ac4 (diff)
Merge "Add output filename param to compresToFilePart"
Diffstat (limited to 'ms/controllerblueprints')
-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())
}