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
e6c95725
Commit
e6c95725
authored
Feb 22, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We need to fix the bug where if we have sshkey or script and the tosca file is not there yet
parent
24f81ee7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
Consumer.java
.../main/java/nl/uva/sne/drip/drip/provisioner/Consumer.java
+10
-15
RPCServer.java
...main/java/nl/uva/sne/drip/drip/provisioner/RPCServer.java
+1
-1
No files found.
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/Consumer.java
View file @
e6c95725
...
...
@@ -305,9 +305,8 @@ public class Consumer extends DefaultConsumer {
private
void
changeKeyFilePath
(
String
toscaFilePath
,
String
newKeyFilePath
)
{
File
toscaFile
=
new
File
(
toscaFilePath
);
String
fileContent
=
""
;
try
{
BufferedReader
in
=
new
BufferedReader
(
new
FileReader
(
toscaFile
));
String
line
=
""
;
try
(
BufferedReader
in
=
new
BufferedReader
(
new
FileReader
(
toscaFile
)))
{
String
line
;
while
((
line
=
in
.
readLine
())
!=
null
)
{
if
(
line
.
contains
(
"publicKeyPath"
))
{
fileContent
+=
(
"publicKeyPath: "
+
newKeyFilePath
+
"\n"
);
...
...
@@ -315,11 +314,9 @@ public class Consumer extends DefaultConsumer {
fileContent
+=
(
line
+
"\n"
);
}
}
in
.
close
();
FileWriter
fw
=
new
FileWriter
(
toscaFilePath
,
false
);
fw
.
write
(
fileContent
);
fw
.
close
();
try
(
FileWriter
fw
=
new
FileWriter
(
toscaFilePath
,
false
))
{
fw
.
write
(
fileContent
);
}
}
catch
(
FileNotFoundException
e
)
{
// TODO Auto-generated catch block
Logger
.
getLogger
(
Consumer
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
e
);
...
...
@@ -327,13 +324,13 @@ public class Consumer extends DefaultConsumer {
// TODO Auto-generated catch block
Logger
.
getLogger
(
Consumer
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
e
);
}
}
private
void
changeGUIScriptFilePath
(
String
toscaFilePath
,
String
newScriptPath
)
{
File
toscaFile
=
new
File
(
toscaFilePath
);
String
fileContent
=
""
;
try
{
BufferedReader
in
=
new
BufferedReader
(
new
FileReader
(
toscaFile
));
try
(
BufferedReader
in
=
new
BufferedReader
(
new
FileReader
(
toscaFile
)))
{
String
line
;
while
((
line
=
in
.
readLine
())
!=
null
)
{
if
(
line
.
contains
(
"script"
))
{
...
...
@@ -344,11 +341,9 @@ public class Consumer extends DefaultConsumer {
fileContent
+=
(
line
+
"\n"
);
}
}
in
.
close
();
FileWriter
fw
=
new
FileWriter
(
toscaFilePath
,
false
);
fw
.
write
(
fileContent
);
fw
.
close
();
try
(
FileWriter
fw
=
new
FileWriter
(
toscaFilePath
,
false
))
{
fw
.
write
(
fileContent
);
}
}
catch
(
FileNotFoundException
e
)
{
// TODO Auto-generated catch block
Logger
.
getLogger
(
Consumer
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
e
);
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/RPCServer.java
View file @
e6c95725
...
...
@@ -31,7 +31,7 @@ import java.util.logging.Logger;
public
class
RPCServer
{
private
static
final
String
RPC_QUEUE_NAME
=
"provisioner_queue"
;
private
static
final
String
HOST
=
"172.17.0.
2
"
;
private
static
final
String
HOST
=
"172.17.0.
3
"
;
public
static
void
main
(
String
[]
argv
)
{
start
();
...
...
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