| Index: third_party/boto/boto/swf/__init__.py
|
| ===================================================================
|
| --- third_party/boto/boto/swf/__init__.py (revision 33376)
|
| +++ third_party/boto/boto/swf/__init__.py (working copy)
|
| @@ -23,20 +23,10 @@
|
| #
|
|
|
| from boto.ec2.regioninfo import RegionInfo
|
| +from boto.regioninfo import get_regions, load_regions
|
| import boto.swf.layer1
|
|
|
| -REGION_ENDPOINTS = {
|
| - 'us-east-1': 'swf.us-east-1.amazonaws.com',
|
| - 'us-gov-west-1': 'swf.us-gov-west-1.amazonaws.com',
|
| - 'us-west-1': 'swf.us-west-1.amazonaws.com',
|
| - 'us-west-2': 'swf.us-west-2.amazonaws.com',
|
| - 'sa-east-1': 'swf.sa-east-1.amazonaws.com',
|
| - 'eu-west-1': 'swf.eu-west-1.amazonaws.com',
|
| - 'ap-northeast-1': 'swf.ap-northeast-1.amazonaws.com',
|
| - 'ap-southeast-1': 'swf.ap-southeast-1.amazonaws.com',
|
| - 'ap-southeast-2': 'swf.ap-southeast-2.amazonaws.com',
|
| - 'cn-north-1': 'swf.cn-north-1.amazonaws.com.cn',
|
| -}
|
| +REGION_ENDPOINTS = load_regions().get('swf', {})
|
|
|
|
|
| def regions(**kw_params):
|
| @@ -46,9 +36,7 @@
|
| :rtype: list
|
| :return: A list of :class:`boto.regioninfo.RegionInfo`
|
| """
|
| - return [RegionInfo(name=region_name, endpoint=REGION_ENDPOINTS[region_name],
|
| - connection_cls=boto.swf.layer1.Layer1)
|
| - for region_name in REGION_ENDPOINTS]
|
| + return get_regions('swf', connection_cls=boto.swf.layer1.Layer1)
|
|
|
|
|
| def connect_to_region(region_name, **kw_params):
|
|
|