OLD | NEW |
1 # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ | 1 # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ |
2 # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. | 2 # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. |
3 # | 3 # |
4 # Permission is hereby granted, free of charge, to any person obtaining a | 4 # Permission is hereby granted, free of charge, to any person obtaining a |
5 # copy of this software and associated documentation files (the | 5 # copy of this software and associated documentation files (the |
6 # "Software"), to deal in the Software without restriction, including | 6 # "Software"), to deal in the Software without restriction, including |
7 # without limitation the rights to use, copy, modify, merge, publish, dis- | 7 # without limitation the rights to use, copy, modify, merge, publish, dis- |
8 # tribute, sublicense, and/or sell copies of the Software, and to permit | 8 # tribute, sublicense, and/or sell copies of the Software, and to permit |
9 # persons to whom the Software is furnished to do so, subject to the fol- | 9 # persons to whom the Software is furnished to do so, subject to the fol- |
10 # lowing conditions: | 10 # lowing conditions: |
(...skipping 23 matching lines...) Expand all Loading... |
34 """ | 34 """ |
35 return [RegionInfo(name='us-east-1', | 35 return [RegionInfo(name='us-east-1', |
36 endpoint='sns.us-east-1.amazonaws.com', | 36 endpoint='sns.us-east-1.amazonaws.com', |
37 connection_cls=SNSConnection), | 37 connection_cls=SNSConnection), |
38 RegionInfo(name='eu-west-1', | 38 RegionInfo(name='eu-west-1', |
39 endpoint='sns.eu-west-1.amazonaws.com', | 39 endpoint='sns.eu-west-1.amazonaws.com', |
40 connection_cls=SNSConnection), | 40 connection_cls=SNSConnection), |
41 RegionInfo(name='us-west-1', | 41 RegionInfo(name='us-west-1', |
42 endpoint='sns.us-west-1.amazonaws.com', | 42 endpoint='sns.us-west-1.amazonaws.com', |
43 connection_cls=SNSConnection), | 43 connection_cls=SNSConnection), |
| 44 RegionInfo(name='us-west-2', |
| 45 endpoint='sns.us-west-2.amazonaws.com', |
| 46 connection_cls=SNSConnection), |
44 RegionInfo(name='ap-northeast-1', | 47 RegionInfo(name='ap-northeast-1', |
45 endpoint='sns.ap-northeast-1.amazonaws.com', | 48 endpoint='sns.ap-northeast-1.amazonaws.com', |
46 connection_cls=SNSConnection), | 49 connection_cls=SNSConnection), |
47 RegionInfo(name='ap-southeast-1', | 50 RegionInfo(name='ap-southeast-1', |
48 endpoint='sns.ap-southeast-1.amazonaws.com', | 51 endpoint='sns.ap-southeast-1.amazonaws.com', |
49 connection_cls=SNSConnection), | 52 connection_cls=SNSConnection), |
50 ] | 53 ] |
51 | 54 |
52 def connect_to_region(region_name, **kw_params): | 55 def connect_to_region(region_name, **kw_params): |
53 """ | 56 """ |
(...skipping 21 matching lines...) Expand all Loading... |
75 :param: The name of the region. | 78 :param: The name of the region. |
76 | 79 |
77 :rtype: :class:`boto.regioninfo.RegionInfo` | 80 :rtype: :class:`boto.regioninfo.RegionInfo` |
78 :return: The RegionInfo object for the given region or None if | 81 :return: The RegionInfo object for the given region or None if |
79 an invalid region name is provided. | 82 an invalid region name is provided. |
80 """ | 83 """ |
81 for region in regions(**kw_params): | 84 for region in regions(**kw_params): |
82 if region.name == region_name: | 85 if region.name == region_name: |
83 return region | 86 return region |
84 return None | 87 return None |
OLD | NEW |