Browse files

WIP: This should be a complete set of changes to enable testing of ce…

…rt verification across all services.
  • Loading branch information...
1 parent 58879d9 commit c8864be2ebf1f452da90308350bdc0d17615d7a6 @garnaat garnaat committed Sep 5, 2012
Showing with 847 additions and 144 deletions.
  1. +1 −1 boto/cloudformation/__init__.py
  2. +1 −1 boto/dynamodb/__init__.py
  3. +6 −22 boto/ec2/__init__.py
  4. +3 −2 boto/ec2/autoscale/__init__.py
  5. +3 −2 boto/ec2/cloudwatch/__init__.py
  6. +3 −2 boto/ec2/elb/__init__.py
  7. +4 −3 boto/emr/__init__.py
  8. +50 −3 boto/iam/__init__.py
  9. +4 −3 boto/rds/__init__.py
  10. +4 −5 boto/regioninfo.py
  11. +51 −2 boto/route53/__init__.py
  12. +56 −2 boto/s3/__init__.py
  13. +6 −21 boto/sdb/__init__.py
  14. +5 −20 boto/ses/__init__.py
  15. +6 −21 boto/sns/__init__.py
  16. +2 −1 boto/sqs/__init__.py
  17. +5 −20 boto/sts/__init__.py
  18. +4 −3 boto/swf/__init__.py
  19. +21 −0 tests/integration/cloudformation/__init__.py
  20. +40 −0 tests/integration/cloudformation/test_cert_verification.py
  21. +21 −0 tests/integration/cloudsearch/__init__.py
  22. +40 −0 tests/integration/cloudsearch/test_cert_verification.py
  23. +40 −0 tests/integration/dynamodb/test_cert_verification.py
  24. 0 tests/integration/{ → ec2}/autoscale/__init__.py
  25. +2 −2 tests/integration/{ → ec2}/autoscale/test_cert_verification.py
  26. 0 tests/integration/{ → ec2}/autoscale/test_connection.py
  27. +40 −0 tests/integration/ec2/cloudwatch/test_cert_verification.py
  28. +40 −0 tests/integration/ec2/elb/test_cert_verification.py
  29. +2 −2 tests/integration/ec2/test_cert_verification.py
  30. +1 −1 tests/integration/emr/test_cert_verification.py
  31. +20 −0 tests/integration/iam/__init__.py
  32. +40 −0 tests/integration/iam/test_cert_verification.py
  33. +4 −3 tests/integration/rds/__init__.py
  34. +1 −1 tests/integration/rds/test_cert_verification.py
  35. +20 −0 tests/integration/route53/__init__.py
  36. +40 −0 tests/integration/route53/test_cert_verification.py
  37. +40 −0 tests/integration/s3/test_cert_verification.py
  38. +40 −0 tests/integration/sdb/test_cert_verification.py
  39. +40 −0 tests/integration/ses/test_cert_verification.py
  40. +20 −0 tests/integration/sns/__init__.py
  41. +40 −0 tests/integration/sns/test_cert_verification.py
  42. +1 −1 tests/integration/sqs/test_cert_verification.py
  43. +40 −0 tests/integration/sts/test_cert_verification.py
  44. +40 −0 tests/integration/swf/test_cert_verification.py
View
2 boto/cloudformation/__init__.py
@@ -15,7 +15,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
View
2 boto/dynamodb/__init__.py
@@ -21,7 +21,7 @@
# IN THE SOFTWARE.
#
-from boto.ec2.regioninfo import RegionInfo
+from boto.regioninfo import RegionInfo
def regions():
View
28 boto/ec2/__init__.py
@@ -14,7 +14,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
@@ -25,29 +25,31 @@
"""
from boto.ec2.connection import EC2Connection
+
def regions(**kw_params):
"""
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.
-
+
:rtype: list
:return: A list of :class:`boto.ec2.regioninfo.RegionInfo`
"""
c = EC2Connection(**kw_params)
return c.get_all_regions()
+
def connect_to_region(region_name, **kw_params):
"""
- Given a valid region name, return a
+ Given a valid region name, return a
:class:`boto.ec2.connection.EC2Connection`.
Any additional parameters after the region_name are passed on to
the connect method of the region object.
:type: str
:param region_name: The name of the region to connect to.
-
+
:rtype: :class:`boto.ec2.connection.EC2Connection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
@@ -56,21 +58,3 @@ def connect_to_region(region_name, **kw_params):
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
- given a region name.
-
- :type: str
- :param: The name of the region.
-
- :rtype: :class:`boto.ec2.regioninfo.RegionInfo`
- :return: The RegionInfo object for the given region or None if
- an invalid region name is provided.
- """
- for region in regions(**kw_params):
- if region.name == region_name:
- return region
- return None
-
View
5 boto/ec2/autoscale/__init__.py
@@ -98,7 +98,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
https_connection_factory=None, region=None, path='/',
- security_token=None):
+ security_token=None, validate_certs=True):
"""
Init method to create a new connection to the AutoScaling service.
@@ -116,7 +116,8 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
proxy_user, proxy_pass,
self.region.endpoint, debug,
https_connection_factory, path=path,
- security_token=security_token)
+ security_token=security_token,
+ validate_certs=validate_certs)
def _required_auth_capability(self):
return ['hmac-v4']
View
5 boto/ec2/cloudwatch/__init__.py
@@ -91,7 +91,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
https_connection_factory=None, region=None, path='/',
- security_token=None):
+ security_token=None, validate_certs=True):
"""
Init method to create a new connection to EC2 Monitoring Service.
@@ -109,7 +109,8 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
proxy_user, proxy_pass,
self.region.endpoint, debug,
https_connection_factory, path,
- security_token)
+ security_token,
+ validate_certs=validate_certs)
def _required_auth_capability(self):
return ['ec2']
View
5 boto/ec2/elb/__init__.py
@@ -85,7 +85,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=False, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
https_connection_factory=None, region=None, path='/',
- security_token=None):
+ security_token=None, validate_certs=True):
"""
Init method to create a new connection to EC2 Load Balancing Service.
@@ -102,7 +102,8 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
proxy_user, proxy_pass,
self.region.endpoint, debug,
https_connection_factory, path,
- security_token)
+ security_token,
+ validate_certs=validate_certs)
def _required_auth_capability(self):
return ['ec2']
View
7 boto/emr/__init__.py
@@ -1,6 +1,7 @@
# Copyright (c) 2010 Spotify AB
-# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/
-# Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -28,7 +29,7 @@
from connection import EmrConnection
from step import Step, StreamingStep, JarStep
from bootstrap_action import BootstrapAction
-from boto.ec2.regioninfo import RegionInfo
+from boto.regioninfo import RegionInfo
def regions():
View
53 boto/iam/__init__.py
@@ -15,13 +15,60 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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 is here for backward compatibility
# originally, the IAMConnection class was defined here
from connection import IAMConnection
-
-
+from boto.regioninfo import RegionInfo
+
+
+class IAMRegionInfo(RegionInfo):
+
+ def connect(self, **kw_params):
+ """
+ Connect to this Region's endpoint. Returns an connection
+ object pointing to the endpoint associated with this region.
+ You may pass any of the arguments accepted by the connection
+ class's constructor as keyword arguments and they will be
+ passed along to the connection object.
+
+ :rtype: Connection object
+ :return: The connection to this regions endpoint
+ """
+ if self.connection_cls:
+ return self.connection_cls(host=self.endpoint, **kw_params)
+
+
+def regions():
+ """
+ Get all available regions for the IAM service.
+
+ :rtype: list
+ :return: A list of :class:`boto.regioninfo.RegionInfo` instances
+ """
+ return [IAMRegionInfo(name='universal',
+ endpoint='iam.amazonaws.com',
+ connection_cls=IAMConnection)
+ ]
+
+
+def connect_to_region(region_name, **kw_params):
+ """
+ Given a valid region name, return a
+ :class:`boto.iam.connection.IAMConnection`.
+
+ :type: str
+ :param region_name: The name of the region to connect to.
+
+ :rtype: :class:`boto.iam.connection.IAMConnection` or ``None``
+ :return: A connection to the given region, or None if an invalid region
+ name is given
+ """
+ for region in regions():
+ if region.name == region_name:
+ return region.connect(**kw_params)
+ return None
View
7 boto/rds/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2009-2012 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -87,7 +87,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
https_connection_factory=None, region=None, path='/',
- security_token=None):
+ security_token=None, validate_certs=True):
if not region:
region = RDSRegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
@@ -98,7 +98,8 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
proxy_user, proxy_pass,
self.region.endpoint, debug,
https_connection_factory, path,
- security_token)
+ security_token,
+ validate_certs=validate_certs)
def _required_auth_capability(self):
return ['rds']
View
9 boto/regioninfo.py
@@ -16,16 +16,17 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
+
class RegionInfo(object):
"""
Represents an AWS Region
"""
-
+
def __init__(self, connection=None, name=None, endpoint=None,
connection_cls=None):
self.connection = connection
@@ -54,11 +55,9 @@ def connect(self, **kw_params):
You may pass any of the arguments accepted by the connection
class's constructor as keyword arguments and they will be
passed along to the connection object.
-
+
:rtype: Connection object
:return: The connection to this regions endpoint
"""
if self.connection_cls:
return self.connection_cls(region=self, **kw_params)
-
-
View
53 boto/route53/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -15,7 +15,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
@@ -24,3 +24,52 @@
# this is here for backward compatibility
# originally, the Route53Connection class was defined here
from connection import Route53Connection
+from boto.regioninfo import RegionInfo
+
+
+class Route53RegionInfo(RegionInfo):
+
+ def connect(self, **kw_params):
+ """
+ Connect to this Region's endpoint. Returns an connection
+ object pointing to the endpoint associated with this region.
+ You may pass any of the arguments accepted by the connection
+ class's constructor as keyword arguments and they will be
+ passed along to the connection object.
+
+ :rtype: Connection object
+ :return: The connection to this regions endpoint
+ """
+ if self.connection_cls:
+ return self.connection_cls(host=self.endpoint, **kw_params)
+
+
+def regions():
+ """
+ Get all available regions for the Route53 service.
+
+ :rtype: list
+ :return: A list of :class:`boto.regioninfo.RegionInfo` instances
+ """
+ return [Route53RegionInfo(name='universal',
+ endpoint='route53.amazonaws.com',
+ connection_cls=Route53Connection)
+ ]
+
+
+def connect_to_region(region_name, **kw_params):
+ """
+ Given a valid region name, return a
+ :class:`boto.route53.connection.Route53Connection`.
+
+ :type: str
+ :param region_name: The name of the region to connect to.
+
+ :rtype: :class:`boto.route53.connection.Route53Connection` or ``None``
+ :return: A connection to the given region, or None if an invalid region
+ name is given
+ """
+ for region in regions():
+ if region.name == region_name:
+ return region.connect(**kw_params)
+ return None
View
58 boto/s3/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
@@ -16,9 +16,63 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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 boto.regioninfo import RegionInfo
+
+
+class S3RegionInfo(RegionInfo):
+
+ def connect(self, **kw_params):
+ """
+ Connect to this Region's endpoint. Returns an connection
+ object pointing to the endpoint associated with this region.
+ You may pass any of the arguments accepted by the connection
+ class's constructor as keyword arguments and they will be
+ passed along to the connection object.
+
+ :rtype: Connection object
+ :return: The connection to this regions endpoint
+ """
+ if self.connection_cls:
+ return self.connection_cls(host=self.endpoint, **kw_params)
+
+
+def regions():
+ """
+ Get all available regions for the Amazon S3 service.
+
+ :rtype: list
+ :return: A list of :class:`boto.regioninfo.RegionInfo`
+ """
+ from .connection import S3Connection
+ return [S3RegionInfo(name='us-east-1',
+ endpoint='s3.amazonaws.com',
+ connection_cls=S3Connection),
+ S3RegionInfo(name='us-west-1',
+ endpoint='s3-us-west-1.amazonaws.com',
+ connection_cls=S3Connection),
+ S3RegionInfo(name='us-west-2',
+ endpoint='s3-us-west-2.amazonaws.com',
+ connection_cls=S3Connection),
+ S3RegionInfo(name='ap-northeast-1',
+ endpoint='s3-ap-northeast-1.amazonaws.com',
+ connection_cls=S3Connection),
+ S3RegionInfo(name='ap-southeast-1',
+ endpoint='s3-ap-southeast-1.amazonaws.com',
+ connection_cls=S3Connection),
+ S3RegionInfo(name='eu-west-1',
+ endpoint='s3-eu-west-1.amazonaws.com',
+ connection_cls=S3Connection),
+ ]
+
+
+def connect_to_region(region_name, **kw_params):
+ for region in regions():
+ if region.name == region_name:
+ return region.connect(**kw_params)
+ return None
View
27 boto/sdb/__init__.py
@@ -14,13 +14,14 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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
+from .regioninfo import SDBRegionInfo
+
def regions():
"""
@@ -45,14 +46,15 @@ def regions():
endpoint='sdb.ap-southeast-1.amazonaws.com')
]
+
def connect_to_region(region_name, **kw_params):
"""
- Given a valid region name, return a
+ Given a valid region name, return a
:class:`boto.sdb.connection.SDBConnection`.
:type: str
:param region_name: The name of the region to connect to.
-
+
:rtype: :class:`boto.sdb.connection.SDBConnection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
@@ -61,20 +63,3 @@ def connect_to_region(region_name, **kw_params):
if region.name == region_name:
return region.connect(**kw_params)
return None
-
-def get_region(region_name, **kw_params):
@peralmq
peralmq added a note Feb 15, 2013

Hi, why was this function removed?

I am wondering too. Why did get_region disappear from every class with this commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- """
- Find and return a :class:`boto.sdb.regioninfo.RegionInfo` object
- given a region name.
-
- :type: str
- :param: The name of the region.
-
- :rtype: :class:`boto.sdb.regioninfo.RegionInfo`
- :return: The RegionInfo object for the given region or None if
- an invalid region name is provided.
- """
- for region in regions(**kw_params):
- if region.name == region_name:
- return region
- return None
View
25 boto/ses/__init__.py
@@ -15,14 +15,15 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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 connection import SESConnection
from boto.regioninfo import RegionInfo
+
def regions():
"""
Get all available regions for the SES service.
@@ -34,14 +35,15 @@ def regions():
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
+ Given a valid region name, return a
:class:`boto.ses.connection.SESConnection`.
:type: str
:param region_name: The name of the region to connect to.
-
+
:rtype: :class:`boto.ses.connection.SESConnection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
@@ -50,20 +52,3 @@ def connect_to_region(region_name, **kw_params):
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.regioninfo.RegionInfo` object
- given a region name.
-
- :type: str
- :param: The name of the region.
-
- :rtype: :class:`boto.regioninfo.RegionInfo`
- :return: The RegionInfo object for the given region or None if
- an invalid region name is provided.
- """
- for region in regions(**kw_params):
- if region.name == region_name:
- return region
- return None
View
27 boto/sns/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -15,7 +15,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
@@ -25,6 +25,7 @@
from connection import SNSConnection
from boto.regioninfo import RegionInfo
+
def regions():
"""
Get all available regions for the SNS service.
@@ -55,14 +56,15 @@ def regions():
connection_cls=SNSConnection),
]
+
def connect_to_region(region_name, **kw_params):
"""
- Given a valid region name, return a
+ Given a valid region name, return a
:class:`boto.sns.connection.SNSConnection`.
:type: str
:param region_name: The name of the region to connect to.
-
+
:rtype: :class:`boto.sns.connection.SNSConnection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
@@ -71,20 +73,3 @@ def connect_to_region(region_name, **kw_params):
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.regioninfo.RegionInfo` object
- given a region name.
-
- :type: str
- :param: The name of the region.
-
- :rtype: :class:`boto.regioninfo.RegionInfo`
- :return: The RegionInfo object for the given region or None if
- an invalid region name is provided.
- """
- for region in regions(**kw_params):
- if region.name == region_name:
- return region
- return None
View
3 boto/sqs/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -46,6 +46,7 @@ def regions():
endpoint='ap-southeast-1.queue.amazonaws.com')
]
+
def connect_to_region(region_name, **kw_params):
for region in regions():
if region.name == region_name:
View
25 boto/sts/__init__.py
@@ -15,14 +15,15 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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 connection import STSConnection
from boto.regioninfo import RegionInfo
+
def regions():
"""
Get all available regions for the STS service.
@@ -35,14 +36,15 @@ def regions():
connection_cls=STSConnection)
]
+
def connect_to_region(region_name, **kw_params):
"""
- Given a valid region name, return a
+ Given a valid region name, return a
:class:`boto.sts.connection.STSConnection`.
:type: str
:param region_name: The name of the region to connect to.
-
+
:rtype: :class:`boto.sts.connection.STSConnection` or ``None``
:return: A connection to the given region, or None if an invalid region
name is given
@@ -51,20 +53,3 @@ def connect_to_region(region_name, **kw_params):
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.regioninfo.RegionInfo` object
- given a region name.
-
- :type: str
- :param: The name of the region.
-
- :rtype: :class:`boto.regioninfo.RegionInfo`
- :return: The RegionInfo object for the given region or None if
- an invalid region name is provided.
- """
- for region in regions(**kw_params):
- if region.name == region_name:
- return region
- return None
View
7 boto/swf/__init__.py
@@ -16,7 +16,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
@@ -25,10 +25,11 @@
from boto.ec2.regioninfo import RegionInfo
import boto.swf.layer1
+
def regions():
"""
Get all available regions for the Amazon Simple Workflow service.
-
+
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo`
"""
@@ -38,9 +39,9 @@ def regions():
connection_cls=boto.swf.layer1.Layer1),
]
+
def connect_to_region(region_name, **kw_params):
for region in regions():
if region.name == region_name:
return region.connect(**kw_params)
return None
-
View
21 tests/integration/cloudformation/__init__.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All Rights Reserved
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
View
40 tests/integration/cloudformation/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.cloudformation
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ cloudformation = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.cloudformation.regions():
+ c = region.connect()
+ c.describe_stacks()
View
21 tests/integration/cloudsearch/__init__.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All Rights Reserved
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
View
40 tests/integration/cloudsearch/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.cloudsearch
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ rds = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.cloudsearch.regions():
+ c = region.connect()
+ c.describe_domains()
View
40 tests/integration/dynamodb/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.dynamodb
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ dynamodb = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.dynamodb.regions():
+ c = region.connect()
+ c.layer1.list_tables()
View
0 tests/integration/autoscale/__init__.py → tests/integration/ec2/autoscale/__init__.py
File renamed without changes.
View
4 ...ation/autoscale/test_cert_verification.py → ...n/ec2/autoscale/test_cert_verification.py
@@ -26,13 +26,13 @@
"""
import unittest
-import time
import boto.ec2.autoscale
class CertVerificationTest(unittest.TestCase):
- rds = True
+ autoscale = True
+ ssl = True
def test_certs(self):
for region in boto.ec2.autoscale.regions():
View
0 .../integration/autoscale/test_connection.py → ...egration/ec2/autoscale/test_connection.py
File renamed without changes.
View
40 tests/integration/ec2/cloudwatch/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.ec2.cloudwatch
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ cloudwatch = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.ec2.cloudwatch.regions():
+ c = region.connect()
+ c.describe_alarms()
View
40 tests/integration/ec2/elb/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.ec2.elb
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ elb = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.ec2.elb.regions():
+ c = region.connect()
+ c.get_all_load_balancers()
View
4 tests/integration/ec2/test_cert_verification.py
@@ -26,13 +26,13 @@
"""
import unittest
-import time
import boto.rds
class CertVerificationTest(unittest.TestCase):
- rds = True
+ ec2 = True
+ ssl = True
def test_certs(self):
for region in boto.rds.regions():
View
2 tests/integration/emr/test_cert_verification.py
@@ -26,13 +26,13 @@
"""
import unittest
-import time
import boto.emr
class EMRCertVerificationTest(unittest.TestCase):
emr = True
+ ssl = True
def test_certs(self):
for region in boto.emr.regions():
View
20 tests/integration/iam/__init__.py
@@ -0,0 +1,20 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
View
40 tests/integration/iam/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.iam
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ iam = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.iam.regions():
+ c = region.connect()
+ c.get_all_users()
View
7 tests/integration/rds/__init__.py
@@ -1,5 +1,6 @@
-# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
-#
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All Rights Reserved
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
@@ -14,7 +15,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# 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.
View
2 tests/integration/rds/test_cert_verification.py
@@ -26,13 +26,13 @@
"""
import unittest
-import time
import boto.rds
class CertVerificationTest(unittest.TestCase):
rds = True
+ ssl = True
def test_certs(self):
for region in boto.rds.regions():
View
20 tests/integration/route53/__init__.py
@@ -0,0 +1,20 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
View
40 tests/integration/route53/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.route53
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ route53 = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.route53.regions():
+ c = region.connect()
+ c.get_all_hosted_zones()
View
40 tests/integration/s3/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on SQS endpoints validate.
+"""
+
+import unittest
+import boto.s3
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ s3 = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.s3.regions():
+ c = region.connect()
+ c.get_all_buckets()
View
40 tests/integration/sdb/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.sdb
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ sdb = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.sdb.regions():
+ c = region.connect()
+ c.get_all_domains()
View
40 tests/integration/ses/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.ses
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ ses = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.ses.regions():
+ c = region.connect()
+ c.list_verified_email_addresses()
View
20 tests/integration/sns/__init__.py
@@ -0,0 +1,20 @@
+# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
View
40 tests/integration/sns/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on SQS endpoints validate.
+"""
+
+import unittest
+import boto.sns
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ sns = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.sns.regions():
+ c = region.connect()
+ c.get_all_topics()
View
2 tests/integration/sqs/test_cert_verification.py
@@ -26,13 +26,13 @@
"""
import unittest
-import time
import boto.sqs
class SQSCertVerificationTest(unittest.TestCase):
sqs = True
+ ssl = True
def test_certs(self):
for region in boto.sqs.regions():
View
40 tests/integration/sts/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.sts
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ sts = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.sts.regions():
+ c = region.connect()
+ c.get_session_token()
View
40 tests/integration/swf/test_cert_verification.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
+# All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# 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.
+
+"""
+Check that all of the certs on all service endpoints validate.
+"""
+
+import unittest
+import boto.swf
+
+
+class CertVerificationTest(unittest.TestCase):
+
+ swf = True
+ ssl = True
+
+ def test_certs(self):
+ for region in boto.swf.regions():
+ c = region.connect()
+ c.list_domains('REGISTERED')

0 comments on commit c8864be

Please sign in to comment.