From 624a7885319ea71e0e1eef760d490871748d2967 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 25 Oct 2017 16:38:54 +0200 Subject: testbeds: Complete support for exogeni VMs on jfed Selecting "exogeni.net" as an authority for jfed should now work. --- rumba/testbeds/jfed.py | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'rumba/testbeds/jfed.py') diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py index 3235ca2..c79b1aa 100644 --- a/rumba/testbeds/jfed.py +++ b/rumba/testbeds/jfed.py @@ -55,7 +55,7 @@ class Testbed(mod.Testbed): username, passwd, proj_name, - http_proxy="https://proxy.atlantis.ugent.be:8080") + http_proxy=None) self.auth_name = authority self.cert_file = cert_file self.exp_hours = exp_hours @@ -67,7 +67,10 @@ class Testbed(mod.Testbed): if "exogeni" in authority: self.authority = "urn:publicid:IDN+" + authority + "+authority+am" - else: + elif "wall" in authority: + self.authority = "urn:publicid:IDN+" + authority + "+authority+cm" + self.http_proxy="https://proxy.atlantis.ugent.be:8080" + elif "cloudlab" in authority: self.authority = "urn:publicid:IDN+" + authority + "+authority+cm" if use_physical_machines is None: @@ -201,12 +204,9 @@ class Testbed(mod.Testbed): def swap_in(self, experiment): self.create_rspec(experiment) + auth_name_r = self.auth_name.replace(".", "-") + for node in experiment.nodes: - auth_name_r = self.auth_name.replace(".", "-") - node.ssh_config.hostname = \ - node.name + "." + self.exp_name + "." + \ - auth_name_r + "." + self.auth_name - node.ssh_config.proxy_server = "bastion.test.iminds.be" node.ssh_config.username = self.username node.ssh_config.password = self.password @@ -220,6 +220,14 @@ class Testbed(mod.Testbed): "-P", self.password, "-e", self.exp_hours]) + if "exogeni" in self.auth_name: + subprocess.call(["java", "-jar", self.jfed_jar, + "manifest", "-S", self.proj_name, + "-s", self.exp_name, + "-p", self.cert_file, + "--manifest", self.manifest, + "-P", self.password]) + rspec = xml.parse(self.manifest) xml_nodes = rspec.getElementsByTagName("node") @@ -239,6 +247,24 @@ class Testbed(mod.Testbed): if not got: logger.error("Not found node %s", n_name) + hostname=None + if "wall" in self.auth_name: + hostname = node_n.name + "." + self.exp_name + "." + \ + auth_name_r + "." + self.auth_name + node_n.ssh_config.proxy_server = "bastion.test.iminds.be" + + if "cloudlab" in self.auth_name: + hostname = node_n.name + "." + self.exp_name + "." + \ + auth_name_r + "." + self.auth_name + + if "exogeni" in self.auth_name: + for services_node in xml_node.getElementsByTagName("services"): + for login_node in services_node.getElementsByTagName("login"): + hostname = login_node.getAttribute("hostname") + break + + node_n.ssh_config.hostname = hostname + for intf in intfs: aux_mac_address = intf.getAttribute("mac_address") mac = ":".join( -- cgit v1.2.3