TransRead: add support for ssh:// URLs
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 3 Jun 2013 12:47:37 +0000 (15:47 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 3 Jun 2013 12:47:37 +0000 (15:47 +0300)
commitb7fe5d51c6fc197388dc7b96578c2c3b8f0b86b5
tree16a01181df67d1aba6aed2825de3739be0cf7dfb
parentfc7ebf238bb9f7af1c91feb843548ed3ed9c48eb
TransRead: add support for ssh:// URLs

This patch adds support for flashing from an SSH source. I need this
functionality, for example, when I build images on a remote host, but flash
them locally, and I want bmaptool to read the image directly from the SSH
host.

Unfortunately, liburl2 does not support ssh:// URLs, and there seem to be no
standard python libraries for such URLs. There is a "paramiko" python module,
but it is not a standard part of python, and not at least Tizen does not have
it, so I do not want to use it.

Thus, I use the system 'ssh' tool directly. Note, the paramiko module actually
does the same.

Both password and key authentication types are supported. In order to use
password authentication, the password has to be passed via URL:

bmaptool copy ssh://user:pass@host:path destination

If the URL does not contain a password, we assume key-based authentication is
configured.

Change-Id: Ief72b5bf9adc3e67f25009dc47a90767741826eb
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/TransRead.py