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

Side by Side Diff: third_party/boto/boto/emr/__init__.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2010 Spotify AB 1 # Copyright (c) 2010 Spotify AB
2 # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ 2 # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
3 # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. 3 # Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
4 # All Rights Reserved 4 # All Rights Reserved
5 # 5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a 6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the 7 # copy of this software and associated documentation files (the
8 # "Software"), to deal in the Software without restriction, including 8 # "Software"), to deal in the Software without restriction, including
9 # without limitation the rights to use, copy, modify, merge, publish, dis- 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 10 # tribute, sublicense, and/or sell copies of the Software, and to permit
(...skipping 11 matching lines...) Expand all
22 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23 # IN THE SOFTWARE. 23 # IN THE SOFTWARE.
24 24
25 """ 25 """
26 This module provies an interface to the Elastic MapReduce (EMR) 26 This module provies an interface to the Elastic MapReduce (EMR)
27 service from AWS. 27 service from AWS.
28 """ 28 """
29 from connection import EmrConnection 29 from connection import EmrConnection
30 from step import Step, StreamingStep, JarStep 30 from step import Step, StreamingStep, JarStep
31 from bootstrap_action import BootstrapAction 31 from bootstrap_action import BootstrapAction
32 from boto.regioninfo import RegionInfo 32 from boto.regioninfo import RegionInfo, get_regions
33 33
34 34
35 def regions(): 35 def regions():
36 """ 36 """
37 Get all available regions for the Amazon Elastic MapReduce service. 37 Get all available regions for the Amazon Elastic MapReduce service.
38 38
39 :rtype: list 39 :rtype: list
40 :return: A list of :class:`boto.regioninfo.RegionInfo` 40 :return: A list of :class:`boto.regioninfo.RegionInfo`
41 """ 41 """
42 return [RegionInfo(name='us-east-1', 42 return get_regions('elasticmapreduce', connection_cls=EmrConnection)
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 RegionInfo(name='cn-north-1',
67 endpoint='elasticmapreduce.cn-north-1.amazonaws.com.cn',
68 connection_cls=EmrConnection),
69 ]
70 43
71 44
72 def connect_to_region(region_name, **kw_params): 45 def connect_to_region(region_name, **kw_params):
73 for region in regions(): 46 for region in regions():
74 if region.name == region_name: 47 if region.name == region_name:
75 return region.connect(**kw_params) 48 return region.connect(**kw_params)
76 return None 49 return None
OLDNEW
« no previous file with comments | « third_party/boto/boto/elastictranscoder/__init__.py ('k') | third_party/boto/boto/emr/connection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698