From: Sipke Vriend Date: Mon, 27 Jan 2014 22:25:09 +0000 (+1000) Subject: lib/oeqa: sshcontrol: Allow alternate port for SSHControl X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~34730 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=091d395e43836575587112ee1696a18c401505bb;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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). Signed-off-by: Sipke Vriend Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py index 3e53ec3e892..891325048c4 100644 --- a/meta/lib/oeqa/utils/sshcontrol.py +++ b/meta/lib/oeqa/utils/sshcontrol.py @@ -13,7 +13,7 @@ import select class SSHControl(object): - def __init__(self, ip=None, timeout=300, logfile=None): + def __init__(self, ip=None, timeout=300, logfile=None, port=None): self.ip = ip self.timeout = timeout self._starttime = None @@ -26,6 +26,8 @@ class SSHControl(object): '-o', 'LogLevel=ERROR' ] self.ssh = ['ssh', '-l', 'root'] + self.ssh_options + if port: + self.ssh = self.ssh + ['-p', str(port)] def log(self, msg): if self.logfile: