Commit a984715a authored by WorkflowPlanning's avatar WorkflowPlanning Committed by GitHub

Add files via upload

1. update the string of "u"
2. generate the output with the new json format with Huan
parent bb6dd32e
......@@ -105,8 +105,10 @@ def handleDelivery(message):
# convert the json to the file required
res1 = {}
for key, value in sorted_nodeDic:
print value, res[str(value)]
res1[nodeDic1[value]] = res[str(value)]
res1_value = {}
res1_value["size"] = res[str(value)]
res1_value["docker"] = json1[nodeDic1[value]].get('artifacts').get('docker_image').get('file')
res1[str(nodeDic1[value])] = res1_value
print res1
# generate the json files in the corresponding format as the
outcontent = {}
......
......@@ -33,7 +33,7 @@ def main(argv):
SDI_file = arg
data = {}
print workflow_file
#print workflow_file
with open(workflow_file) as data_file:
data = json.load(data_file)
#print data
......@@ -58,6 +58,7 @@ def main(argv):
#get the nodes from the json
nodeDic = {}
nodeDic1 = {}
i = 1
for j in json1:
if not json1[j]['type'] == "Switch.nodes.Application.Connection":
......@@ -118,7 +119,11 @@ def main(argv):
res1 = {}
for key, value in sorted_nodeDic:
print value, res[str(value)]
res1[nodeDic1[value]] = res[str(value)]
res1_value = {}
res1_value["size"] = res[str(value)]
res1_value["docker"] = json1[nodeDic1[value]].get('artifacts').get('docker_image').get('file')
res1[str(nodeDic1[value])] = res1_value
print res1
# generate the json files in the corresponding format as the
outcontent = {}
......@@ -130,6 +135,7 @@ def main(argv):
par1["value"] = res1
par1["attributes"] = "null"
outcontent["parameters"].append(par1)
#print outcontent
return outcontent
......
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