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 <[email protected]> --- server/hosts/abstract_ssh.py | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py index 3723c46..0f61391 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", -- 1.7.3.1
From 1d5b10a007efe396c19f98f07f327e7415257c6a Mon Sep 17 00:00:00 2001 From: Dale Curtis <[email protected]> Date: Mon, 20 Jun 2011 16:08:33 -0700 Subject: [PATCH 2/4] 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 <[email protected]> --- server/hosts/abstract_ssh.py | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py index 3723c46..0f61391 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", -- 1.7.3.1
_______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
