You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/01/05 01:12:15 UTC

svn commit: r895832 - in /incubator/libcloud/trunk: libcloud/drivers/slicehost.py test/test_slicehost.py

Author: pquerna
Date: Tue Jan  5 00:12:15 2010
New Revision: 895832

URL: http://svn.apache.org/viewvc?rev=895832&view=rev
Log:
Update slicehost for create_node API changes.

Modified:
    incubator/libcloud/trunk/libcloud/drivers/slicehost.py
    incubator/libcloud/trunk/test/test_slicehost.py

Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/slicehost.py?rev=895832&r1=895831&r2=895832&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/slicehost.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/slicehost.py Tue Jan  5 00:12:15 2010
@@ -73,7 +73,10 @@
     def list_images(self):
         return self._to_images(self.connection.request('/images.xml').object)
 
-    def create_node(self, name, image, size, **kwargs):
+    def create_node(self, **kwargs):
+        name = kwargs['name']
+        image = kwargs['image']
+        size = kwargs['size']
         uri = '/slices.xml'
 
         # create a slice obj

Modified: incubator/libcloud/trunk/test/test_slicehost.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_slicehost.py?rev=895832&r1=895831&r2=895832&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_slicehost.py (original)
+++ incubator/libcloud/trunk/test/test_slicehost.py Tue Jan  5 00:12:15 2010
@@ -93,7 +93,7 @@
     def test_create_node(self):
         image = NodeImage(id=11, name='ubuntu 8.10', driver=self.driver)
         size = NodeSize(1, '256 slice', None, None, None, None, driver=self.driver)
-        node = self.driver.create_node('slicetest', image, size)
+        node = self.driver.create_node(name='slicetest', image=image, size=size)
         self.assertEqual(node.name, 'slicetest')
 
 class SlicehostMockHttp(MockHttp):