libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1200328 - in /libcloud/trunk: CHANGES libcloud/compute/drivers/ec2.py libcloud/compute/providers.py libcloud/compute/types.py libcloud/data/pricing.json libcloud/storage/drivers/s3.py libcloud/storage/providers.py libcloud/storage/types.py
Date Thu, 10 Nov 2011 13:42:13 GMT
Author: tomaz
Date: Thu Nov 10 13:42:13 2011
New Revision: 1200328

URL: http://svn.apache.org/viewvc?rev=1200328&view=rev
Log:
Update Amazon EC2 and S3 driver and add support for a new US West 2 - Oregon
region.

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/storage/drivers/s3.py
    libcloud/trunk/libcloud/storage/providers.py
    libcloud/trunk/libcloud/storage/types.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Thu Nov 10 13:42:13 2011
@@ -12,6 +12,15 @@ Changes with Apache Libcloud in developm
        inconsistencies in the OpenStack driver extension method signatures.
        [Brad Morgan]
 
+     - Update Amazon EC2 driver and pricing data to support a new region - 
+       US West 2 (Oregon)
+       [Tomaz Muraus]
+
+  *) Storage:
+
+     - Update Amazon S3 driver to support a new region - US West 2 (Oregon)
+       [Tomaz Muraus]
+
 Changes with Apache Libcloud 0.6.1:
 
   *) General:

Modified: libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ec2.py Thu Nov 10 13:42:13 2011
@@ -40,6 +40,7 @@ from libcloud.compute.base import NodeIm
 
 EC2_US_EAST_HOST = 'ec2.us-east-1.amazonaws.com'
 EC2_US_WEST_HOST = 'ec2.us-west-1.amazonaws.com'
+EC2_US_WEST_OREGON_HOST = 'ec2.us-west-2.amazonaws.com'
 EC2_EU_WEST_HOST = 'ec2.eu-west-1.amazonaws.com'
 EC2_AP_SOUTHEAST_HOST = 'ec2.ap-southeast-1.amazonaws.com'
 EC2_AP_NORTHEAST_HOST = 'ec2.ap-northeast-1.amazonaws.com'
@@ -139,6 +140,7 @@ EC2_US_WEST_INSTANCE_TYPES = dict(EC2_IN
 EC2_EU_WEST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
 EC2_AP_SOUTHEAST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
 EC2_AP_NORTHEAST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
+EC2_US_WEST_OREGON_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
 
 
 class EC2NodeLocation(NodeLocation):
@@ -227,7 +229,8 @@ class EC2Connection(ConnectionUserAndKey
         qs = '&'.join(pairs)
 
         hostname = self.host
-        if (self.secure and self.port != 443) or (not self.secure and self.port != 80):
+        if (self.secure and self.port != 443) or \
+           (not self.secure and self.port != 80):
             hostname += ":" + str(self.port)
 
         string_to_sign = '\n'.join(('GET', hostname, path, qs))
@@ -996,6 +999,28 @@ class EC2USWestNodeDriver(EC2NodeDriver)
     _instance_types = EC2_US_WEST_INSTANCE_TYPES
 
 
+class EC2USWestOregonConnection(EC2Connection):
+    """
+    Connection class for EC2 in the Western US Region (Oregon).
+    """
+
+    host = EC2_US_WEST_OREGON_HOST
+
+
+class EC2USWestOregonNodeDriver(EC2NodeDriver):
+    """
+    Driver class for EC2 in the US West Oregon region.
+    """
+
+    api_name = 'ec2_us_west_oregon'
+    name = 'Amazon EC2 (us-west-2)'
+    friendly_name = 'Amazon US West - Oregon'
+    country = 'US'
+    region_name = 'us-west-2'
+    connectionCls = EC2USWestOregonConnection
+    _instance_types = EC2_US_WEST_OREGON_INSTANCE_TYPES
+
+
 class EC2APSEConnection(EC2Connection):
     """
     Connection class for EC2 in the Southeast Asia Pacific Region

Modified: libcloud/trunk/libcloud/compute/providers.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/providers.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/providers.py (original)
+++ libcloud/trunk/libcloud/compute/providers.py Thu Nov 10 13:42:13 2011
@@ -33,6 +33,8 @@ DRIVERS = {
         ('libcloud.compute.drivers.ec2', 'EC2EUNodeDriver'),
     Provider.EC2_US_WEST:
         ('libcloud.compute.drivers.ec2', 'EC2USWestNodeDriver'),
+    Provider.EC2_US_WEST_OREGON:
+        ('libcloud.compute.drivers.ec2', 'EC2USWestOregonNodeDriver'),
     Provider.EC2_AP_SOUTHEAST:
         ('libcloud.compute.drivers.ec2', 'EC2APSENodeDriver'),
     Provider.EC2_AP_NORTHEAST:

Modified: libcloud/trunk/libcloud/compute/types.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/types.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/types.py (original)
+++ libcloud/trunk/libcloud/compute/types.py Thu Nov 10 13:42:13 2011
@@ -56,6 +56,7 @@ class Provider(object):
     @cvar OPSOURCE: Opsource Cloud
     @cvar NINEFOLD: Ninefold
     @cvar TERREMARK: Terremark
+    @cvar: EC2_US_WEST_OREGON: Amazon AWS US West 2 (Oregon)
     """
     DUMMY = 0
     EC2 = 1  # deprecated name
@@ -95,6 +96,7 @@ class Provider(object):
     SERVERLOVE = 33
     NINEFOLD = 34
     TERREMARK = 35
+    EC2_US_WEST_OREGON = 36
 
 class NodeState(object):
     """

Modified: libcloud/trunk/libcloud/data/pricing.json
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/data/pricing.json?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/data/pricing.json (original)
+++ libcloud/trunk/libcloud/data/pricing.json Thu Nov 10 13:42:13 2011
@@ -51,6 +51,18 @@
             "m2.4xlarge": 2.28
         },
 
+        "ec2_us_west_oregon": {
+            "t1.micro": 0.02,
+            "m1.small": 0.085,
+            "m1.large": 0.34,
+            "m1.xlarge": 0.68,
+            "c1.medium": 0.17,
+            "c1.xlarge": 0.68,
+            "m2.xlarge": 0.50,
+            "m2.2xlarge": 1.0,
+            "m2.4xlarge": 2.0
+        },
+
        "ec2_eu_west": {
             "t1.micro": 0.025,
             "m1.small": 0.095,

Modified: libcloud/trunk/libcloud/storage/drivers/s3.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/storage/drivers/s3.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/storage/drivers/s3.py (original)
+++ libcloud/trunk/libcloud/storage/drivers/s3.py Thu Nov 10 13:42:13 2011
@@ -42,6 +42,7 @@ EXPIRATION_SECONDS = 15 * 60
 
 S3_US_STANDARD_HOST = 's3.amazonaws.com'
 S3_US_WEST_HOST = 's3-us-west-1.amazonaws.com'
+S3_US_WEST_OREGON_HOST = 's3-us-west-2.amazonaws.com'
 S3_EU_WEST_HOST = 's3-eu-west-1.amazonaws.com'
 S3_AP_SOUTHEAST_HOST = 's3-ap-southeast-1.amazonaws.com'
 S3_AP_NORTHEAST_HOST = 's3-ap-northeast-1.amazonaws.com'
@@ -478,6 +479,14 @@ class S3USWestStorageDriver(S3StorageDri
     connectionCls = S3USWestConnection
     ex_location_name = 'us-west-1'
 
+class S3USWestOregonConnection(S3Connection):
+    host = S3_US_WEST_OREGON_HOST
+
+class S3USWestOregonStorageDriver(S3StorageDriver):
+    name = 'Amazon S3 (us-west-2)'
+    connectionCls = S3USWestOregonConnection
+    ex_location_name = 'us-west-2'
+
 class S3EUWestConnection(S3Connection):
     host = S3_EU_WEST_HOST
 

Modified: libcloud/trunk/libcloud/storage/providers.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/storage/providers.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/storage/providers.py (original)
+++ libcloud/trunk/libcloud/storage/providers.py Thu Nov 10 13:42:13 2011
@@ -27,6 +27,8 @@ DRIVERS = {
         ('libcloud.storage.drivers.s3', 'S3StorageDriver'),
     Provider.S3_US_WEST:
         ('libcloud.storage.drivers.s3', 'S3USWestStorageDriver'),
+    Provider.S3_US_WEST_OREGON:
+        ('libcloud.storage.drivers.s3', 'S3USWestOregonStorageDriver'),
     Provider.S3_EU_WEST:
         ('libcloud.storage.drivers.s3', 'S3EUWestStorageDriver'),
     Provider.S3_AP_SOUTHEAST:

Modified: libcloud/trunk/libcloud/storage/types.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/storage/types.py?rev=1200328&r1=1200327&r2=1200328&view=diff
==============================================================================
--- libcloud/trunk/libcloud/storage/types.py (original)
+++ libcloud/trunk/libcloud/storage/types.py Thu Nov 10 13:42:13 2011
@@ -39,6 +39,7 @@ class Provider(object):
     @cvar S3_AP_NORTHEAST_HOST: Amazon S3 Asia South East (Tokyo)
     @cvar NINEFOLD: Ninefold
     @cvar GOOGLE_STORAGE Google Storage
+    @cvar: S3_US_WEST_OREGON: Amazon S3 US West 2 (Oregon)
     """
     DUMMY = 0
     CLOUDFILES_US = 1
@@ -50,6 +51,7 @@ class Provider(object):
     S3_AP_NORTHEAST = 7
     NINEFOLD = 8
     GOOGLE_STORAGE = 9
+    S3_US_WEST_OREGON = 10
 
 class ContainerError(LibcloudError):
     error_type = 'ContainerError'



Mime
View raw message