Commit 405bd4d1 authored by Timothy Stack's avatar Timothy Stack

Fix the experiment.info() method so that it properly handles requests

for the "links" aspect in experiments with no links.
parent 3312f75c
......@@ -1049,8 +1049,10 @@ class experiment:
ipmap = {}
for res in dbres:
for ipinfo in string.split(res[1], " "):
port, ip = string.split(ipinfo, ":")
ipmap[res[0] + ":" + port] = ip
if len(ipinfo) > 0:
port, ip = string.split(ipinfo, ":")
ipmap[res[0] + ":" + port] = ip
pass
pass
pass
......@@ -1060,19 +1062,21 @@ class experiment:
"order by vname,member",
(argdict["proj"], argdict["exp"]))
for res in dbres:
tmp = {}
tmp["name"] = res[0]
tmp["member"] = res[1]
tmp["ipaddr"] = ipmap[res[1]]
tmp["mask"] = res[2]
tmp["delay"] = res[3]
tmp["bandwidth"] = int(res[4])
tmp["plr"] = res[5]
tmp["r_delay"] = res[6]
tmp["r_bandwidth"] = int(res[7])
tmp["r_plr"] = res[8]
result[res[1]] = tmp
if len(dbres) > 0:
for res in dbres:
tmp = {}
tmp["name"] = res[0]
tmp["member"] = res[1]
tmp["ipaddr"] = ipmap[res[1]]
tmp["mask"] = res[2]
tmp["delay"] = res[3]
tmp["bandwidth"] = int(res[4])
tmp["plr"] = res[5]
tmp["r_delay"] = res[6]
tmp["r_bandwidth"] = int(res[7])
tmp["r_plr"] = res[8]
result[res[1]] = tmp
pass
pass
pass
......
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