You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/12/29 16:16:02 UTC

[2/5] git commit: Modify _connect_and_run_deployment_script to return a Node object on success.

Modify _connect_and_run_deployment_script to return a Node object on success.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/805bb050
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/805bb050
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/805bb050

Branch: refs/heads/trunk
Commit: 805bb0503d302ee639406fdfe8dcc7787820671a
Parents: 8b88800
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Dec 29 15:03:39 2013 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Dec 29 15:03:39 2013 +0100

----------------------------------------------------------------------
 libcloud/compute/base.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/805bb050/libcloud/compute/base.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/base.py b/libcloud/compute/base.py
index 1bdadfd..491fa74 100644
--- a/libcloud/compute/base.py
+++ b/libcloud/compute/base.py
@@ -1305,6 +1305,9 @@ class NodeDriver(BaseDriver):
         """
         Establish an SSH connection to the node and run the provided deployment
         task.
+
+        :rtype: :class:`.Node`:
+        :return: Node instance on success.
         """
         ssh_client = SSHClient(hostname=ssh_hostname,
                                port=ssh_port, username=ssh_username,
@@ -1317,9 +1320,10 @@ class NodeDriver(BaseDriver):
                                               timeout=timeout)
 
         # Execute the deployment task
-        self._run_deployment_script(task=task, node=node,
-                                    ssh_client=ssh_client,
-                                    max_tries=max_tries)
+        node = self._run_deployment_script(task=task, node=node,
+                                           ssh_client=ssh_client,
+                                           max_tries=max_tries)
+        return node
 
     def _run_deployment_script(self, task, node, ssh_client, max_tries=3):
         """
@@ -1339,6 +1343,7 @@ class NodeDriver(BaseDriver):
                           before giving up. (default is 3)
         :type max_tries: ``int``
 
+        :rtype: :class:`.Node`
         :return: ``Node`` Node instance on success.
         """
         tries = 0