Return-Path: X-Original-To: apmail-libcloud-commits-archive@www.apache.org Delivered-To: apmail-libcloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85E5210952 for ; Wed, 8 Jan 2014 23:26:28 +0000 (UTC) Received: (qmail 8503 invoked by uid 500); 8 Jan 2014 23:26:28 -0000 Delivered-To: apmail-libcloud-commits-archive@libcloud.apache.org Received: (qmail 8428 invoked by uid 500); 8 Jan 2014 23:26:28 -0000 Mailing-List: contact commits-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list commits@libcloud.apache.org Received: (qmail 8387 invoked by uid 99); 8 Jan 2014 23:26:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2014 23:26:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A006F8283CE; Wed, 8 Jan 2014 23:26:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tomaz@apache.org To: commits@libcloud.apache.org Date: Wed, 08 Jan 2014 23:26:28 -0000 Message-Id: <1cee73a81de744f0bf0bfacb28538a20@git.apache.org> In-Reply-To: <9962055ea8b44ac8a315230efdcfd0f5@git.apache.org> References: <9962055ea8b44ac8a315230efdcfd0f5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] git commit: Some more docstring love. Some more docstring love. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3beba3a7 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3beba3a7 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3beba3a7 Branch: refs/heads/trunk Commit: 3beba3a713b327b3fe2dc11e5bb82631955307eb Parents: 9dca008 Author: Tomaz Muraus Authored: Thu Jan 9 00:03:09 2014 +0100 Committer: Tomaz Muraus Committed: Thu Jan 9 00:06:19 2014 +0100 ---------------------------------------------------------------------- libcloud/compute/ssh.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/3beba3a7/libcloud/compute/ssh.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py index baf5973..852b2f8 100644 --- a/libcloud/compute/ssh.py +++ b/libcloud/compute/ssh.py @@ -62,10 +62,12 @@ class BaseSSHClient(object): :keyword username: Username to use, defaults to root. :type password: ``str`` - :keyword password: Password to authenticate with. + :keyword password: Password to authenticate with or a password used + to unlock a private key if a password protected key + is used. - :type key: ``list`` - :keyword key: Private SSH keys to authenticate with. + :type key: ``str`` or ``list`` + :keyword key: A list of paths to the private key files to use. """ self.hostname = hostname self.port = port @@ -165,16 +167,14 @@ class ParamikoSSHClient(BaseSSHClient): def __init__(self, hostname, port=22, username='root', password=None, key=None, timeout=None): """ - Note #1 `password` and `key` arguments are not mutually exclusive and - you can specify both. If you specify both, authentication is attempted - in the following order: + Note #1: Authentication is always attempted in the following order: - - The key passed in (if any) + - The key passed in (if provided) - Any key we can find through an SSH agent - Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/ - - Plain username/password auth, if a password was given + - Plain username/password auth, if a password was given (if provided) - Note #2: If a password protected key is user, `password` argument + Note #2: If a password protected key is used, `password` argument represents a password which will be used to unlock the key file. """ super(ParamikoSSHClient, self).__init__(hostname, port, username,