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/22 22:26:06 UTC
svn commit: r902279 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py
Author: pquerna
Date: Fri Jan 22 21:26:05 2010
New Revision: 902279
URL: http://svn.apache.org/viewvc?rev=902279&view=rev
Log:
Add support for amazon ec2 west
Modified:
incubator/libcloud/trunk/libcloud/drivers/ec2.py
Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=902279&r1=902278&r2=902279&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Fri Jan 22 21:26:05 2010
@@ -76,6 +76,7 @@
EC2_US_EAST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
+EC2_US_WEST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
EC2_EU_WEST_INSTANCE_TYPES = dict(EC2_INSTANCE_TYPES)
EC2_US_EAST_INSTANCE_TYPES['m1.small']['price'] = '.085'
@@ -86,6 +87,14 @@
EC2_US_EAST_INSTANCE_TYPES['m2.2xlarge']['price'] = '1.2'
EC2_US_EAST_INSTANCE_TYPES['m2.4xlarge']['price'] = '2.4'
+EC2_US_WEST_INSTANCE_TYPES['m1.small']['price'] = '.095'
+EC2_US_WEST_INSTANCE_TYPES['m1.large']['price'] = '.38'
+EC2_US_WEST_INSTANCE_TYPES['m1.xlarge']['price'] = '.76'
+EC2_US_WEST_INSTANCE_TYPES['c1.medium']['price'] = '.19'
+EC2_US_WEST_INSTANCE_TYPES['c1.xlarge']['price'] = '.76'
+EC2_US_WEST_INSTANCE_TYPES['m2.2xlarge']['price'] = '1.34'
+EC2_US_WEST_INSTANCE_TYPES['m2.4xlarge']['price'] = '2.68'
+
EC2_EU_WEST_INSTANCE_TYPES['m1.small']['price'] = '.095'
EC2_EU_WEST_INSTANCE_TYPES['m1.large']['price'] = '.38'
EC2_EU_WEST_INSTANCE_TYPES['m1.xlarge']['price'] = '.76'
@@ -285,7 +294,7 @@
return self._get_terminate_boolean(res)
def list_locations(self):
- return [NodeLocation(0, "Amazon US East", 'US', self)]
+ return [NodeLocation(0, "Amazon US N. Virginia", 'US', self)]
class EC2EUConnection(EC2Connection):
@@ -296,4 +305,15 @@
connectionCls = EC2EUConnection
_instance_types = EC2_EU_WEST_INSTANCE_TYPES
def list_locations(self):
- return [NodeLocation(0, "Amazon Europe", 'IE', self)]
+ return [NodeLocation(0, "Amazon Europe Ireland", 'IE', self)]
+
+class EC2USConnection(EC2Connection):
+
+ host = EC2_US_WEST_HOST
+
+class EC2EUNodeDriver(EC2NodeDriver):
+
+ connectionCls = EC2USConnection
+ _instance_types = EC2_US_WEST_INSTANCE_TYPES
+ def list_locations(self):
+ return [NodeLocation(0, "Amazon US N. California", 'US', self)]