aboutsummaryrefslogtreecommitdiff
path: root/rumba/executors
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-06-28 11:49:55 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-06-28 13:08:10 +0200
commit7c02fbc57439f5ab850b3f605df84e549174b11b (patch)
treea4c752c8be66cf0e2ffa4b19cf1023f7be7bb136 /rumba/executors
parentd6b62e3d1c0653b50443ab91062127a60c0bbfdc (diff)
downloadrumba-7c02fbc57439f5ab850b3f605df84e549174b11b.tar.gz
rumba-7c02fbc57439f5ab850b3f605df84e549174b11b.zip
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.
Diffstat (limited to 'rumba/executors')
-rw-r--r--rumba/executors/ssh.py14
1 files changed, 4 insertions, 10 deletions
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,