| Index: third_party/gsutil/boto/boto/sns/__init__.py
|
| diff --git a/third_party/gsutil/20110627/boto/boto/sdb/__init__.py b/third_party/gsutil/boto/boto/sns/__init__.py
|
| similarity index 52%
|
| rename from third_party/gsutil/20110627/boto/boto/sdb/__init__.py
|
| rename to third_party/gsutil/boto/boto/sns/__init__.py
|
| index ef2b9ceda12bd298fe52ba62a3e2e8d4c4f82445..8d2682f7f9c21bb050de3eab3f57e770e843b93d 100644
|
| --- a/third_party/gsutil/20110627/boto/boto/sdb/__init__.py
|
| +++ b/third_party/gsutil/boto/boto/sns/__init__.py
|
| @@ -1,4 +1,5 @@
|
| -# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
|
| +# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/
|
| +# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
|
| #
|
| # Permission is hereby granted, free of charge, to any person obtaining a
|
| # copy of this software and associated documentation files (the
|
| @@ -18,38 +19,51 @@
|
| # 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.
|
| -#
|
|
|
| -from regioninfo import SDBRegionInfo
|
| +# this is here for backward compatibility
|
| +# originally, the SNSConnection class was defined here
|
| +from connection import SNSConnection
|
| +from boto.regioninfo import RegionInfo
|
|
|
| def regions():
|
| """
|
| - Get all available regions for the SDB service.
|
| + Get all available regions for the SNS service.
|
|
|
| :rtype: list
|
| - :return: A list of :class:`boto.sdb.regioninfo.RegionInfo` instances
|
| + :return: A list of :class:`boto.regioninfo.RegionInfo` instances
|
| """
|
| - return [SDBRegionInfo(name='us-east-1',
|
| - endpoint='sdb.amazonaws.com'),
|
| - SDBRegionInfo(name='eu-west-1',
|
| - endpoint='sdb.eu-west-1.amazonaws.com'),
|
| - SDBRegionInfo(name='us-west-1',
|
| - endpoint='sdb.us-west-1.amazonaws.com'),
|
| - SDBRegionInfo(name='ap-northeast-1',
|
| - endpoint='sdb.ap-northeast-1.amazonaws.com'),
|
| - SDBRegionInfo(name='ap-southeast-1',
|
| - endpoint='sdb.ap-southeast-1.amazonaws.com')
|
| + return [RegionInfo(name='us-east-1',
|
| + endpoint='sns.us-east-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='eu-west-1',
|
| + endpoint='sns.eu-west-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='us-west-1',
|
| + endpoint='sns.us-west-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='sa-east-1',
|
| + endpoint='sns.sa-east-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='us-west-2',
|
| + endpoint='sns.us-west-2.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='ap-northeast-1',
|
| + endpoint='sns.ap-northeast-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| + RegionInfo(name='ap-southeast-1',
|
| + endpoint='sns.ap-southeast-1.amazonaws.com',
|
| + connection_cls=SNSConnection),
|
| ]
|
|
|
| def connect_to_region(region_name, **kw_params):
|
| """
|
| Given a valid region name, return a
|
| - :class:`boto.sdb.connection.SDBConnection`.
|
| + :class:`boto.sns.connection.SNSConnection`.
|
|
|
| :type: str
|
| :param region_name: The name of the region to connect to.
|
|
|
| - :rtype: :class:`boto.sdb.connection.SDBConnection` or ``None``
|
| + :rtype: :class:`boto.sns.connection.SNSConnection` or ``None``
|
| :return: A connection to the given region, or None if an invalid region
|
| name is given
|
| """
|
| @@ -60,13 +74,13 @@ def connect_to_region(region_name, **kw_params):
|
|
|
| def get_region(region_name, **kw_params):
|
| """
|
| - Find and return a :class:`boto.sdb.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.sdb.regioninfo.RegionInfo`
|
| + :rtype: :class:`boto.regioninfo.RegionInfo`
|
| :return: The RegionInfo object for the given region or None if
|
| an invalid region name is provided.
|
| """
|
|
|