summaryrefslogtreecommitdiff
path: root/boto/ec2/elb
diff options
context:
space:
mode:
authorDaniel Lindsley <daniel@toastdriven.com>2014-01-28 17:32:49 -0800
committerDaniel Lindsley <daniel@toastdriven.com>2014-01-28 17:32:49 -0800
commit19f54836767176551cea75950d87f5bea6e5b469 (patch)
tree635f88c20da89fb771a41a671eb0c1f5a62feb47 /boto/ec2/elb
parent8fa3b6cbf435193dbf06bf4095af903e0fca5133 (diff)
downloadboto-19f54836767176551cea75950d87f5bea6e5b469.tar.gz
Finished integrating the endpoints changes.
Diffstat (limited to 'boto/ec2/elb')
-rw-r--r--boto/ec2/elb/__init__.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/boto/ec2/elb/__init__.py b/boto/ec2/elb/__init__.py
index 6e99b35d..35f4d8ec 100644
--- a/boto/ec2/elb/__init__.py
+++ b/boto/ec2/elb/__init__.py
@@ -31,21 +31,10 @@ from boto.ec2.elb.loadbalancer import LoadBalancer, LoadBalancerZones
from boto.ec2.elb.instancestate import InstanceState
from boto.ec2.elb.healthcheck import HealthCheck
from boto.ec2.elb.listelement import ListElement
-from boto.regioninfo import RegionInfo
+from boto.regioninfo import RegionInfo, get_regions, load_regions
import boto
-RegionData = {
- 'us-east-1': 'elasticloadbalancing.us-east-1.amazonaws.com',
- 'us-gov-west-1': 'elasticloadbalancing.us-gov-west-1.amazonaws.com',
- 'us-west-1': 'elasticloadbalancing.us-west-1.amazonaws.com',
- 'us-west-2': 'elasticloadbalancing.us-west-2.amazonaws.com',
- 'sa-east-1': 'elasticloadbalancing.sa-east-1.amazonaws.com',
- 'eu-west-1': 'elasticloadbalancing.eu-west-1.amazonaws.com',
- 'ap-northeast-1': 'elasticloadbalancing.ap-northeast-1.amazonaws.com',
- 'ap-southeast-1': 'elasticloadbalancing.ap-southeast-1.amazonaws.com',
- 'ap-southeast-2': 'elasticloadbalancing.ap-southeast-2.amazonaws.com',
- 'cn-north-1': 'elasticloadbalancing.cn-north-1.amazonaws.com.cn',
-}
+RegionData = load_regions().get('elasticloadbalancing', {})
def regions():
@@ -55,13 +44,7 @@ def regions():
:rtype: list
:return: A list of :class:`boto.RegionInfo` instances
"""
- regions = []
- for region_name in RegionData:
- region = RegionInfo(name=region_name,
- endpoint=RegionData[region_name],
- connection_cls=ELBConnection)
- regions.append(region)
- return regions
+ return get_regions('elasticloadbalancing', connection_cls=ELBConnection)
def connect_to_region(region_name, **kw_params):