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
0a901fd8
Commit
0a901fd8
authored
Mar 07, 2018
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed deplyer json parsing bug
parent
bd6c5399
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
3 deletions
+8
-3
DeployService.java
.../main/java/nl/uva/sne/drip/api/service/DeployService.java
+1
-1
WADLController.java
...main/java/nl/uva/sne/drip/api/v1/rest/WADLController.java
+2
-1
docker_check.py
drip-deployer/docker_check.py
+5
-1
docker_check.pyc
drip-deployer/docker_check.pyc
+0
-0
docker_swarm.pyc
drip-deployer/docker_swarm.pyc
+0
-0
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/service/DeployService.java
View file @
0a901fd8
...
@@ -643,7 +643,7 @@ public class DeployService {
...
@@ -643,7 +643,7 @@ public class DeployService {
Map
<
String
,
Object
>
info
=
new
HashMap
();
Map
<
String
,
Object
>
info
=
new
HashMap
();
for
(
MessageParameter
param
:
params
)
{
for
(
MessageParameter
param
:
params
)
{
String
jsonResp
=
param
.
getValue
().
replaceAll
(
"^\"|\"$"
,
""
);
String
jsonResp
=
param
.
getValue
().
replaceAll
(
"^\"|\"$"
,
""
);
System
.
err
.
println
(
jsonResp
);
//
System.err.println(jsonResp);
Map
<
String
,
Object
>
kv
=
Converter
.
jsonString2Map
(
jsonResp
);
Map
<
String
,
Object
>
kv
=
Converter
.
jsonString2Map
(
jsonResp
);
info
.
putAll
(
kv
);
info
.
putAll
(
kv
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v1/rest/WADLController.java
View file @
0a901fd8
...
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
...
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
* @author S. Koulouzis
* @author S. Koulouzis
*/
*/
@Controller
@Controller
@RequestMapping
(
"/user/v1.0/
?wadl
"
)
@RequestMapping
(
"/user/v1.0/"
)
public
class
WADLController
{
public
class
WADLController
{
String
xs_namespace
=
"http://www.w3.org/2001/XMLSchema"
;
String
xs_namespace
=
"http://www.w3.org/2001/XMLSchema"
;
...
@@ -67,6 +67,7 @@ public class WADLController {
...
@@ -67,6 +67,7 @@ public class WADLController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
@RequestMapping
(
method
=
RequestMethod
.
GET
,
// consumes = MediaType.APPLICATION_XML_VALUE,
// consumes = MediaType.APPLICATION_XML_VALUE,
produces
=
MediaType
.
APPLICATION_XML_VALUE
)
produces
=
MediaType
.
APPLICATION_XML_VALUE
)
public
@ResponseBody
public
@ResponseBody
Application
generateWadl
(
HttpServletRequest
request
)
{
Application
generateWadl
(
HttpServletRequest
request
)
{
...
...
drip-deployer/docker_check.py
View file @
0a901fd8
...
@@ -74,6 +74,7 @@ def docker_check(vm, compose_name):
...
@@ -74,6 +74,7 @@ def docker_check(vm, compose_name):
cmd
=
'sudo docker stack ps '
+
compose_name
+
' --format '
+
services_format
cmd
=
'sudo docker stack ps '
+
compose_name
+
' --format '
+
services_format
logger
.
info
(
"Sending :"
+
cmd
)
logger
.
info
(
"Sending :"
+
cmd
)
stdin
,
stdout
,
stderr
=
ssh
.
exec_command
(
cmd
)
stdin
,
stdout
,
stderr
=
ssh
.
exec_command
(
cmd
)
stack_ps_resp
=
stdout
.
readlines
()
stack_ps_resp
=
stdout
.
readlines
()
services_info
=
[]
services_info
=
[]
...
@@ -90,6 +91,8 @@ def docker_check(vm, compose_name):
...
@@ -90,6 +91,8 @@ def docker_check(vm, compose_name):
json_dict
=
json
.
loads
(
json_dict
)
json_dict
=
json
.
loads
(
json_dict
)
except
Exception
as
e
:
except
Exception
as
e
:
json_dict
=
json_dict
.
replace
(
'
\"
ports
\"
:
\"\"
'
,
'
\"
ports
\"
:null'
)
.
replace
(
'
\"\"
'
,
'
\"
'
)
json_dict
=
json_dict
.
replace
(
'
\"
ports
\"
:
\"\"
'
,
'
\"
ports
\"
:null'
)
.
replace
(
'
\"\"
'
,
'
\"
'
)
json_dict
=
json_dict
.
replace
(
'
\"
node
\"
:
\"
,
\"
'
,
'
\"
node
\"
:null,
\"
'
)
.
replace
(
'
\"\"
'
,
'
\"
'
)
json_dict
=
json_dict
.
replace
(
"
\\
"
,
""
)
.
replace
(
"Noxe2x80xa6"
,
"No..."
)
json_dict
=
json_dict
.
replace
(
"
\\
"
,
""
)
.
replace
(
"Noxe2x80xa6"
,
"No..."
)
json_dict
=
json
.
loads
(
json_dict
)
json_dict
=
json
.
loads
(
json_dict
)
nodes_hostname
.
add
(
json_dict
[
'node'
])
nodes_hostname
.
add
(
json_dict
[
'node'
])
...
@@ -116,6 +119,7 @@ def docker_check(vm, compose_name):
...
@@ -116,6 +119,7 @@ def docker_check(vm, compose_name):
cmd
=
'sudo docker node inspect '
cmd
=
'sudo docker node inspect '
for
hostname
in
nodes_hostname
:
for
hostname
in
nodes_hostname
:
if
hostname
:
cmd
+=
' '
+
hostname
cmd
+=
' '
+
hostname
logger
.
info
(
"Sending :"
+
cmd
)
logger
.
info
(
"Sending :"
+
cmd
)
stdin
,
stdout
,
stderr
=
ssh
.
exec_command
(
cmd
)
stdin
,
stdout
,
stderr
=
ssh
.
exec_command
(
cmd
)
...
...
drip-deployer/docker_check.pyc
View file @
0a901fd8
No preview for this file type
drip-deployer/docker_swarm.pyc
View file @
0a901fd8
No preview for this file type
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