Author: tomaz
Date: Mon Feb 20 07:09:09 2012
New Revision: 1291132

URL: http://svn.apache.org/viewvc?rev=1291132&view=rev
Log:
Add support for ElasticHosts new United States (Los Angeles) and Canada
(Toronto) locations. This patch has been submitted by Jaime Irurzu and is part
of GH-53.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/drivers/elastichosts.py
    libcloud/trunk/libcloud/compute/providers.py
    libcloud/trunk/libcloud/compute/types.py

Modified: libcloud/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1291132&r1=1291131&r2=1291132&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Mon Feb 20 07:09:09 2012
@@ -38,6 +38,10 @@ Changes with Apache Libcloud in developm
       inside _run_deployment_script method.
       [Tomaz Muraus]
 
+    - Add support for ElasticHosts new United States (Los Angeles) and Canada
+      (Toronto) locations. ; GITHUB-53
+      [Jaime Irurzun]
+
   *) Storage:
 
     - Don't lowercase special header names in the Amazon S3 storage driver. ;

Modified: libcloud/trunk/libcloud/compute/drivers/elastichosts.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/elastichosts.py?rev=1291132&r1=1291131&r2=1291132&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/elastichosts.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/elastichosts.py Mon Feb 20 07:09:09 
2012
@@ -29,16 +29,26 @@ API_ENDPOINTS = {
         'country': 'United Kingdom',
         'host': 'api.lon-p.elastichosts.com'
     },
-     'uk-2': {
+    'uk-2': {
         'name': 'London BlueSquare',
         'country': 'United Kingdom',
         'host': 'api.lon-b.elastichosts.com'
     },
-     'us-1': {
+    'us-1': {
         'name': 'San Antonio Peer 1',
         'country': 'United States',
         'host': 'api.sat-p.elastichosts.com'
     },
+    'us-2': {
+        'name': 'Los Angeles Peer 1',
+        'country': 'United States',
+        'host': 'api.lax-p.elastichosts.com'
+    },
+    'ca-1': {
+        'name': 'Toronto Peer 1',
+        'country': 'Canada',
+        'host': 'api.tor-p.elastichosts.com'
+    }
 }
 
 # Default API end-point for the base connection class.
@@ -154,3 +164,33 @@ class ElasticHostsUS1NodeDriver(ElasticH
     ElasticHosts node driver for the San Antonio Peer 1 end-point
     """
     connectionCls = ElasticHostsUS1Connection
+
+
+class ElasticHostsUS2Connection(ElasticStackBaseConnection):
+    """
+    Connection class for the ElasticHosts driver for
+    the Los Angeles Peer 1 end-point
+    """
+    host = API_ENDPOINTS['us-2']['host']
+
+
+class ElasticHostsUS2NodeDriver(ElasticHostsBaseNodeDriver):
+    """
+    ElasticHosts node driver for the Los Angeles Peer 1 end-point
+    """
+    connectionCls = ElasticHostsUS2Connection
+
+
+class ElasticHostsCA1Connection(ElasticStackBaseConnection):
+    """
+    Connection class for the ElasticHosts driver for
+    the Toronto Peer 1 end-point
+    """
+    host = API_ENDPOINTS['ca-1']['host']
+
+
+class ElasticHostsCA1NodeDriver(ElasticHostsBaseNodeDriver):
+    """
+    ElasticHosts node driver for the Toronto Peer 1 end-point
+    """
+    connectionCls = ElasticHostsCA1Connection

Modified: libcloud/trunk/libcloud/compute/providers.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/providers.py?rev=1291132&r1=1291131&r2=1291132&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/providers.py (original)
+++ libcloud/trunk/libcloud/compute/providers.py Mon Feb 20 07:09:09 2012
@@ -49,6 +49,10 @@ DRIVERS = {
         ('libcloud.compute.drivers.elastichosts', 'ElasticHostsUK2NodeDriver'),
     Provider.ELASTICHOSTS_US1:
         ('libcloud.compute.drivers.elastichosts', 'ElasticHostsUS1NodeDriver'),
+    Provider.ELASTICHOSTS_US2:
+        ('libcloud.compute.drivers.elastichosts', 'ElasticHostsUS2NodeDriver'),
+    Provider.ELASTICHOSTS_CA1:
+        ('libcloud.compute.drivers.elastichosts', 'ElasticHostsCA1NodeDriver'),
     Provider.SKALICLOUD:
         ('libcloud.compute.drivers.skalicloud', 'SkaliCloudNodeDriver'),
     Provider.SERVERLOVE:

Modified: libcloud/trunk/libcloud/compute/types.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/types.py?rev=1291132&r1=1291131&r2=1291132&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/types.py (original)
+++ libcloud/trunk/libcloud/compute/types.py Mon Feb 20 07:09:09 2012
@@ -109,6 +109,8 @@ class Provider(object):
     RACKSPACE_NOVA_BETA = 40
     RACKSPACE_NOVA_DFW = 41
     LIBVIRT= 42
+    ELASTICHOSTS_US2 = 43
+    ELASTICHOSTS_CA1 = 44
 
 
 class NodeState(object):


Reply via email to