Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
047bc5da
Commit
047bc5da
authored
Feb 07, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed wrong prop name
parent
513a8129
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
ToscaHelper.java
.../main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java
+1
-1
docker-compose.yml
docker-compose.yml
+3
-3
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+2
-1
Consumer.java
...r/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
+1
-3
No files found.
commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java
View file @
047bc5da
...
...
@@ -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
();
...
...
docker-compose.yml
View file @
047bc5da
...
...
@@ -51,12 +51,12 @@ services:
MONGO_HOST
:
mongo
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
ports
:
-
"
3000
1
:8080"
-
"
3000
0
:8080"
sure-tosca
:
image
:
alogo53/sure-tosca:3.0.0
ports
:
-
"
808
1:8081"
-
"
3000
1:8081"
logspout
:
ports
:
...
...
provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
047bc5da
...
...
@@ -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
));
...
...
provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
View file @
047bc5da
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment