Author: tomaz
Date: Mon Aug 20 00:38:50 2012
New Revision: 1374884
URL: http://svn.apache.org/viewvc?rev=1374884&view=rev
Log:
Allow user to pass 'timeout' kwarg to the 'deploy_node' method.
Modified:
libcloud/trunk/CHANGES
libcloud/trunk/libcloud/compute/base.py
Modified: libcloud/trunk/CHANGES
URL:
http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1374884&r1=1374883&r2=1374884&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Mon Aug 20 00:38:50 2012
@@ -11,6 +11,9 @@ Changes with Apache Libcloud in developm
LIBCLOUD-239
[Michal Galet]
+ - Allow user to pass 'timeout' argument to the 'deploy_node' method.
+ [Tomaz Muraus]
+
*) Storage
- Add the following new methods to the CloudFiles driver:
Modified: libcloud/trunk/libcloud/compute/base.py
URL:
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/base.py?rev=1374884&r1=1374883&r2=1374884&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/base.py (original)
+++ libcloud/trunk/libcloud/compute/base.py Mon Aug 20 00:38:50 2012
@@ -607,6 +607,10 @@ class NodeDriver(BaseDriver):
to attempt to authenticate. (optional)
@type ssh_key: C{str} or C{list} of C{str}
+ @keyword timeout: How many seconds to wait before timing out.
+ (default is 600)
+ @type timeout: C{int}
+
@keyword max_tries: How many times to retry if a deployment fails
before giving up (default is 3)
@type max_tries: C{int}
@@ -658,6 +662,7 @@ class NodeDriver(BaseDriver):
ssh_port = kwargs.get('ssh_port', 22)
ssh_timeout = kwargs.get('ssh_timeout', 10)
ssh_key_file = kwargs.get('ssh_key', None)
+ timeout = kwargs.get('timeout', SSH_CONNECT_TIMEOUT)
ssh_client = SSHClient(hostname=ip_addresses[0],
port=ssh_port, username=ssh_username,
@@ -667,7 +672,7 @@ class NodeDriver(BaseDriver):
# Connect to the SSH server running on the node
ssh_client = self._ssh_client_connect(ssh_client=ssh_client,
- timeout=SSH_CONNECT_TIMEOUT)
+ timeout=timeout)
# Execute the deployment task
self._run_deployment_script(task=kwargs['deploy'],