Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: server/hosts/abstract_ssh.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: server/hosts/abstract_ssh.py
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index 3d8d9e9b5c3fe6928e15aa126bac887a598cfbc3..3723c46b526d13da354d8930cded353c9658ea68 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -115,6 +115,17 @@ class AbstractSSHHost(SiteHost):
" ".join(sources), dest)
+ def _make_ssh_cmd(self, cmd):
+ """
+ Create a base ssh command string for the host which can be used
+ to run commands directly on the machine
+ """
+ base_cmd = make_ssh_command(user=self.user, port=self.port,
+ opts=self.master_ssh_option,
+ hosts_file=self.known_hosts_fd)
+
+ return '%s %s "%s"' % (base_cmd, self.hostname, utils.sh_escape(cmd))
+
def _make_scp_cmd(self, sources, dest):
"""
Given a list of source paths and a destination path, produces the
« cli/job.py ('K') | « server/control_segments/install ('k') | server/hosts/factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698