Commit 047bc5da authored by Spiros Koulouzis's avatar Spiros Koulouzis

fixed wrong prop name

parent 513a8129
......@@ -84,7 +84,7 @@ public class ToscaHelper {
String ymlStr = objectMapper.writeValueAsString(toscaTemplate);
File toscaTemplateFile = File.createTempFile("temp-toscaTemplate", ".yml");
FileUtils.writeByteArrayToFile(toscaTemplateFile, ymlStr.getBytes());
Logger.getLogger(ToscaHelper.class.getName()).log(Level.INFO, "Uploading ToscaTemplate to sure-tosca service....");
Logger.getLogger(ToscaHelper.class.getName()).log(Level.INFO, "Uploading ToscaTemplate to sure-tosca service: {0}", api.getApiClient().getBasePath());
String resp = api.uploadToscaTemplate(toscaTemplateFile);
id = Integer.valueOf(resp);
toscaTemplateFile.deleteOnExit();
......
......@@ -51,12 +51,12 @@ services:
MONGO_HOST: mongo
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
ports:
- "30001:8080"
- "30000:8080"
sure-tosca:
image: alogo53/sure-tosca:3.0.0
ports:
- "8081:8081"
- "30001:8081"
logspout:
ports:
......
......@@ -80,7 +80,8 @@ class CloudStormService {
this.toscaTemplate = toscaTemplate;
cloudStormDBPath = properties.getProperty("cloud.storm.db.path");
cloudStormDAO = new CloudStormDAO(cloudStormDBPath);
String sureToscaBasePath = properties.getProperty("sure_tosca.base.path");
String sureToscaBasePath = properties.getProperty("sure-tosca.base.path");
Logger.getLogger(CloudStormService.class.getName()).log(Level.FINE, "sureToscaBasePath: {0}",sureToscaBasePath);
this.helper = new ToscaHelper(sureToscaBasePath);
this.helper.uploadToscaTemplate(toscaTemplate);
this.objectMapper = new ObjectMapper(new YAMLFactory().disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER));
......
......@@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.jcraft.jsch.JSchException;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DefaultConsumer;
......@@ -33,7 +32,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import nl.uva.sne.drip.model.Message;
import nl.uva.sne.drip.model.tosca.ToscaTemplate;
import nl.uva.sne.drip.sure.tosca.client.ApiException;
/**
*
......@@ -86,7 +84,7 @@ public class Consumer extends DefaultConsumer {
responceMessage.setToscaTemplate(toscaTemplate);
} catch (Exception ex) {
responceMessage = handleException(ex);
// Logger.getLogger(Consumer.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(Consumer.class.getName()).log(Level.SEVERE, null, ex);
} finally {
String response = objectMapper.writeValueAsString(responceMessage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment