Commit 09fd2c95 authored by Spiros Koulouzis's avatar Spiros Koulouzis

fixed all parsing errors

parent 3787c955
version: '3' version: '3'
services: services:
server: server:
image: salmant/ul_monitoring_server_container_image2 image: salmant/ul_monitoring_server_container_image2
ports: ports:
- "8080:8080/tcp" - "8080:8080"
- "4242:4242"
- "4245:4245"
- "7199:7199"
- "7000:7000"
- "7001:7001"
- "9160:9160"
- "9042:9042"
- "8012:8012"
- "61621:61621"
environment:
- "MONITORING_SERVER=server"
agent: agent:
image: salmant/monitoring_agent image: salmant/monitoring_agent
deploy: deploy: {replicas: 10}
replicas: 20 depends_on: [server]
depends_on:
- server
command: --monitoringServerIP=server command: --monitoringServerIP=server
This diff is collapsed.
...@@ -22,12 +22,9 @@ import java.io.InputStream; ...@@ -22,12 +22,9 @@ import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials; import nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
......
...@@ -117,7 +117,6 @@ def docker_check(vm, compose_name): ...@@ -117,7 +117,6 @@ def docker_check(vm, compose_name):
response_str+=line response_str+=line
json_dict = {} json_dict = {}
response_str = response_str.rstrip("\n\r").strip(' \t\n\r').strip().encode('string_escape') response_str = response_str.rstrip("\n\r").strip(' \t\n\r').strip().encode('string_escape')
print response_str
json_dict = json.loads(response_str) json_dict = json.loads(response_str)
json_response['nodes_info'] = json_dict json_response['nodes_info'] = json_dict
......
...@@ -170,7 +170,7 @@ def on_request(ch, method, props, body): ...@@ -170,7 +170,7 @@ def on_request(ch, method, props, body):
response["parameters"].append(par) response["parameters"].append(par)
response = json.dumps(response) response = json.dumps(response)
#logger.info("Response: " + response) logger.info("Response: " + response)
ch.basic_publish(exchange='', ch.basic_publish(exchange='',
......
...@@ -29,8 +29,14 @@ public class P2PConverter { ...@@ -29,8 +29,14 @@ public class P2PConverter {
String provisionerScalingMode = "fixed"; String provisionerScalingMode = "fixed";
for (Object element : vmList) { for (Object element : vmList) {
Map<String, Object> map = (Map<String, Object>) element; Map<String, Object> map = null;
if (map.containsKey("scaling_mode")) { if (element instanceof Map) {
map = (Map<String, Object>) element;
} else if (element instanceof String) {
map = Converter.jsonString2Map((String) element);
}
if (map != null && map.containsKey("scaling_mode")) {
String scalingMode = (String) map.get("scaling_mode"); String scalingMode = (String) map.get("scaling_mode");
if (!scalingMode.equals("single")) { if (!scalingMode.equals("single")) {
provisionerScalingMode = "scaling"; provisionerScalingMode = "scaling";
...@@ -85,7 +91,13 @@ public class P2PConverter { ...@@ -85,7 +91,13 @@ public class P2PConverter {
boolean firstVM = true; boolean firstVM = true;
for (Object element : vmList) { for (Object element : vmList) {
Map<String, Object> map = (Map<String, Object>) element; Map<String, Object> map = null;
if (element instanceof Map) {
map = (Map<String, Object>) element;
} else if (element instanceof String) {
map = Converter.jsonString2Map((String) element);
}
VM curVM; VM curVM;
switch (cloudProvider.trim().toLowerCase()) { switch (cloudProvider.trim().toLowerCase()) {
case "ec2": case "ec2":
......
...@@ -82,8 +82,8 @@ def handle_delivery(message): ...@@ -82,8 +82,8 @@ def handle_delivery(message):
if __name__ == "__main__": if __name__ == "__main__":
# home = expanduser("~") # home = expanduser("~")
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml") # planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/BEIA_cardif2.yml")
# planner.plan() # print planner.plan()
print sys.argv print sys.argv
channel = init_chanel(sys.argv) channel = init_chanel(sys.argv)
global queue_name global queue_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment