libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1461411 - in /libcloud/trunk: ./ CHANGES libcloud/compute/drivers/ec2.py libcloud/test/compute/test_ec2.py
Date Wed, 27 Mar 2013 04:32:24 GMT
Author: tomaz
Date: Wed Mar 27 04:32:24 2013
New Revision: 1461411

URL: http://svn.apache.org/r1461411
Log:
Merge commits from 0.12.x branch.

Modified:
    libcloud/trunk/   (props changed)
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/drivers/ec2.py
    libcloud/trunk/libcloud/test/compute/test_ec2.py

Propchange: libcloud/trunk/
------------------------------------------------------------------------------
  Merged /libcloud/branches/0.12.x:r1461385-1461410

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1461411&r1=1461410&r2=1461411&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Wed Mar 27 04:32:24 2013
@@ -13,6 +13,10 @@ Changes with Apache Libcloud in developm
       default one doesn't work. (LIBCLOUD-309)
       [Chris Psaltis, Tomaz Muraus]
 
+    - Fix a bug in EC2 list_locations method - 'name' attribute didn't contain a
+      the right value.
+      [Tomaz Muraus]
+
 Changes with Apache Libcloud 0.12.3:
 
   *) General

Modified: libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1461411&r1=1461410&r2=1461411&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ec2.py Wed Mar 27 04:32:24 2013
@@ -348,7 +348,7 @@ class EC2NodeLocation(NodeLocation):
         return (('<EC2NodeLocation: id=%s, name=%s, country=%s, '
                  'availability_zone=%s driver=%s>')
                 % (self.id, self.name, self.country,
-                   self.availability_zone.name, self.driver.name))
+                   self.availability_zone, self.driver.name))
 
 
 class EC2Response(AWSBaseResponse):
@@ -672,7 +672,7 @@ class BaseEC2NodeDriver(NodeDriver):
         for index, availability_zone in \
                 enumerate(self.ex_list_availability_zones()):
                     locations.append(EC2NodeLocation(
-                        index, availability_zone, self.country, self,
+                        index, availability_zone.name, self.country, self,
                         availability_zone)
                     )
         return locations

Modified: libcloud/trunk/libcloud/test/compute/test_ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/test_ec2.py?rev=1461411&r1=1461410&r2=1461411&view=diff
==============================================================================
--- libcloud/trunk/libcloud/test/compute/test_ec2.py (original)
+++ libcloud/trunk/libcloud/test/compute/test_ec2.py Wed Mar 27 04:32:24 2013
@@ -28,6 +28,7 @@ from libcloud.compute.drivers.ec2 import
 from libcloud.compute.drivers.ec2 import NimbusNodeDriver, EucNodeDriver
 from libcloud.compute.drivers.ec2 import IdempotentParamError
 from libcloud.compute.drivers.ec2 import REGION_DETAILS
+from libcloud.compute.drivers.ec2 import ExEC2AvailabilityZone
 from libcloud.utils.py3 import urlparse
 from libcloud.compute.base import Node, NodeImage, NodeSize, NodeLocation
 from libcloud.compute.base import StorageVolume
@@ -172,7 +173,10 @@ class EC2Tests(LibcloudTestCase, TestCas
     def test_list_location(self):
         locations = self.driver.list_locations()
         self.assertTrue(len(locations) > 0)
+        self.assertEqual(locations[0].name, 'eu-west-1a')
         self.assertTrue(locations[0].availability_zone != None)
+        self.assertTrue(isinstance(locations[0].availability_zone,
+                                   ExEC2AvailabilityZone))
 
     def test_list_security_groups(self):
         groups = self.driver.ex_list_security_groups()



Mime
View raw message