summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>2011-06-21 04:45:50 +0000
committerlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>2011-06-21 04:45:50 +0000
commit48d15a688996f69a6e1736421efecba63364960a (patch)
treedf66bb730a8711787c1dcb8f10bace35fe60e4c6
parent34d6576d80e6bc0cb36b697611c4661c09ecd0a1 (diff)
server/hosts/abstract_ssh.py: Allow for site extension of base ssh command
There have been several cases where we need to modify the SSH command line for Chrome OS. This patch adds site extensibility to the make_ssh_command function in abstract_ssh. Signed-off-by: Dale Curtis <dalecurtis@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5432 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r--server/hosts/abstract_ssh.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index 3723c46b..0f61391d 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -10,8 +10,8 @@ enable_master_ssh = get_value('AUTOSERV', 'enable_master_ssh', type=bool,
default=False)
-def make_ssh_command(user="root", port=22, opts='', hosts_file='/dev/null',
- connect_timeout=30, alive_interval=300):
+def _make_ssh_cmd_default(user="root", port=22, opts='', hosts_file='/dev/null',
+ connect_timeout=30, alive_interval=300):
base_command = ("/usr/bin/ssh -a -x %s -o StrictHostKeyChecking=no "
"-o UserKnownHostsFile=%s -o BatchMode=yes "
"-o ConnectTimeout=%d -o ServerAliveInterval=%d "
@@ -22,6 +22,11 @@ def make_ssh_command(user="root", port=22, opts='', hosts_file='/dev/null',
alive_interval, user, port)
+make_ssh_command = utils.import_site_function(
+ __file__, "autotest_lib.server.hosts.site_host", "make_ssh_command",
+ _make_ssh_cmd_default)
+
+
# import site specific Host class
SiteHost = utils.import_site_class(
__file__, "autotest_lib.server.hosts.site_host", "SiteHost",