summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2018-09-22 23:53:51 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2018-09-22 23:56:39 -0400
commitf3c53ad39bf85d8e808c3e53189f077ad7c95f47 (patch)
treee05cf2e9f75b7fa68eb89f001a51aad38ab6c4f4 /plugins
parent6931309e2969dbf7be71777f048dcab4830d1c05 (diff)
Add .casr suffix to downloaded csar file
SdcToscaParserFactory is looking file file type of .yaml .yml .zip or .csar As no suffix was provided, .tmp was being appended, hence the process was failing to parse the csar file. Change-Id: Ia87bb1e2402f94e44f6cbf3e28beb2adea52db4d Issue-ID: POLICY-1146 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
index 2ada9fcd..0d100f8f 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
@@ -260,7 +260,7 @@ public class SdcReceptionHandler extends AbstractReceptionHandler implements INo
final IDistributionClientDownloadResult resultArtifact) throws ArtifactDownloadException {
try {
final byte[] payloadBytes = resultArtifact.getArtifactPayload();
- final File tempArtifactFile = File.createTempFile(artifact.getArtifactName(), null);
+ final File tempArtifactFile = File.createTempFile(artifact.getArtifactName(), ".csar");
try (FileOutputStream fileOutputStream = new FileOutputStream(tempArtifactFile)) {
fileOutputStream.write(payloadBytes, 0, payloadBytes.length);
return tempArtifactFile.toPath();