libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1339977 - in /libcloud/trunk: CHANGES libcloud/compute/base.py
Date Fri, 18 May 2012 05:25:27 GMT
Author: tomaz
Date: Fri May 18 05:25:27 2012
New Revision: 1339977

URL: http://svn.apache.org/viewvc?rev=1339977&view=rev
Log:
Expose ssh_interface in the deploy_node method. part of LIBCLOUD-198.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/base.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1339977&r1=1339976&r2=1339977&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Fri May 18 05:25:27 2012
@@ -10,7 +10,7 @@ Changes with Apache Libcloud in developm
     - Add ex_register_iso method to the CloudStack driver. ; LIBCLOUD-196
       [Daemian Mack]
 
-    - Allow user to specify which IP to use when calling _wait_until_running.
+    - Allow user to specify which IP to use when calling deploy_node.
       (defaults to 'public_ips'). Previously it only worked with public IP, now
       user can pass 'private_ips' as an argument and SSH client will try to
       connect to the node first private IP address.

Modified: libcloud/trunk/libcloud/compute/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/base.py?rev=1339977&r1=1339976&r2=1339977&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/base.py (original)
+++ libcloud/trunk/libcloud/compute/base.py Fri May 18 05:25:27 2012
@@ -529,6 +529,10 @@ class NodeDriver(BaseDriver):
                                before giving up (default is 3)
         @type       max_tries: C{int}
 
+        @keyword    ssh_interface: The interface to wait for. Default is
+                                   'public_ips', other option is 'private_ips'.
+        @type       ssh_interface: C{str}
+
         See L{NodeDriver.create_node} for more keyword args.
 
         >>> from libcloud.compute.drivers.dummy import DummyNodeDriver
@@ -579,8 +583,10 @@ class NodeDriver(BaseDriver):
 
         try:
             # Wait until node is up and running and has IP assigned
-            node, ip_addresses = self._wait_until_running(
-                node=node, wait_period=3, timeout=NODE_ONLINE_WAIT_TIMEOUT)
+            ssh_interface = kwargs.get('ssh_interface', 'public_ips')
+            node, ip_addresses = self._wait_until_running(node=node,
+                    wait_period=3, timeout=NODE_ONLINE_WAIT_TIMEOUT,
+                    ssh_interface=ssh_interface)
 
             if password:
                 node.extra['password'] = password



Mime
View raw message