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
5575312d
Commit
5575312d
authored
Feb 20, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update planner controller to save tosca result
parent
e4ff23bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
PlannerController.java
...main/java/nl/uva/sne/drip/api/rest/PlannerController.java
+9
-13
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/rest/PlannerController.java
View file @
5575312d
...
...
@@ -87,26 +87,22 @@ public class PlannerController {
dripComponetens
.
add
(
planner
);
Message
plannerReturnedMessage
=
planner
.
call
(
plannerInvokationMessage
);
List
<
Parameter
>
toscaFiles
=
plannerReturnedMessage
.
getParameters
();
ToscaRepresentation
tr
=
new
ToscaRepresentation
();
StringBuilder
name
=
new
StringBuilder
();
StringBuilder
value
=
new
StringBuilder
();
String
prefix
=
""
;
for
(
Parameter
p
:
toscaFiles
)
{
ToscaRepresentation
tr
=
new
ToscaRepresentation
();
Map
<
String
,
String
>
attributess
=
p
.
getAttributes
();
String
level
=
attributess
.
get
(
"level"
);
name
.
append
(
prefix
);
name
.
append
(
p
.
getName
());
value
.
append
(
p
.
getValue
());
value
.
append
(
"\n"
);
String
originalFileName
=
p
.
getName
();
String
name
=
System
.
currentTimeMillis
()
+
"_"
+
originalFileName
;
tr
.
setName
(
name
);
tr
.
setKvMap
(
Converter
.
ymlString2Map
(
p
.
getValue
()));
toscaDao
.
save
(
tr
);
}
tr
.
setName
(
name
.
toString
());
tr
.
setKvMap
(
Converter
.
ymlString2Map
(
toscaId
));
toscaDao
.
save
(
tr
);
// Message provisionerInvokationMessage = buildProvisionerMessage(plannerReturnedMessage, "58a7281c55363e65b3c9eb82");
// provisioner = new ProvisionerCaller(messageBrokerHost);
// dripComponetens.add(provisioner);
// provisioner.call(provisionerInvokationMessage);
return
tr
.
getId
();
return
""
;
//
tr.getId();
}
catch
(
JSONException
|
IOException
|
TimeoutException
|
InterruptedException
ex
)
{
Logger
.
getLogger
(
PlannerController
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
finally
{
...
...
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