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
3f57da61
Commit
3f57da61
authored
Mar 13, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added code to test
parent
72aa1b61
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
plannerInput2.json
doc/json_samples/plannerInput2.json
+1
-0
DRIPCaller.java
...api/src/main/java/nl/uva/sne/drip/api/rpc/DRIPCaller.java
+4
-0
rpc_server.py
drip-planner/rpc_server.py
+12
-7
No files found.
doc/json_samples/plannerInput2.json
0 → 100644
View file @
3f57da61
{
"creationDate"
:
1489428680809
,
"parameters"
:[{
"url"
:
null
,
"encoding"
:
"UTF-8"
,
"value"
:
"{
\"
topology_template
\"
:{
\"
node_templates
\"
:{
\"
2b0cf14b-91f4-4f83-ae02-48acd5226b68
\"
:{
\"
type
\"
:
\"
Switch.nodes.Compute
\"
,
\"
properties
\"
:{
\"
dockers
\"
:
\"
mogswitch/InputDistributor
\"
,
\"
domain
\"
:
\"
ec2.us-east-1.amazonaws.com
\"
,
\"
installation
\"
:null,
\"
name
\"
:
\"
2b0cf14b-91f4-4f83-ae02-48acd5226b68
\"
,
\"
script
\"
:
\"
/root/SWITCH/users/fran/files/1488469056493/GUI_script.sh
\"
,
\"
instanceId
\"
:
\"
i-0427a8aa1e93534bd
\"
,
\"
OStype
\"
:
\"
Ubuntu 16.04
\"
,
\"
public_address
\"
:
\"
34.207.155.161
\"
,
\"
role
\"
:
\"
slave
\"
,
\"
ethernet_port
\"
:[{
\"
subnet_name
\"
:
\"
s1
\"
,
\"
name
\"
:
\"
p1
\"
,
\"
address
\"
:
\"
192.168.10.12
\"
}],
\"
nodetype
\"
:
\"
t2.medium
\"
,
\"
subnet_name
\"
:
\"
d3d6b7ab-0299-40f4-bf73-4901a9bac1fd
\"
}},
\"
d3d6b7ab-0299-40f4-bf73-4901a9bac1fd
\"
:{
\"
type
\"
:
\"
Switch.nodes.VirtualNetwork
\"
,
\"
properties
\"
:{
\"
subnet
\"
:
\"
192.168.10.0
\"
,
\"
netmask
\"
:
\"
255.255.255.0
\"
,
\"
name
\"
:
\"
s1
\"
}},
\"
a86289cc-12f4-4f67-9aef-76ac78f6d752
\"
:{
\"
artifacts
\"
:{
\"
input_distributor_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
file
\"
:
\"
mogswitch/InputDistributor:1.0
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
}},
\"
requirements
\"
:[{
\"
monitored_by
\"
:
\"
e6cae4b0-be6e-427f-8315-1b90325ae9bf
\"
},{
\"
host
\"
:
\"
2b0cf14b-91f4-4f83-ae02-48acd5226b68
\"
}],
\"
type
\"
:
\"
Switch.nodes.Application.Container.Docker.MOG_InputDistributor
\"
,
\"
properties
\"
:{
\"
waitingTime
\"
:5,
\"
multicastAddrIP
\"
:
\"
255.2.2.0
\"
,
\"
QoS
\"
:{
\"
response_time
\"
:30},
\"
out_ports
\"
:{
\"
754f2eb9-61f6-467b-9c3d-d70170349d30
\"
:{
\"
type
\"
:
\"
out
\"
,
\"
port
\"
:
\"
1
\"
}},
\"
scaling_mode
\"
:
\"
single
\"
,
\"
ports_mapping
\"
:{
\"
port_mapping_0
\"
:{
\"
host_port
\"
:2000,
\"
container_port
\"
:2000}},
\"
multicastAddrPort
\"
:3000,
\"
videoWidth
\"
:176,
\"
inPort
\"
:2000,
\"
videoHeight
\"
:100}},
\"
8496a2eb-184c-4002-b67b-c14c8b6d4716
\"
:{
\"
type
\"
:
\"
Switch.nodes.MonitoringAgent
\"
,
\"
properties
\"
:{
\"
agent_id
\"
:null,
\"
probes
\"
:{
\"
CPU_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
cpuSystem_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuSystem
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuIdle_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuIdle
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuIOwait_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuIOwait
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuTotal_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_1
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:20},
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:80}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuTotal
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuUser_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuUser
\"
,
\"
unit
\"
:
\"
%
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
CPU
\"
},
\"
DiskStats_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
readkbps_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
readkbps
\"
,
\"
unit
\"
:
\"
KB/s
\"
},
\"
iotime_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:60}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
iotime
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
writekbps_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
writekbps
\"
,
\"
unit
\"
:
\"
KB/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
DiskStats
\"
},
\"
Disk_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
diskTotal_metric
\"
:{
\"
type
\"
:
\"
long
\"
,
\"
name
\"
:
\"
diskTotal
\"
,
\"
unit
\"
:
\"
MB
\"
},
\"
diskFree_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:500}},
\"
type
\"
:
\"
long
\"
,
\"
name
\"
:
\"
diskFree
\"
,
\"
unit
\"
:
\"
MB
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Disk
\"
},
\"
AppLevel_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
input_frame_rate_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:24}},
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
input_frame_rate
\"
,
\"
unit
\"
:
\"
frames/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
AppLevel
\"
,
\"
path
\"
:
\"
/probes/app_level.jar
\"
},
\"
StaticInfo_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
arch_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
arch
\"
},
\"
btime_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
btime
\"
},
\"
cpuNum_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuNum
\"
},
\"
os_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
}},
\"
static
\"
:true,
\"
name
\"
:
\"
StaticInfo
\"
},
\"
Network_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
netBytesIN_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netBytesIN
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netBytesOUT_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netBytesOUT
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netPacketsIN_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netPacketsIN
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netPacketsOUT_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netPacketsOUT
\"
,
\"
unit
\"
:
\"
bytes/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Network
\"
},
\"
Memory_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
memFree_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memFree
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memUsedPercent_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_1
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:20},
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:80}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
memUsedPercent
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
memTotal_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memTotal
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memSwapFree_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memSwapFree
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memUsed_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memUsed
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memSwapTotal_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memSwapTotal
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memCache_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memCache
\"
,
\"
unit
\"
:
\"
KB
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Memory
\"
}}}},
\"
550279b3-4d96-4b6f-9441-a27d151ded50
\"
:{
\"
artifacts
\"
:{
\"
monitoring_server_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
file
\"
:
\"
salmant/salman_monitoring_server_container_image
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
}},
\"
requirements
\"
:[{
\"
host
\"
:
\"
2133df17-be2f-41eb-830d-4cb5399bbc0a
\"
}],
\"
type
\"
:
\"
Switch.nodes.Application.Container.Docker.MonitoringServer
\"
,
\"
properties
\"
:{
\"
ports_mapping
\"
:{
\"
port_mapping_1
\"
:{
\"
host_port
\"
:4242,
\"
container_port
\"
:4242},
\"
port_mapping_0
\"
:{
\"
host_port
\"
:8080,
\"
container_port
\"
:8080},
\"
port_mapping_3
\"
:{
\"
host_port
\"
:7199,
\"
container_port
\"
:7199},
\"
port_mapping_2
\"
:{
\"
host_port
\"
:4245,
\"
container_port
\"
:4245},
\"
port_mapping_5
\"
:{
\"
host_port
\"
:7001,
\"
container_port
\"
:7001},
\"
port_mapping_4
\"
:{
\"
host_port
\"
:7000,
\"
container_port
\"
:7000},
\"
port_mapping_7
\"
:{
\"
host_port
\"
:9042,
\"
container_port
\"
:9042},
\"
port_mapping_6
\"
:{
\"
host_port
\"
:9160,
\"
container_port
\"
:9160},
\"
port_mapping_9
\"
:{
\"
host_port
\"
:61621,
\"
container_port
\"
:61621},
\"
port_mapping_8
\"
:{
\"
host_port
\"
:8012,
\"
container_port
\"
:8012}},
\"
scaling_mode
\"
:
\"
single
\"
,
\"
QoS
\"
:{
\"
response_time
\"
:50}}},
\"
119e5daa-1548-4842-a042-b18947bc879c
\"
:{
\"
type
\"
:
\"
Switch.nodes.Compute
\"
,
\"
properties
\"
:{
\"
dockers
\"
:
\"
mogswitch/ProxyTranscoder
\"
,
\"
domain
\"
:
\"
ec2.us-east-1.amazonaws.com
\"
,
\"
installation
\"
:null,
\"
name
\"
:
\"
119e5daa-1548-4842-a042-b18947bc879c
\"
,
\"
script
\"
:
\"
/root/SWITCH/users/fran/files/1488469056493/GUI_script.sh
\"
,
\"
instanceId
\"
:
\"
i-01207f6fc7bbbfa42
\"
,
\"
OStype
\"
:
\"
Ubuntu 16.04
\"
,
\"
public_address
\"
:
\"
34.207.64.189
\"
,
\"
role
\"
:
\"
master
\"
,
\"
ethernet_port
\"
:[{
\"
subnet_name
\"
:
\"
s1
\"
,
\"
name
\"
:
\"
p1
\"
,
\"
address
\"
:
\"
192.168.10.10
\"
}],
\"
nodetype
\"
:
\"
t2.medium
\"
,
\"
subnet_name
\"
:
\"
d3d6b7ab-0299-40f4-bf73-4901a9bac1fd
\"
}},
\"
469c812f-32ab-4159-be93-aab3957d6e19
\"
:{
\"
artifacts
\"
:{
\"
proxy_transcoder_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
file
\"
:
\"
mogswitch/ProxyTranscoder:1.0
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
}},
\"
requirements
\"
:[{
\"
monitored_by
\"
:
\"
8496a2eb-184c-4002-b67b-c14c8b6d4716
\"
},{
\"
host
\"
:
\"
119e5daa-1548-4842-a042-b18947bc879c
\"
}],
\"
type
\"
:
\"
Switch.nodes.Application.Container.Docker.MOG_ProxyTranscoder
\"
,
\"
properties
\"
:{
\"
multicastAddrPort
\"
:3000,
\"
QoS
\"
:{
\"
response_time
\"
:35},
\"
scaling_mode
\"
:
\"
single
\"
,
\"
in_ports
\"
:{
\"
7c1e270b-e888-420b-9c31-ba9947ef07bf
\"
:{
\"
type
\"
:
\"
in
\"
,
\"
port
\"
:
\"
1
\"
}},
\"
multicastAddrIP
\"
:
\"
255.2.2.0
\"
,
\"
ports_mapping
\"
:{
\"
port_mapping_0
\"
:{
\"
host_port
\"
:80,
\"
container_port
\"
:8081}},
\"
videoWidth
\"
:170,
\"
videoHeight
\"
:176}},
\"
e6cae4b0-be6e-427f-8315-1b90325ae9bf
\"
:{
\"
type
\"
:
\"
Switch.nodes.MonitoringAgent
\"
,
\"
properties
\"
:{
\"
agent_id
\"
:null,
\"
probes
\"
:{
\"
CPU_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
cpuSystem_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuSystem
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuIdle_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuIdle
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuIOwait_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuIOwait
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuTotal_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_1
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:20},
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:80}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuTotal
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
cpuUser_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
cpuUser
\"
,
\"
unit
\"
:
\"
%
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
CPU
\"
},
\"
DiskStats_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
readkbps_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
readkbps
\"
,
\"
unit
\"
:
\"
KB/s
\"
},
\"
iotime_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:60}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
iotime
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
writekbps_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
writekbps
\"
,
\"
unit
\"
:
\"
KB/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
DiskStats
\"
},
\"
Disk_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
diskTotal_metric
\"
:{
\"
type
\"
:
\"
long
\"
,
\"
name
\"
:
\"
diskTotal
\"
,
\"
unit
\"
:
\"
MB
\"
},
\"
diskFree_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:500}},
\"
type
\"
:
\"
long
\"
,
\"
name
\"
:
\"
diskFree
\"
,
\"
unit
\"
:
\"
MB
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Disk
\"
},
\"
AppLevel_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
output_frame_rate_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:24}},
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
output_frame_rate
\"
,
\"
unit
\"
:
\"
frames/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
AppLevel
\"
,
\"
path
\"
:
\"
/probes/app_level.jar
\"
},
\"
StaticInfo_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
arch_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
arch
\"
},
\"
btime_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
btime
\"
},
\"
cpuNum_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
cpuNum
\"
},
\"
os_metric
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
name
\"
:
\"
os
\"
}},
\"
static
\"
:true,
\"
name
\"
:
\"
StaticInfo
\"
},
\"
Network_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
netBytesIN_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netBytesIN
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netBytesOUT_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netBytesOUT
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netPacketsIN_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netPacketsIN
\"
,
\"
unit
\"
:
\"
bytes/s
\"
},
\"
netPacketsOUT_metric
\"
:{
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
netPacketsOUT
\"
,
\"
unit
\"
:
\"
bytes/s
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Network
\"
},
\"
Memory_Probe
\"
:{
\"
active
\"
:true,
\"
metrics
\"
:{
\"
memFree_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memFree
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memUsedPercent_metric
\"
:{
\"
thresholds
\"
:{
\"
threshold_1
\"
:{
\"
operator
\"
:
\"
less_than
\"
,
\"
value
\"
:20},
\"
threshold_0
\"
:{
\"
operator
\"
:
\"
greater_than
\"
,
\"
value
\"
:80}},
\"
type
\"
:
\"
double
\"
,
\"
name
\"
:
\"
memUsedPercent
\"
,
\"
unit
\"
:
\"
%
\"
},
\"
memTotal_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memTotal
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memSwapFree_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memSwapFree
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memUsed_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memUsed
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memSwapTotal_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memSwapTotal
\"
,
\"
unit
\"
:
\"
KB
\"
},
\"
memCache_metric
\"
:{
\"
type
\"
:
\"
integer
\"
,
\"
name
\"
:
\"
memCache
\"
,
\"
unit
\"
:
\"
KB
\"
}},
\"
static
\"
:false,
\"
name
\"
:
\"
Memory
\"
}}}},
\"
8d60f295-c18a-4f30-b3cd-1699226e5827
\"
:{
\"
type
\"
:
\"
Switch.nodes.Application.Connection
\"
,
\"
properties
\"
:{
\"
latency
\"
:500,
\"
QoS
\"
:{
\"
response_time
\"
:50},
\"
target
\"
:{
\"
netmask
\"
:
\"
255.255.255.0
\"
,
\"
component_name
\"
:
\"
469c812f-32ab-4159-be93-aab3957d6e19
\"
,
\"
port_name
\"
:
\"
7c1e270b-e888-420b-9c31-ba9947ef07bf
\"
,
\"
address
\"
:
\"
192.168.10.12
\"
},
\"
source
\"
:{
\"
netmask
\"
:
\"
255.255.255.0
\"
,
\"
component_name
\"
:
\"
a86289cc-12f4-4f67-9aef-76ac78f6d752
\"
,
\"
port_name
\"
:
\"
754f2eb9-61f6-467b-9c3d-d70170349d30
\"
,
\"
address
\"
:
\"
192.168.10.11
\"
},
\"
bandwidth
\"
:1000000}},
\"
2133df17-be2f-41eb-830d-4cb5399bbc0a
\"
:{
\"
type
\"
:
\"
Switch.nodes.Compute
\"
,
\"
properties
\"
:{
\"
dockers
\"
:
\"
salmant/salman_monitoring_server_container_image
\"
,
\"
domain
\"
:
\"
ec2.us-east-1.amazonaws.com
\"
,
\"
installation
\"
:null,
\"
name
\"
:
\"
2133df17-be2f-41eb-830d-4cb5399bbc0a
\"
,
\"
script
\"
:
\"
/root/SWITCH/users/fran/files/1488469056493/GUI_script.sh
\"
,
\"
instanceId
\"
:
\"
i-0b99400636083370c
\"
,
\"
OStype
\"
:
\"
Ubuntu 16.04
\"
,
\"
public_address
\"
:
\"
54.84.232.172
\"
,
\"
role
\"
:
\"
slave
\"
,
\"
ethernet_port
\"
:[{
\"
subnet_name
\"
:
\"
s1
\"
,
\"
name
\"
:
\"
p1
\"
,
\"
address
\"
:
\"
192.168.10.11
\"
}],
\"
nodetype
\"
:
\"
t2.medium
\"
,
\"
subnet_name
\"
:
\"
d3d6b7ab-0299-40f4-bf73-4901a9bac1fd
\"
}}}},
\"
artifact_types
\"
:{
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
:{
\"
derived_from
\"
:
\"
tosca.artifacts.Deployment.Image
\"
}},
\"
description
\"
:
\"
adadad
\"
,
\"
node_types
\"
:{
\"
Switch.nodes.Component
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Network
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.network.Network
\"
},
\"
Switch.nodes.Constraint
\"
:{
\"
properties
\"
:{
\"
QoS
\"
:{
\"
type
\"
:
\"
Switch.datatypes.QoS.AppComponent
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Compute
\"
:{
\"
properties
\"
:{
\"
dockers
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
},
\"
domain
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
installation
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
name
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
},
\"
script
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
public_address
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
instanceId
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
},
\"
ethernet_port
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.ethernet_port
\"
},
\"
required
\"
:false,
\"
type
\"
:
\"
list
\"
},
\"
role
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
OStype
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
nodetype
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
subnet_name
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Compute
\"
},
\"
Switch.nodes.VirtualNetwork
\"
:{
\"
properties
\"
:{
\"
subnet
\"
:{
\"
default
\"
:
\"
192.168.10.0
\"
,
\"
type
\"
:
\"
string
\"
},
\"
netmask
\"
:{
\"
default
\"
:
\"
255.255.255.0
\"
,
\"
type
\"
:
\"
string
\"
},
\"
name
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Application.Container.Docker.MOG_ProxyTranscoder
\"
:{
\"
artifacts
\"
:{
\"
proxy_transcoder_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
,
\"
file
\"
:
\"
mogswitch/ProxyTranscoder:1.0
\"
}},
\"
properties
\"
:{
\"
multicastAddrPort
\"
:{
\"
default
\"
:3000,
\"
type
\"
:
\"
integer
\"
},
\"
multicastAddrIP
\"
:{
\"
default
\"
:
\"
255.2.2.0
\"
,
\"
type
\"
:
\"
string
\"
},
\"
videoWidth
\"
:{
\"
default
\"
:176,
\"
type
\"
:
\"
integer
\"
},
\"
videoHeight
\"
:{
\"
default
\"
:100,
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
Switch.nodes.Application.Container.Docker
\"
},
\"
Switch.nodes.AdaptationProfile
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.MonitoringAgent
\"
:{
\"
requirements
\"
:[{
\"
monitor_server_endpoint
\"
:{
\"
node
\"
:
\"
Switch.nodes.Application.Container.Docker.MonitoringServer
\"
,
\"
capability
\"
:
\"
tosca.capabilities.Node
\"
,
\"
relationship
\"
:
\"
tosca.relationships.DependsOn
\"
}}],
\"
properties
\"
:{
\"
agent_id
\"
:{
\"
default
\"
:null,
\"
type
\"
:
\"
string
\"
},
\"
probes
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.monitoring.probe
\"
},
\"
type
\"
:
\"
map
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Requirement
\"
:{
\"
properties
\"
:{
\"
host
\"
:{
\"
type
\"
:
\"
Switch.datatypes.hw.host
\"
},
\"
os
\"
:{
\"
type
\"
:
\"
Switch.datatypes.hw.os
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.EventListener
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Application.Connection
\"
:{
\"
properties
\"
:{
\"
source
\"
:{
\"
type
\"
:
\"
Switch.datatypes.Application.Connection.EndPoint
\"
},
\"
bandwidth
\"
:{
\"
type
\"
:
\"
integer
\"
},
\"
multicast
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
Switch.datatypes.Network.Multicast
\"
},
\"
jitter
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
integer
\"
},
\"
target
\"
:{
\"
type
\"
:
\"
Switch.datatypes.Application.Connection.EndPoint
\"
},
\"
latency
\"
:{
\"
type
\"
:
\"
integer
\"
},
\"
QoS
\"
:{
\"
type
\"
:
\"
Switch.datatypes.QoS.AppComponent
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Application.Container.Docker
\"
:{
\"
requirements
\"
:[{
\"
monitored_by
\"
:{
\"
node
\"
:
\"
Switch.nodes.MonitoringAgent
\"
,
\"
capability
\"
:
\"
tosca.capabilities.Node
\"
,
\"
relationship
\"
:
\"
tosca.relationships.DependsOn
\"
}}],
\"
properties
\"
:{
\"
in_ports
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.port
\"
},
\"
required
\"
:false,
\"
type
\"
:
\"
map
\"
},
\"
out_ports
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.port
\"
},
\"
required
\"
:false,
\"
type
\"
:
\"
map
\"
},
\"
ports_mapping
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.port_mapping
\"
},
\"
type
\"
:
\"
map
\"
},
\"
scaling_mode
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
},
\"
QoS
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
Switch.datatypes.QoS.AppComponent
\"
}},
\"
derived_from
\"
:
\"
tosca.nodes.Container.Application
\"
},
\"
Switch.nodes.ExternalComponent
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
},
\"
Switch.nodes.Application.Container.Docker.MOG_InputDistributor
\"
:{
\"
artifacts
\"
:{
\"
input_distributor_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
,
\"
file
\"
:
\"
mogswitch/InputDistributor:1.0
\"
}},
\"
requirements
\"
:[{
\"
monitored_by
\"
:{
\"
node
\"
:
\"
Switch.nodes.MonitoringAgent
\"
,
\"
capability
\"
:
\"
tosca.capabilities.Node
\"
,
\"
relationship
\"
:
\"
tosca.relationships.DependsOn
\"
}}],
\"
properties
\"
:{
\"
waitingTime
\"
:{
\"
default
\"
:5,
\"
type
\"
:
\"
integer
\"
},
\"
multicastAddrIP
\"
:{
\"
default
\"
:
\"
255.2.2.0
\"
,
\"
type
\"
:
\"
string
\"
},
\"
multicastAddrPort
\"
:{
\"
default
\"
:3000,
\"
type
\"
:
\"
integer
\"
},
\"
videoWidth
\"
:{
\"
default
\"
:176,
\"
type
\"
:
\"
integer
\"
},
\"
inPort
\"
:{
\"
default
\"
:2000,
\"
type
\"
:
\"
integer
\"
},
\"
videoHeight
\"
:{
\"
default
\"
:100,
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
Switch.nodes.Application.Container.Docker
\"
},
\"
Switch.nodes.Application.Container.Docker.MonitoringServer
\"
:{
\"
artifacts
\"
:{
\"
monitoring_server_image
\"
:{
\"
type
\"
:
\"
tosca.artifacts.Deployment.Image.Container.Docker
\"
,
\"
repository
\"
:
\"
SWITCH_docker_hub
\"
,
\"
file
\"
:
\"
salmant/salman_monitoring_server_container_image
\"
}},
\"
properties
\"
:{
\"
ports_mapping
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.port_mapping
\"
},
\"
type
\"
:
\"
map
\"
}},
\"
derived_from
\"
:
\"
Switch.nodes.Application.Container.Docker
\"
},
\"
Switch.nodes.MessagePasser
\"
:{
\"
derived_from
\"
:
\"
tosca.nodes.Root
\"
}},
\"
repositories
\"
:{
\"
SWITCH_docker_hub
\"
:{
\"
url
\"
:
\"
https://github.com/switch-project
\"
,
\"
credential
\"
:{
\"
token_type
\"
:
\"
X-Auth-Token
\"
,
\"
token
\"
:
\"
604bbe45ac7143a79e14f3158df67091
\"
,
\"
protocol
\"
:
\"
xauth
\"
},
\"
description
\"
:
\"
switch repository in GitHub
\"
}},
\"
data_types
\"
:{
\"
Switch.datatypes.monitoring.metric.threshold
\"
:{
\"
properties
\"
:{
\"
operator
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
value
\"
:{
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.port
\"
:{
\"
properties
\"
:{
\"
type
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
port
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.Application.Connection.EndPoint
\"
:{
\"
properties
\"
:{
\"
netmask
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
component_name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
port_name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
address
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.monitoring.probe
\"
:{
\"
properties
\"
:{
\"
active
\"
:{
\"
type
\"
:
\"
boolean
\"
},
\"
path
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
},
\"
static
\"
:{
\"
type
\"
:
\"
boolean
\"
},
\"
name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
metrics
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.monitoring.metric
\"
},
\"
type
\"
:
\"
map
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.hw.host
\"
:{
\"
properties
\"
:{
\"
cpu_frequency
\"
:{
\"
type
\"
:
\"
float
\"
},
\"
mem_size
\"
:{
\"
type
\"
:
\"
integer
\"
},
\"
num_cpus
\"
:{
\"
type
\"
:
\"
integer
\"
},
\"
disk_size
\"
:{
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.ethernet_port
\"
:{
\"
properties
\"
:{
\"
subnet_name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
address
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.hw.os
\"
:{
\"
properties
\"
:{
\"
os_version
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
distribution
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
type
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
architecture
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.QoS.AppComponent
\"
:{
\"
properties
\"
:{
\"
response_time
\"
:{
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.Application.Connection.Multicast
\"
:{
\"
properties
\"
:{
\"
multicastAddrPort
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
multicastAddrIP
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.Network.Multicast
\"
:{
\"
properties
\"
:{
\"
multicastAddrPort
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
multicastAddrIP
\"
:{
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.port_mapping
\"
:{
\"
properties
\"
:{
\"
host_port
\"
:{
\"
type
\"
:
\"
integer
\"
},
\"
container_port
\"
:{
\"
type
\"
:
\"
integer
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
},
\"
Switch.datatypes.monitoring.metric
\"
:{
\"
properties
\"
:{
\"
thresholds
\"
:{
\"
entry_schema
\"
:{
\"
type
\"
:
\"
Switch.datatypes.monitoring.metric.threshold
\"
},
\"
required
\"
:false,
\"
type
\"
:
\"
map
\"
},
\"
type
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
name
\"
:{
\"
type
\"
:
\"
string
\"
},
\"
unit
\"
:{
\"
required
\"
:false,
\"
type
\"
:
\"
string
\"
}},
\"
derived_from
\"
:
\"
tosca.datatypes.Root
\"
}},
\"
tosca_definitions_version
\"
:
\"
tosca_simple_yaml_1_0
\"
}"
,
"name"
:
"input"
,
"attributes"
:
null
}]}
\ No newline at end of file
drip-api/src/main/java/nl/uva/sne/drip/api/rpc/DRIPCaller.java
View file @
3f57da61
...
...
@@ -8,6 +8,7 @@ import com.rabbitmq.client.Connection;
import
com.rabbitmq.client.ConnectionFactory
;
import
com.rabbitmq.client.DefaultConsumer
;
import
com.rabbitmq.client.Envelope
;
import
com.sun.xml.internal.fastinfoset.tools.StAX2SAXReader
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -130,6 +131,9 @@ public abstract class DRIPCaller implements AutoCloseable {
return
Converter
.
string2Message
(
clean
);
}
Logger
.
getLogger
(
DRIPCaller
.
class
.
getName
()).
log
(
Level
.
INFO
,
"Got: {0}"
,
clean
);
return
mapper
.
readValue
(
clean
,
Message
.
class
);
}
...
...
drip-planner/rpc_server.py
View file @
3f57da61
...
...
@@ -17,9 +17,9 @@ import json
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
'127.0.0.1'
))
channel
=
connection
.
channel
()
channel
.
queue_declare
(
queue
=
'planner_queue'
)
#
connection = pika.BlockingConnection(pika.ConnectionParameters(host='127.0.0.1'))
#
channel = connection.channel()
#
channel.queue_declare(queue='planner_queue')
...
...
@@ -145,8 +145,13 @@ def on_request(ch, method, props, body):
body
=
str
(
response
))
ch
.
basic_ack
(
delivery_tag
=
method
.
delivery_tag
)
channel
.
basic_qos
(
prefetch_count
=
1
)
channel
.
basic_consume
(
on_request
,
queue
=
'planner_queue'
)
#channel.basic_qos(prefetch_count=1)
#channel.basic_consume(on_request, queue='planner_queue')
#print(" [x] Awaiting RPC requests")
#channel.start_consuming()
f
=
open
(
"../doc/json_samples/plannerInput2.json"
,
"r"
)
body
=
f
.
read
()
response
=
handleDelivery
(
body
)
print
(
" [x] Awaiting RPC requests"
)
channel
.
start_consuming
()
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