diff options
-rw-r--r-- | rumba/testbeds/emulab.py | 5 | ||||
-rw-r--r-- | rumba/testbeds/jfed.py | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/rumba/testbeds/emulab.py b/rumba/testbeds/emulab.py index c696fbb..971202b 100644 --- a/rumba/testbeds/emulab.py +++ b/rumba/testbeds/emulab.py @@ -42,6 +42,7 @@ class Testbed(mod.Testbed): mod.Testbed.__init__(self, exp_name, username, password, proj_name) self.url = url self.image = image + self.ip = dict() def ops_server(self): ''' @@ -219,7 +220,7 @@ class Testbed(mod.Testbed): continue for ipcp in node.ipcps: if ipcp.dif.name == link_name: - ipcp.ip = link_ip + self.ip[ipcp] = link_ip for node in experiment.nodes: cmd = 'cat /var/emulab/boot/ifmap' @@ -230,7 +231,7 @@ class Testbed(mod.Testbed): item = item.split() for ipcp in node.ipcps: if type(ipcp) is mod.ShimEthIPCP: - if ipcp.ip == item[1]: + if self.ip[ipcp] == item[1]: ipcp.ifname = item[0] node.full_name = self.full_name(node.name) diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py index 04c57ba..4a36d4a 100644 --- a/rumba/testbeds/jfed.py +++ b/rumba/testbeds/jfed.py @@ -34,6 +34,7 @@ class Testbed(mod.Testbed): self.cert_file = cert_file self.jfed_jar = jfed_jar self.exp_hours = exp_hours + self.if_id = dict() def create_rspec(self, experiment): self.rspec = self.exp_name + ".rspec" @@ -81,8 +82,8 @@ class Testbed(mod.Testbed): for ipcp in node.ipcps: if type(ipcp) is mod.ShimEthIPCP: el3 = doc.createElement("interface") - ipcp.if_id = node.name + ":if" + str(node.ifs) - el3.setAttribute("client_id", ipcp.if_id) + self.if_id[ipcp] = node.name + ":if" + str(node.ifs) + el3.setAttribute("client_id", self.if_id[ipcp]) node.ifs += 1 el.appendChild(el3) @@ -98,7 +99,7 @@ class Testbed(mod.Testbed): for ipcp in dif.ipcps: el3 = doc.createElement("interface_ref") - el3.setAttribute("client_id", ipcp.if_id) + el3.setAttribute("client_id", self.if_id[ipcp]) el.appendChild(el3) file = open(self.rspec, "w") @@ -140,7 +141,7 @@ class Testbed(mod.Testbed): i_name = intf.getAttribute("client_id") for ipcp in node_n.ipcps: if type(ipcp) is mod.ShimEthIPCP: - if ipcp.if_id == i_name: + if self.if_id[ipcp] == i_name: comp_id = intf.getAttribute("component_id") comp_arr = comp_id.split(":") ipcp.ifname = comp_arr[-1] |