libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1412403 - in /libcloud/trunk: CHANGES libcloud/compute/drivers/ec2.py libcloud/compute/providers.py libcloud/compute/types.py libcloud/data/pricing.json libcloud/test/compute/test_ec2.py
Date Thu, 22 Nov 2012 01:21:07 GMT
Author: tomaz
Date: Thu Nov 22 01:21:05 2012
New Revision: 1412403

URL: http://svn.apache.org/viewvc?rev=1412403&view=rev
Log:
Add a new driver for new Asia Pacific (Sydney) EC2 region. Part of LIBCLOUD-264.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/drivers/ec2.py
    libcloud/trunk/libcloud/compute/providers.py
    libcloud/trunk/libcloud/compute/types.py
    libcloud/trunk/libcloud/data/pricing.json
    libcloud/trunk/libcloud/test/compute/test_ec2.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Thu Nov 22 01:21:05 2012
@@ -65,6 +65,9 @@ Changes with Apache Libcloud in developm
      content-length header in VCloud driver. ; LIBCLOUD-256
      [Brian DeGeeter, Tomaz Muraus]
 
+   - Add a new driver for new Asia Pacific (Sydney) EC2 region.
+     [Tomaz Muraus]
+
   *) Storage
 
     - Add a new local storage driver.

Modified: libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ec2.py Thu Nov 22 01:21:05 2012
@@ -279,9 +279,24 @@ REGION_DETAILS = {
 
         ]
     },
+    'ap-southeast-2': {
+        'endpoint': 'ec2.ap-southeast-2.amazonaws.com',
+        'instance_types': [
+            't1.micro',
+            'm1.small',
+            'm1.medium',
+            'm1.large',
+            'm1.xlarge',
+            'm2.xlarge',
+            'm2.2xlarge',
+            'm2.4xlarge',
+            'c1.medium',
+            'c1.xlarge'
+        ]
+    },
     'nimbus': {
-        # Nimbus clouds have 3 EC2-style instance types but their particular RAM
-        # allocations are configured by the admin
+        # Nimbus clouds have 3 EC2-style instance types but their particular
+        # RAM allocations are configured by the admin
         'instance_types': [
             'm1.small',
             'm1.large',
@@ -1434,7 +1449,7 @@ class EC2USWestOregonNodeDriver(EC2NodeD
 
 class EC2APSEConnection(EC2Connection):
     """
-    Connection class for EC2 in the Southeast Asia Pacific Region
+    Connection class for EC2 in the Southeast Asia Pacific Region.
     """
 
     host = REGION_DETAILS['ap-southeast-1']['endpoint']
@@ -1442,7 +1457,7 @@ class EC2APSEConnection(EC2Connection):
 
 class EC2APNEConnection(EC2Connection):
     """
-    Connection class for EC2 in the Northeast Asia Pacific Region
+    Connection class for EC2 in the Northeast Asia Pacific Region.
     """
 
     host = REGION_DETAILS['ap-northeast-1']['endpoint']
@@ -1450,7 +1465,7 @@ class EC2APNEConnection(EC2Connection):
 
 class EC2APSENodeDriver(EC2NodeDriver):
     """
-    Driver class for EC2 in the Southeast Asia Pacific Region
+    Driver class for EC2 in the Southeast Asia Pacific Region.
     """
 
     api_name = 'ec2_ap_southeast'
@@ -1463,7 +1478,7 @@ class EC2APSENodeDriver(EC2NodeDriver):
 
 class EC2APNENodeDriver(EC2NodeDriver):
     """
-    Driver class for EC2 in the Northeast Asia Pacific Region
+    Driver class for EC2 in the Northeast Asia Pacific Region.
     """
 
     api_name = 'ec2_ap_northeast'
@@ -1476,7 +1491,7 @@ class EC2APNENodeDriver(EC2NodeDriver):
 
 class EC2SAEastConnection(EC2Connection):
     """
-    Connection class for EC2 in the South America (Sao Paulo) Region
+    Connection class for EC2 in the South America (Sao Paulo) Region.
     """
 
     host = REGION_DETAILS['sa-east-1']['endpoint']
@@ -1484,7 +1499,7 @@ class EC2SAEastConnection(EC2Connection)
 
 class EC2SAEastNodeDriver(EC2NodeDriver):
     """
-    Driver class for EC2 in the South America (Sao Paulo) Region
+    Driver class for EC2 in the South America (Sao Paulo) Region.
     """
 
     api_name = 'ec2_sa_east'
@@ -1495,6 +1510,27 @@ class EC2SAEastNodeDriver(EC2NodeDriver)
     connectionCls = EC2SAEastConnection
 
 
+class EC2APSESydneyConnection(EC2Connection):
+    """
+    Connection class for EC2 in the Southeast Asia Pacific (Sydney) Region.
+    """
+
+    host = REGION_DETAILS['ap-southeast-2']['endpoint']
+
+
+class EC2APSESydneyNodeDriver(EC2NodeDriver):
+    """
+    Driver class for EC2 in the Southeast Asia Pacific (Sydney) Region.
+    """
+
+    api_name = 'ec2_ap_southeast_2'
+    name = 'Amazon EC2 (ap-southeast-2)'
+    friendly_name = 'Amazon Asia-Pacific Sydney'
+    country = 'AU'
+    region_name = 'ap-southeast-2'
+    connectionCls = EC2APSESydneyConnection
+
+
 class EucConnection(EC2Connection):
     """
     Connection class for Eucalyptus

Modified: libcloud/trunk/libcloud/compute/providers.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/providers.py?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/providers.py (original)
+++ libcloud/trunk/libcloud/compute/providers.py Thu Nov 22 01:21:05 2012
@@ -43,6 +43,8 @@ DRIVERS = {
         ('libcloud.compute.drivers.ec2', 'EC2APNENodeDriver'),
     Provider.EC2_SA_EAST:
         ('libcloud.compute.drivers.ec2', 'EC2SAEastNodeDriver'),
+    Provider.EC2_AP_SOUTHEAST2:
+        ('libcloud.compute.drivers.ec2', 'EC2APSESydneyNodeDriver'),
     Provider.ECP:
         ('libcloud.compute.drivers.ecp', 'ECPNodeDriver'),
     Provider.ELASTICHOSTS_UK1:

Modified: libcloud/trunk/libcloud/compute/types.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/types.py?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/types.py (original)
+++ libcloud/trunk/libcloud/compute/types.py Thu Nov 22 01:21:05 2012
@@ -120,6 +120,7 @@ class Provider(object):
     GRIDSPOT = 'gridspot'
     RACKSPACE_FIRST_GEN = 'rackspace_first_gen'
     HOSTVIRTUAL = 'hostvirtual'
+    EC2_AP_SOUTHEAST2 = 'ec2_ap_southeast_2'
 
     # Deprecated constants
     RACKSPACE_UK = 'rackspace_uk'

Modified: libcloud/trunk/libcloud/data/pricing.json
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/data/pricing.json?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/libcloud/data/pricing.json (original)
+++ libcloud/trunk/libcloud/data/pricing.json Thu Nov 22 01:21:05 2012
@@ -143,6 +143,19 @@
             "m2.4xlarge": 2.72
         },
 
+       "ec2_ap_southeast_2": {
+            "t1.micro": 0.020,
+            "m1.small": 0.085,
+            "m1.medium": 0.170,
+            "m1.large": 0.340,
+            "m1.xlarge": 0.680,
+            "c1.medium": 0.186,
+            "c1.xlarge": 0.744,
+            "m2.xlarge": 0.506,
+            "m2.2xlarge": 1.012,
+            "m2.4xlarge": 2.024
+        },
+
         "nimbus" : {
             "m1.small": 0.0,
             "m1.large": 0.0,

Modified: libcloud/trunk/libcloud/test/compute/test_ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/test_ec2.py?rev=1412403&r1=1412402&r2=1412403&view=diff
==============================================================================
--- libcloud/trunk/libcloud/test/compute/test_ec2.py (original)
+++ libcloud/trunk/libcloud/test/compute/test_ec2.py Thu Nov 22 01:21:05 2012
@@ -175,7 +175,8 @@ class EC2Tests(LibcloudTestCase, TestCas
                   ('ec2_us_west', 'us-west-1'),
                   ('ec2_eu_west', 'eu-west-1'),
                   ('ec2_ap_southeast', 'ap-southeast-1'),
-                  ('ec2_ap_northeast', 'ap-northeast-1')
+                  ('ec2_ap_northeast', 'ap-northeast-1'),
+                  ('ec2_ap_southeast_2', 'ap-southeast-2')
                 ]
         for api_name, region_name in names:
             self.driver.api_name = api_name



Mime
View raw message