diff options
author | Dan Timoney <dtimoney@att.com> | 2019-08-26 19:21:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-26 19:21:34 +0000 |
commit | 68676761d63eefc4dccc96dd2df6853cb8e10c42 (patch) | |
tree | 2a3cc20a62c43b149b05c1e716bac292c8dce8f4 | |
parent | 955b4242da37028f0922ceac2971c574fcd712ed (diff) | |
parent | c720be06d1f8e63fa922506103c361f8b01c8ac4 (diff) |
Merge "Add output filename param to compresToFilePart"
-rw-r--r-- | ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt | 5 |
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()) } |