Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: third_party/gsutil/boto/boto/elasticache/__init__.py

Issue 12042069: Scripts to download files from google storage based on sha1 sums (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Review fixes, updated gsutil Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
2 # All Rights Reserved
3 #
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the
6 # "Software"), to deal in the Software without restriction, including
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
9 # persons to whom the Software is furnished to do so, subject to the fol-
10 # lowing conditions:
11 #
12 # The above copyright notice and this permission notice shall be included
13 # in all copies or substantial portions of the Software.
14 #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
17 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
18 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 # IN THE SOFTWARE.
22 #
23 from boto.regioninfo import RegionInfo
24
25
26 def regions():
27 """
28 Get all available regions for the AWS Elastic Beanstalk service.
29
30 :rtype: list
31 :return: A list of :class:`boto.regioninfo.RegionInfo`
32 """
33 from boto.elasticache.layer1 import ElastiCacheConnection
34 return [RegionInfo(name='us-east-1',
35 endpoint='elasticache.us-east-1.amazonaws.com',
36 connection_cls=ElastiCacheConnection),
37 RegionInfo(name='us-west-1',
38 endpoint='elasticache.us-west-1.amazonaws.com',
39 connection_cls=ElastiCacheConnection),
40 RegionInfo(name='us-west-2',
41 endpoint='elasticache.us-west-2.amazonaws.com',
42 connection_cls=ElastiCacheConnection),
43 RegionInfo(name='eu-west-1',
44 endpoint='elasticache.eu-west-1.amazonaws.com',
45 connection_cls=ElastiCacheConnection),
46 RegionInfo(name='ap-northeast-1',
47 endpoint='elasticache.ap-northeast-1.amazonaws.com',
48 connection_cls=ElastiCacheConnection),
49 RegionInfo(name='ap-southeast-1',
50 endpoint='elasticache.ap-southeast-1.amazonaws.com',
51 connection_cls=ElastiCacheConnection),
52 RegionInfo(name='sa-east-1',
53 endpoint='elasticache.sa-east-1.amazonaws.com',
54 connection_cls=ElastiCacheConnection),
55 ]
56
57
58 def connect_to_region(region_name, **kw_params):
59 for region in regions():
60 if region.name == region_name:
61 return region.connect(**kw_params)
62 return None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698