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

fixed wrong prop name

parent 513a8129
...@@ -84,7 +84,7 @@ public class ToscaHelper { ...@@ -84,7 +84,7 @@ public class ToscaHelper {
String ymlStr = objectMapper.writeValueAsString(toscaTemplate); String ymlStr = objectMapper.writeValueAsString(toscaTemplate);
File toscaTemplateFile = File.createTempFile("temp-toscaTemplate", ".yml"); File toscaTemplateFile = File.createTempFile("temp-toscaTemplate", ".yml");
FileUtils.writeByteArrayToFile(toscaTemplateFile, ymlStr.getBytes()); 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); String resp = api.uploadToscaTemplate(toscaTemplateFile);
id = Integer.valueOf(resp); id = Integer.valueOf(resp);
toscaTemplateFile.deleteOnExit(); toscaTemplateFile.deleteOnExit();
......
...@@ -51,12 +51,12 @@ services: ...@@ -51,12 +51,12 @@ services:
MONGO_HOST: mongo MONGO_HOST: mongo
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0 SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
ports: ports:
- "30001:8080" - "30000:8080"
sure-tosca: sure-tosca:
image: alogo53/sure-tosca:3.0.0 image: alogo53/sure-tosca:3.0.0
ports: ports:
- "8081:8081" - "30001:8081"
logspout: logspout:
ports: ports:
......
...@@ -80,7 +80,8 @@ class CloudStormService { ...@@ -80,7 +80,8 @@ class CloudStormService {
this.toscaTemplate = toscaTemplate; this.toscaTemplate = toscaTemplate;
cloudStormDBPath = properties.getProperty("cloud.storm.db.path"); cloudStormDBPath = properties.getProperty("cloud.storm.db.path");
cloudStormDAO = new CloudStormDAO(cloudStormDBPath); 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 = new ToscaHelper(sureToscaBasePath);
this.helper.uploadToscaTemplate(toscaTemplate); this.helper.uploadToscaTemplate(toscaTemplate);
this.objectMapper = new ObjectMapper(new YAMLFactory().disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER)); this.objectMapper = new ObjectMapper(new YAMLFactory().disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER));
......
...@@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; ...@@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.jcraft.jsch.JSchException;
import com.rabbitmq.client.AMQP; import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DefaultConsumer; import com.rabbitmq.client.DefaultConsumer;
...@@ -33,7 +32,6 @@ import java.util.logging.Level; ...@@ -33,7 +32,6 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import nl.uva.sne.drip.model.Message; import nl.uva.sne.drip.model.Message;
import nl.uva.sne.drip.model.tosca.ToscaTemplate; 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 { ...@@ -86,7 +84,7 @@ public class Consumer extends DefaultConsumer {
responceMessage.setToscaTemplate(toscaTemplate); responceMessage.setToscaTemplate(toscaTemplate);
} catch (Exception ex) { } catch (Exception ex) {
responceMessage = handleException(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 { } finally {
String response = objectMapper.writeValueAsString(responceMessage); 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