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

Unified Diff: third_party/gsutil/boto/boto/ses/__init__.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/gsutil/boto/boto/services/submit.py ('k') | third_party/gsutil/boto/boto/ses/connection.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/boto/boto/ses/__init__.py
diff --git a/third_party/gsutil/20110627/boto/boto/ec2/__init__.py b/third_party/gsutil/boto/boto/ses/__init__.py
similarity index 67%
copy from third_party/gsutil/20110627/boto/boto/ec2/__init__.py
copy to third_party/gsutil/boto/boto/ses/__init__.py
index 4b07d424955c3de5abc1d4138c91c2c6a9051c46..f893423d44c3ba9c1badc1a0780a56aa4fd46a4d 100644
--- a/third_party/gsutil/20110627/boto/boto/ec2/__init__.py
+++ b/third_party/gsutil/boto/boto/ses/__init__.py
@@ -1,4 +1,5 @@
-# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2011 Harry Marr http://hmarr.com/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -18,52 +19,47 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-#
-"""
-This module provides an interface to the Elastic Compute Cloud (EC2)
-service from AWS.
-"""
-from boto.ec2.connection import EC2Connection
-def regions(**kw_params):
+from connection import SESConnection
+from boto.regioninfo import RegionInfo
+
+def regions():
"""
- Get all available regions for the EC2 service.
- You may pass any of the arguments accepted by the EC2Connection
- object's constructor as keyword arguments and they will be
- passed along to the EC2Connection object.
-
+ Get all available regions for the SES service.
+
:rtype: list
- :return: A list of :class:`boto.ec2.regioninfo.RegionInfo`
+ :return: A list of :class:`boto.regioninfo.RegionInfo` instances
"""
- c = EC2Connection(**kw_params)
- return c.get_all_regions()
+ return [RegionInfo(name='us-east-1',
+ endpoint='email.us-east-1.amazonaws.com',
+ connection_cls=SESConnection)]
def connect_to_region(region_name, **kw_params):
"""
Given a valid region name, return a
- :class:`boto.ec2.connection.EC2Connection`.
+ :class:`boto.sns.connection.SESConnection`.
:type: str
:param region_name: The name of the region to connect to.
- :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None``
+ :rtype: :class:`boto.sns.connection.SESConnection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
"""
- for region in regions(**kw_params):
+ for region in regions():
if region.name == region_name:
return region.connect(**kw_params)
return None
-
+
def get_region(region_name, **kw_params):
"""
- Find and return a :class:`boto.ec2.regioninfo.RegionInfo` object
+ Find and return a :class:`boto.regioninfo.RegionInfo` object
given a region name.
:type: str
:param: The name of the region.
- :rtype: :class:`boto.ec2.regioninfo.RegionInfo`
+ :rtype: :class:`boto.regioninfo.RegionInfo`
:return: The RegionInfo object for the given region or None if
an invalid region name is provided.
"""
@@ -71,4 +67,3 @@ def get_region(region_name, **kw_params):
if region.name == region_name:
return region
return None
-
« no previous file with comments | « third_party/gsutil/boto/boto/services/submit.py ('k') | third_party/gsutil/boto/boto/ses/connection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698