RUN addgroup -S appgroup
RUN adduser -S appuser -G appgroup
+RUN mkdir temptoscafile
+RUN chown appuser:appgroup temptoscafile/
COPY src/main/resources/certificate /certs
ARG CERT_PASS=changeit
String callUrl = sdcGetUrl.replace("{id}", id);
UriComponentsBuilder callURLFormated = UriComponentsBuilder.fromHttpUrl(callUrl);
-
ResponseEntity<Object> response = callSdc(callURLFormated.build().encode().toUri());
return (LinkedHashMap) response.getBody();
UriComponentsBuilder callURI = UriComponentsBuilder.fromHttpUrl(urlBuilder.toString());
+ File directory = new File("temptoscafile");
+ if (! directory.exists()){
+ directory.mkdir();
+ }
- String fileName = System.currentTimeMillis() + "tosca.csar";
+ String fileName = "temptoscafile/"+System.currentTimeMillis() + "tosca.csar";
ResponseEntity<byte[]> response = callSdcWithAttachment(callURI.build().encode().toUri());
File toscaFile = new File(fileName);
try {
private ResponseEntity<Object> callSdc(URI callURI) {
ResponseEntity<Object> response =
restTemplate.exchange(callURI, HttpMethod.GET, buildRequestHeader(), Object.class);
+
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("response body : {} ",response.getBody().toString());
}