libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1395435 - in /libcloud/trunk/libcloud: compute/drivers/rackspace.py test/compute/test_rackspace.py
Date Mon, 08 Oct 2012 02:06:16 GMT
Author: tomaz
Date: Mon Oct  8 02:06:16 2012
New Revision: 1395435

URL: http://svn.apache.org/viewvc?rev=1395435&view=rev
Log:
Set api_name for the us and uk next gen rackspace driver.

Modified:
    libcloud/trunk/libcloud/compute/drivers/rackspace.py
    libcloud/trunk/libcloud/test/compute/test_rackspace.py

Modified: libcloud/trunk/libcloud/compute/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/rackspace.py?rev=1395435&r1=1395434&r2=1395435&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/rackspace.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/rackspace.py Mon Oct  8 02:06:16 2012
@@ -142,8 +142,10 @@ class RackspaceNodeDriver(OpenStack_1_1_
 
         if datacenter in ['dfw', 'ord']:
             self.connectionCls.auth_url = AUTH_URL_US
+            self.api_name = 'rackspacenovaus'
         elif datacenter == 'lon':
             self.connectionCls.auth_url = AUTH_URL_UK
+            self.api_name = 'rackspacenovalon'
 
         self.connectionCls._auth_version = '2.0'
         self.connectionCls.get_endpoint_args = \

Modified: libcloud/trunk/libcloud/test/compute/test_rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/test_rackspace.py?rev=1395435&r1=1395434&r2=1395435&view=diff
==============================================================================
--- libcloud/trunk/libcloud/test/compute/test_rackspace.py (original)
+++ libcloud/trunk/libcloud/test/compute/test_rackspace.py Mon Oct  8 02:06:16 2012
@@ -146,6 +146,13 @@ class RackspaceNovaOrdTests(OpenStack_1_
         clear_pricing_data()
         self.node = self.driver.list_nodes()[1]
 
+    def test_list_sizes_pricing(self):
+        sizes = self.driver.list_sizes()
+
+        for size in sizes:
+            if size.ram > 256:
+                self.assertTrue(size.price > 0)
+
     def test_service_catalog(self):
         self.assertEqual('https://ord.servers.api.rackspacecloud.com/v2/1337',
                          self.driver.connection.get_endpoint())
@@ -173,6 +180,13 @@ class RackspaceNovaLonTests(OpenStack_1_
         clear_pricing_data()
         self.node = self.driver.list_nodes()[1]
 
+    def test_list_sizes_pricing(self):
+        sizes = self.driver.list_sizes()
+
+        for size in sizes:
+            if size.ram > 256:
+                self.assertTrue(size.price > 0)
+
     def test_service_catalog(self):
         self.assertEqual('https://lon.servers.api.rackspacecloud.com/v2/1337',
                          self.driver.connection.get_endpoint())



Mime
View raw message