All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

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,10 +1049,12 @@ class experiment: ...@@ -1049,10 +1049,12 @@ class experiment:
ipmap = {} ipmap = {}
for res in dbres: for res in dbres:
for ipinfo in string.split(res[1], " "): for ipinfo in string.split(res[1], " "):
if len(ipinfo) > 0:
port, ip = string.split(ipinfo, ":") port, ip = string.split(ipinfo, ":")
ipmap[res[0] + ":" + port] = ip ipmap[res[0] + ":" + port] = ip
pass pass
pass pass
pass
dbres = DBQuery("select vname,member,mask,delay,bandwidth, " dbres = DBQuery("select vname,member,mask,delay,bandwidth, "
" lossrate,rdelay,rbandwidth,rlossrate " " lossrate,rdelay,rbandwidth,rlossrate "
...@@ -1060,6 +1062,7 @@ class experiment: ...@@ -1060,6 +1062,7 @@ class experiment:
"order by vname,member", "order by vname,member",
(argdict["proj"], argdict["exp"])) (argdict["proj"], argdict["exp"]))
if len(dbres) > 0:
for res in dbres: for res in dbres:
tmp = {} tmp = {}
tmp["name"] = res[0] tmp["name"] = res[0]
...@@ -1075,6 +1078,7 @@ class experiment: ...@@ -1075,6 +1078,7 @@ class experiment:
result[res[1]] = tmp result[res[1]] = tmp
pass pass
pass pass
pass
return EmulabResponse(RESPONSE_SUCCESS, return EmulabResponse(RESPONSE_SUCCESS,
value=result, output=str(result)) value=result, output=str(result))
......
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