From 7c02fbc57439f5ab850b3f605df84e549174b11b Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 28 Jun 2018 11:49:55 +0200 Subject: testbeds: Abstract away use of http proxy server Certain testbeds use a proxy to access the outside world. Due to recent changes this was not working anymore. This takes a different approach to re-enable this. It simply adds the lines to /etc/profile after swap-in so that the proxy is added to every shell upon execution. --- rumba/executors/ssh.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'rumba/executors/ssh.py') diff --git a/rumba/executors/ssh.py b/rumba/executors/ssh.py index 6876204..a53b978 100644 --- a/rumba/executors/ssh.py +++ b/rumba/executors/ssh.py @@ -26,14 +26,12 @@ from rumba.model import Executor from rumba.ssh_support import execute_command, execute_commands, \ - copy_file_to_testbed, copy_file_from_testbed, execute_proxy_command, \ - execute_proxy_commands + copy_file_to_testbed, copy_file_from_testbed class SSHExecutor(Executor): - def __init__(self, testbed, use_proxy=False): + def __init__(self, testbed): self.testbed = testbed - self.use_proxy = use_proxy def execute_command(self, node, command, as_root=False, time_out=3): return self.execute_commands(node, [command], as_root, time_out) @@ -43,12 +41,8 @@ class SSHExecutor(Executor): if node.ssh_config.username != 'root': commands = list(map(lambda c: "sudo %s" % (c,), commands)) - if self.use_proxy: - return execute_proxy_commands(self, node.ssh_config, commands, - time_out) - else: - return execute_commands(self.testbed, node.ssh_config, commands, - time_out) + return execute_commands(self.testbed, node.ssh_config, commands, + time_out) def fetch_file(self, node, path, destination, sudo=False): copy_file_from_testbed(self.testbed, node.ssh_config, path, -- cgit v1.2.3