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

Side by Side Diff: third_party/gsutil/boto/emr/__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: Removed gsutil/tests and gsutil/docs 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) 2010 Spotify AB
2 # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
3 # Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
4 # All Rights Reserved
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the
8 # "Software"), to deal in the Software without restriction, including
9 # without limitation the rights to use, copy, modify, merge, publish, dis-
10 # tribute, sublicense, and/or sell copies of the Software, and to permit
11 # persons to whom the Software is furnished to do so, subject to the fol-
12 # lowing conditions:
13 #
14 # The above copyright notice and this permission notice shall be included
15 # in all copies or substantial portions of the Software.
16 #
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
19 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
20 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23 # IN THE SOFTWARE.
24
25 """
26 This module provies an interface to the Elastic MapReduce (EMR)
27 service from AWS.
28 """
29 from connection import EmrConnection
30 from step import Step, StreamingStep, JarStep
31 from bootstrap_action import BootstrapAction
32 from boto.regioninfo import RegionInfo
33
34
35 def regions():
36 """
37 Get all available regions for the Amazon Elastic MapReduce service.
38
39 :rtype: list
40 :return: A list of :class:`boto.regioninfo.RegionInfo`
41 """
42 return [RegionInfo(name='us-east-1',
43 endpoint='elasticmapreduce.us-east-1.amazonaws.com',
44 connection_cls=EmrConnection),
45 RegionInfo(name='us-west-1',
46 endpoint='us-west-1.elasticmapreduce.amazonaws.com',
47 connection_cls=EmrConnection),
48 RegionInfo(name='us-west-2',
49 endpoint='us-west-2.elasticmapreduce.amazonaws.com',
50 connection_cls=EmrConnection),
51 RegionInfo(name='ap-northeast-1',
52 endpoint='ap-northeast-1.elasticmapreduce.amazonaws.com',
53 connection_cls=EmrConnection),
54 RegionInfo(name='ap-southeast-1',
55 endpoint='ap-southeast-1.elasticmapreduce.amazonaws.com',
56 connection_cls=EmrConnection),
57 RegionInfo(name='ap-southeast-2',
58 endpoint='ap-southeast-2.elasticmapreduce.amazonaws.com',
59 connection_cls=EmrConnection),
60 RegionInfo(name='eu-west-1',
61 endpoint='eu-west-1.elasticmapreduce.amazonaws.com',
62 connection_cls=EmrConnection),
63 RegionInfo(name='sa-east-1',
64 endpoint='sa-east-1.elasticmapreduce.amazonaws.com',
65 connection_cls=EmrConnection),
66 ]
67
68
69 def connect_to_region(region_name, **kw_params):
70 for region in regions():
71 if region.name == region_name:
72 return region.connect(**kw_params)
73 return None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698