libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1355603 - in /libcloud/trunk: CHANGES libcloud/compute/drivers/cloudstack.py
Date Fri, 29 Jun 2012 23:35:14 GMT
Author: tomaz
Date: Fri Jun 29 23:35:13 2012
New Revision: 1355603

URL: http://svn.apache.org/viewvc?rev=1355603&view=rev
Log:
Fix a bug - If user doesn't pass in 'network_id' argument to the
create_node method in the CloudStack driver, don't explicitly define it. Part of
LIBCLOUD-219.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/drivers/cloudstack.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1355603&r1=1355602&r2=1355603&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Fri Jun 29 23:35:13 2012
@@ -61,6 +61,11 @@ Changes with Apache Libcloud in developm
     - Add Rackspace Nova London driver.
       [Chris Gilmer]
 
+    - Fix a bug - If user doesn't pass in 'network_id' argument to the
+      create_node method in the CloudStack driver, don't explicitly define it.
+      ; LIBCLOUD-219
+      [Bruno Mahé, Tomaz Muraus]
+
   *) DNS
 
     - Add support for GEO RecordType to Zerigo driver. ; LIBCLOUD-203

Modified: libcloud/trunk/libcloud/compute/drivers/cloudstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/cloudstack.py?rev=1355603&r1=1355602&r2=1355603&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/cloudstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/cloudstack.py Fri Jun 29 23:35:13 2012
@@ -220,14 +220,8 @@ class CloudStackNodeDriver(CloudStackDri
         extra_args = {}
         if location is None:
             location = self.list_locations()[0]
-
-        network_id = kwargs.pop('network_id', None)
-        if network_id is None:
-            networks = self._sync_request('listNetworks')
-
-            if networks:
-                extra_args['networkids'] = networks['network'][0]['id']
-        else:
+        
+        if 'network_id' in kwargs:
             extra_args['networkids'] = network_id
 
         result = self._async_request('deployVirtualMachine',



Mime
View raw message