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

fixed all parsing errors

parent 3787c955
version: '3'
services:
server:
image: salmant/ul_monitoring_server_container_image2
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:
image: salmant/monitoring_agent
deploy:
replicas: 20
depends_on:
- server
deploy: {replicas: 10}
depends_on: [server]
command: --monitoringServerIP=server
This diff is collapsed.
......@@ -22,12 +22,9 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials;
import org.apache.commons.io.FilenameUtils;
......
......@@ -117,7 +117,6 @@ def docker_check(vm, compose_name):
response_str+=line
json_dict = {}
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_response['nodes_info'] = json_dict
......
......@@ -170,7 +170,7 @@ def on_request(ch, method, props, body):
response["parameters"].append(par)
response = json.dumps(response)
#logger.info("Response: " + response)
logger.info("Response: " + response)
ch.basic_publish(exchange='',
......
......@@ -29,8 +29,14 @@ public class P2PConverter {
String provisionerScalingMode = "fixed";
for (Object element : vmList) {
Map<String, Object> map = (Map<String, Object>) element;
if (map.containsKey("scaling_mode")) {
Map<String, Object> map = null;
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");
if (!scalingMode.equals("single")) {
provisionerScalingMode = "scaling";
......@@ -85,7 +91,13 @@ public class P2PConverter {
boolean firstVM = true;
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;
switch (cloudProvider.trim().toLowerCase()) {
case "ec2":
......
......@@ -82,8 +82,8 @@ def handle_delivery(message):
if __name__ == "__main__":
# home = expanduser("~")
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml")
# planner.plan()
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/BEIA_cardif2.yml")
# print planner.plan()
print sys.argv
channel = init_chanel(sys.argv)
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