diff options
| author | Sipke Vriend <sipke.vriend@xilinx.com> | 2014-01-28 08:25:09 +1000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:37 +0000 |
| commit | b3bb841fe624d10de2d7a798f85c3ae87b13ed50 (patch) | |
| tree | 1f5c19e20512378d10f2e2f5178c52010c9db15f | |
| parent | 51cccb7fb9affe1cc056015633fc8eb6860ed48c (diff) | |
| download | poky-b3bb841fe624d10de2d7a798f85c3ae87b13ed50.tar.gz | |
lib/oeqa: sshcontrol: Allow alternate port for SSHControl
Add an optional parameter to SSHControl so the user can specify
and alternate port to the default (22).
(From OE-Core rev: 091d395e43836575587112ee1696a18c401505bb)
Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/utils/sshcontrol.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py index 3e53ec3e89..891325048c 100644 --- a/meta/lib/oeqa/utils/sshcontrol.py +++ b/meta/lib/oeqa/utils/sshcontrol.py | |||
| @@ -13,7 +13,7 @@ import select | |||
| 13 | 13 | ||
| 14 | class SSHControl(object): | 14 | class SSHControl(object): |
| 15 | 15 | ||
| 16 | def __init__(self, ip=None, timeout=300, logfile=None): | 16 | def __init__(self, ip=None, timeout=300, logfile=None, port=None): |
| 17 | self.ip = ip | 17 | self.ip = ip |
| 18 | self.timeout = timeout | 18 | self.timeout = timeout |
| 19 | self._starttime = None | 19 | self._starttime = None |
| @@ -26,6 +26,8 @@ class SSHControl(object): | |||
| 26 | '-o', 'LogLevel=ERROR' | 26 | '-o', 'LogLevel=ERROR' |
| 27 | ] | 27 | ] |
| 28 | self.ssh = ['ssh', '-l', 'root'] + self.ssh_options | 28 | self.ssh = ['ssh', '-l', 'root'] + self.ssh_options |
| 29 | if port: | ||
| 30 | self.ssh = self.ssh + ['-p', str(port)] | ||
| 29 | 31 | ||
| 30 | def log(self, msg): | 32 | def log(self, msg): |
| 31 | if self.logfile: | 33 | if self.logfile: |
