You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by wo...@apache.org on 2010/09/15 22:07:07 UTC

svn commit: r997482 - in /incubator/libcloud/trunk/libcloud: drivers/ec2.py providers.py types.py

Author: woodser
Date: Wed Sep 15 20:07:07 2010
New Revision: 997482

URL: http://svn.apache.org/viewvc?rev=997482&view=rev
Log:
Patches from Geoff Greer:
- Micro instance support in EC2 driver
- Register Asia Pacific SE driver in providers.py

Modified:
    incubator/libcloud/trunk/libcloud/drivers/ec2.py
    incubator/libcloud/trunk/libcloud/providers.py
    incubator/libcloud/trunk/libcloud/types.py

Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=997482&r1=997481&r2=997482&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Wed Sep 15 20:07:07 2010
@@ -41,6 +41,13 @@ Sizes must be hardcoded, because Amazon 
 From http://aws.amazon.com/ec2/instance-types/
 """
 EC2_INSTANCE_TYPES = {
+    't1.micro': {
+        'id': 't1.micro',
+        'name': 'Micro Instance',
+        'ram': 613,
+        'disk': 15,
+        'bandwidth': None
+    },
     'm1.small': {
         'id': 'm1.small',
         'name': 'Small Instance',
@@ -108,6 +115,7 @@ EC2_AP_SOUTHEAST_INSTANCE_TYPES = dict(E
 # On demand prices must also be hardcoded, because Amazon doesn't provide an
 # API to fetch them. From http://aws.amazon.com/ec2/pricing/
 #
+EC2_US_EAST_INSTANCE_TYPES['t1.micro']['price'] = '.02'
 EC2_US_EAST_INSTANCE_TYPES['m1.small']['price'] = '.085'
 EC2_US_EAST_INSTANCE_TYPES['m1.large']['price'] = '.34'
 EC2_US_EAST_INSTANCE_TYPES['m1.xlarge']['price'] = '.68'
@@ -117,6 +125,7 @@ EC2_US_EAST_INSTANCE_TYPES['m2.xlarge'][
 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['t1.micro']['price'] = '.025'
 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'
@@ -126,6 +135,7 @@ EC2_US_EAST_INSTANCE_TYPES['m2.xlarge'][
 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['t1.micro']['price'] = '.025'
 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'

Modified: incubator/libcloud/trunk/libcloud/providers.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/providers.py?rev=997482&r1=997481&r2=997482&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/providers.py (original)
+++ incubator/libcloud/trunk/libcloud/providers.py Wed Sep 15 20:07:07 2010
@@ -27,6 +27,8 @@ DRIVERS = {
         ('libcloud.drivers.ec2', 'EC2EUNodeDriver'),
     Provider.EC2_US_WEST:
         ('libcloud.drivers.ec2', 'EC2USWestNodeDriver'),
+    Provider.EC2_AP_SOUTHEAST:
+        ('libcloud.drivers.ec2', 'EC2APSENodeDriver'),
     Provider.ECP:
         ('libcloud.drivers.ecp', 'ECPNodeDriver'),
     Provider.ELASTICHOSTS_UK1:

Modified: incubator/libcloud/trunk/libcloud/types.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/types.py?rev=997482&r1=997481&r2=997482&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/types.py (original)
+++ incubator/libcloud/trunk/libcloud/types.py Wed Sep 15 20:07:07 2010
@@ -60,6 +60,7 @@ class Provider(object):
     ELASTICHOSTS_UK1 = 19
     ELASTICHOSTS_UK2 = 20
     ELASTICHOSTS_US1 = 21
+    EC2_AP_SOUTHEAST = 22
 
 class NodeState(object):
     """



[libcloud] Re: svn commit: r997482 - in /incubator/libcloud/trunk/libcloud: drivers/ec2.py providers.py types.py

Posted by Paul Querna <pa...@querna.org>.
On Wed, Sep 15, 2010 at 2:05 PM, Paul Querna <pa...@querna.org> wrote:
> On Wed, Sep 15, 2010 at 1:07 PM,  <wo...@apache.org> wrote:
>> Author: woodser
>> Date: Wed Sep 15 20:07:07 2010
>> New Revision: 997482
>>
>> URL: http://svn.apache.org/viewvc?rev=997482&view=rev
>> Log:
>> Patches from Geoff Greer:
>> - Micro instance support in EC2 driver
>> - Register Asia Pacific SE driver in providers.py
>>
>
> In the future, this type of change should be two commits.
>
> Please only make one change per commit, and reference the jira tickets
> in the commit log:
>
> https://issues.apache.org/jira/browse/LIBCLOUD-50
> https://issues.apache.org/jira/browse/LIBCLOUD-51
>

Also, please run the test cases before commiting changes, this
revision has broken the EC2 tests:
http://ci.apache.org/builders/libcloud-trunk/builds/45/steps/compile/logs/stdio

[libcloud] Re: svn commit: r997482 - in /incubator/libcloud/trunk/libcloud: drivers/ec2.py providers.py types.py

Posted by Paul Querna <pa...@querna.org>.
On Wed, Sep 15, 2010 at 1:07 PM,  <wo...@apache.org> wrote:
> Author: woodser
> Date: Wed Sep 15 20:07:07 2010
> New Revision: 997482
>
> URL: http://svn.apache.org/viewvc?rev=997482&view=rev
> Log:
> Patches from Geoff Greer:
> - Micro instance support in EC2 driver
> - Register Asia Pacific SE driver in providers.py
>

In the future, this type of change should be two commits.

Please only make one change per commit, and reference the jira tickets
in the commit log:

https://issues.apache.org/jira/browse/LIBCLOUD-50
https://issues.apache.org/jira/browse/LIBCLOUD-51

Thanks,

Paul

> Modified:
>    incubator/libcloud/trunk/libcloud/drivers/ec2.py
>    incubator/libcloud/trunk/libcloud/providers.py
>    incubator/libcloud/trunk/libcloud/types.py
>
> Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py
> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=997482&r1=997481&r2=997482&view=diff
> ==============================================================================
> --- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original)
> +++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Wed Sep 15 20:07:07 2010
> @@ -41,6 +41,13 @@ Sizes must be hardcoded, because Amazon
>  From http://aws.amazon.com/ec2/instance-types/
>  """
>  EC2_INSTANCE_TYPES = {
> +    't1.micro': {
> +        'id': 't1.micro',
> +        'name': 'Micro Instance',
> +        'ram': 613,
> +        'disk': 15,
> +        'bandwidth': None
> +    },
>     'm1.small': {
>         'id': 'm1.small',
>         'name': 'Small Instance',
> @@ -108,6 +115,7 @@ EC2_AP_SOUTHEAST_INSTANCE_TYPES = dict(E
>  # On demand prices must also be hardcoded, because Amazon doesn't provide an
>  # API to fetch them. From http://aws.amazon.com/ec2/pricing/
>  #
> +EC2_US_EAST_INSTANCE_TYPES['t1.micro']['price'] = '.02'
>  EC2_US_EAST_INSTANCE_TYPES['m1.small']['price'] = '.085'
>  EC2_US_EAST_INSTANCE_TYPES['m1.large']['price'] = '.34'
>  EC2_US_EAST_INSTANCE_TYPES['m1.xlarge']['price'] = '.68'
> @@ -117,6 +125,7 @@ EC2_US_EAST_INSTANCE_TYPES['m2.xlarge'][
>  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['t1.micro']['price'] = '.025'
>  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'
> @@ -126,6 +135,7 @@ EC2_US_EAST_INSTANCE_TYPES['m2.xlarge'][
>  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['t1.micro']['price'] = '.025'
>  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'
>
> Modified: incubator/libcloud/trunk/libcloud/providers.py
> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/providers.py?rev=997482&r1=997481&r2=997482&view=diff
> ==============================================================================
> --- incubator/libcloud/trunk/libcloud/providers.py (original)
> +++ incubator/libcloud/trunk/libcloud/providers.py Wed Sep 15 20:07:07 2010
> @@ -27,6 +27,8 @@ DRIVERS = {
>         ('libcloud.drivers.ec2', 'EC2EUNodeDriver'),
>     Provider.EC2_US_WEST:
>         ('libcloud.drivers.ec2', 'EC2USWestNodeDriver'),
> +    Provider.EC2_AP_SOUTHEAST:
> +        ('libcloud.drivers.ec2', 'EC2APSENodeDriver'),
>     Provider.ECP:
>         ('libcloud.drivers.ecp', 'ECPNodeDriver'),
>     Provider.ELASTICHOSTS_UK1:
>
> Modified: incubator/libcloud/trunk/libcloud/types.py
> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/types.py?rev=997482&r1=997481&r2=997482&view=diff
> ==============================================================================
> --- incubator/libcloud/trunk/libcloud/types.py (original)
> +++ incubator/libcloud/trunk/libcloud/types.py Wed Sep 15 20:07:07 2010
> @@ -60,6 +60,7 @@ class Provider(object):
>     ELASTICHOSTS_UK1 = 19
>     ELASTICHOSTS_UK2 = 20
>     ELASTICHOSTS_US1 = 21
> +    EC2_AP_SOUTHEAST = 22
>
>  class NodeState(object):
>     """
>
>
>