Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'upstream/develop' into develop

  • Loading branch information...
commit 01e75af2c36863bc1bb5969c1fb1aff9f9907d5c 2 parents 645f159 + 57a4189
@jamesls jamesls authored
View
8 boto/connection.py
@@ -523,9 +523,11 @@ def __init__(self, host, aws_access_key_id=None,
# timeouts will only be applied if Python is 2.6 or greater.
self.http_connection_kwargs = {}
if (sys.version_info[0], sys.version_info[1]) >= (2, 6):
- if config.has_option('Boto', 'http_socket_timeout'):
- timeout = config.getint('Boto', 'http_socket_timeout')
- self.http_connection_kwargs['timeout'] = timeout
+ # If timeout isn't defined in boto config file, use 70 second
+ # default as recommended by
+ # http://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForActivityTask.html
+ self.http_connection_kwargs['timeout'] = config.getint(
+ 'Boto', 'http_socket_timeout', 70)
if isinstance(provider, Provider):
# Allow overriding Provider
View
2  boto/gs/bucket.py
@@ -390,7 +390,7 @@ def _set_acl_helper(self, acl_or_str, key_name, headers, query_args,
if canned:
headers[self.connection.provider.acl_header] = acl_or_str
else:
- data = acl_or_str.encode('UTF-8')
+ data = acl_or_str
if generation:
query_args += '&generation=%s' % generation
View
2  boto/gs/connection.py
@@ -50,7 +50,7 @@ def create_bucket(self, bucket_name, headers=None,
storage_class='STANDARD'):
"""
Creates a new bucket. By default it's located in the USA. You can
- pass Location.EU to create an European bucket. You can also pass
+ pass Location.EU to create bucket in the EU. You can also pass
a LocationConstraint for where the bucket should be located, and
a StorageClass describing how the data should be stored.
View
19 boto/gs/resumable_upload_handler.py
@@ -19,7 +19,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-import cgi
import errno
import httplib
import os
@@ -28,7 +27,6 @@
import socket
import time
import urlparse
-import boto
from boto import config, UserAgent
from boto.connection import AWSAuthConnection
from boto.exception import InvalidUriError
@@ -163,22 +161,6 @@ def get_tracker_uri(self):
"""
return self.tracker_uri
- def get_upload_id(self):
- """
- Returns the upload ID for the resumable upload, or None if the upload
- has not yet started.
- """
- # We extract the upload_id from the tracker uri. We could retrieve the
- # upload_id from the headers in the response but this only works for
- # the case where we get the tracker uri from the service. In the case
- # where we get the tracker from the tracking file we need to do this
- # logic anyway.
- delim = '?upload_id='
- if self.tracker_uri and delim in self.tracker_uri:
- return self.tracker_uri[self.tracker_uri.index(delim) + len(delim):]
- else:
- return None
-
def _remove_tracker_file(self):
if (self.tracker_file_name and
os.path.exists(self.tracker_file_name)):
@@ -397,7 +379,6 @@ def _upload_file_bytes(self, conn, http_conn, fp, file_length,
(total_bytes_uploaded, file_length),
ResumableTransferDisposition.ABORT)
resp = http_conn.getresponse()
- body = resp.read()
# Restore http connection debug level.
http_conn.set_debuglevel(conn.debug)
View
4 boto/opsworks/layer1.py
@@ -74,7 +74,7 @@ def clone_stack(self, source_stack_id, service_role_arn, name=None,
:param name: The cloned stack name.
:type region: string
- :param region: The cloned stack AWS region, such as "us-east-1". For
+ :param region: The cloned stack AWS region, such as "us-west-2". For
more information about AWS regions, see `Regions and Endpoints`_
:type attributes: map
@@ -463,7 +463,7 @@ def create_stack(self, name, region, service_role_arn,
:param name: The stack name.
:type region: string
- :param region: The stack AWS region, such as "us-east-1". For more
+ :param region: The stack AWS region, such as "us-west-2". For more
information about Amazon regions, see `Regions and Endpoints`_.
:type attributes: map
View
31 boto/s3/key.py
@@ -21,6 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+import errno
import mimetypes
import os
import re
@@ -32,6 +33,7 @@
import urllib
import boto.utils
from boto.exception import BotoClientError
+from boto.exception import StorageDataError
from boto.provider import Provider
from boto.s3.keyfile import KeyFile
from boto.s3.user import User
@@ -1400,18 +1402,23 @@ def _get_file_internal(self, fp, headers=None, cb=None, num_cb=10,
cb_count = 0
i = 0
cb(data_len, cb_size)
- for bytes in self:
- fp.write(bytes)
- data_len += len(bytes)
- for alg in digesters:
- digesters[alg].update(bytes)
- if cb:
- if cb_size > 0 and data_len >= cb_size:
- break
- i += 1
- if i == cb_count or cb_count == -1:
- cb(data_len, cb_size)
- i = 0
+ try:
+ for bytes in self:
+ fp.write(bytes)
+ data_len += len(bytes)
+ for alg in digesters:
+ digesters[alg].update(bytes)
+ if cb:
+ if cb_size > 0 and data_len >= cb_size:
+ break
+ i += 1
+ if i == cb_count or cb_count == -1:
+ cb(data_len, cb_size)
+ i = 0
+ except IOError as e:
+ if e.errno == errno.ENOSPC:
+ raise StorageDataError('Out of space for destination file '
+ '%s' % fp.name)
if cb and (cb_count <= 1 or i > 0) and data_len > 0:
cb(data_len, cb_size)
for alg in digesters:
View
47 docs/source/boto_config_tut.rst
@@ -33,6 +33,13 @@ methods of that object. In addition, the boto
:py:class:`Config <boto.pyami.config.Config>` class defines additional
methods that are described on the PyamiConfigMethods page.
+An example ``~/.boto`` file should look like::
+
+ [Credentials]
+ aws_access_key_id = <your_access_key_here>
+ aws_secret_access_key = <your_secret_key_here>
+
+
Sections
--------
@@ -148,7 +155,7 @@ This section is also used for specifying endpoints for non-AWS services such as
Eucalyptus and Walrus.
:eucalyptus_host: Select a default endpoint host for eucalyptus
-:walrus_host: Select a default host for Walrus
+:walrus_host: Select a default host for Walrus
For example::
@@ -170,8 +177,8 @@ For example::
[Boto]
autoscale_version = 2011-01-01
- autoscale_endpoint = autoscaling.us-east-1.amazonaws.com
- autoscale_region_name = us-east-1
+ autoscale_endpoint = autoscaling.us-west-2.amazonaws.com
+ autoscale_region_name = us-west-2
Cloudformation settings can also be defined:
@@ -184,8 +191,8 @@ For example::
[Boto]
cfn_version = 2010-05-15
- cfn_region_name = us-east-1
- cfn_region_endpoint = cloudformation.us-east-1.amazonaws.com
+ cfn_region_name = us-west-2
+ cfn_region_endpoint = cloudformation.us-west-2.amazonaws.com
Cloudsearch settings:
@@ -195,8 +202,8 @@ Cloudsearch settings:
For example::
[Boto]
- cs_region_name = us-east-1
- cs_region_endpoint = cloudsearch.us-east-1.amazonaws.com
+ cs_region_name = us-west-2
+ cs_region_endpoint = cloudsearch.us-west-2.amazonaws.com
Cloudwatch settings:
@@ -208,8 +215,8 @@ For example::
[Boto]
cloudwatch_version = 2010-08-01
- cloudwatch_region_name = us-east-1
- cloudwatch_region_endpoint = monitoring.us-east-1.amazonaws.com
+ cloudwatch_region_name = us-west-2
+ cloudwatch_region_endpoint = monitoring.us-west-2.amazonaws.com
EC2 settings:
@@ -221,8 +228,8 @@ For example::
[Boto]
ec2_version = 2012-12-01
- ec2_region_name = us-east-1
- ec2_region_endpoint = ec2.us-east-1.amazonaws.com
+ ec2_region_name = us-west-2
+ ec2_region_endpoint = ec2.us-west-2.amazonaws.com
ELB settings:
@@ -234,8 +241,8 @@ For example::
[Boto]
elb_version = 2012-06-01
- elb_region_name = us-east-1
- elb_region_endpoint = elasticloadbalancing.us-east-1.amazonaws.com
+ elb_region_name = us-west-2
+ elb_region_endpoint = elasticloadbalancing.us-west-2.amazonaws.com
EMR settings:
@@ -247,9 +254,9 @@ For example::
[Boto]
emr_version = 2009-03-31
- emr_region_name = us-east-1
- emr_region_endpoint = elasticmapreduce.us-east-1.amazonaws.com
-
+ emr_region_name = us-west-2
+ emr_region_endpoint = elasticmapreduce.us-west-2.amazonaws.com
+
Precedence
----------
@@ -301,7 +308,7 @@ Amazon Simple Workflow service.
Example::
[SWF]
- region = us-east-1
+ region = us-west-2
Pyami
^^^^^
@@ -318,7 +325,7 @@ Example::
DB
^^
The DB section is used to configure access to databases through the
-:func:`boto.sdb.db.manager.get_manager` function.
+:func:`boto.sdb.db.manager.get_manager` function.
:db_type: Type of the database. Current allowed values are `SimpleDB` and
`XML`.
@@ -359,7 +366,7 @@ This section is used to configure SimpleDB
Example::
[SDB]
- region = us-east-1
+ region = us-west-2
DynamoDB
^^^^^^^^
@@ -372,5 +379,5 @@ This section is used to configure DynamoDB
Example::
[DynamoDB]
- region = us-east-1
+ region = us-west-2
validate_checksums = True
View
24 docs/source/cloudsearch_tut.rst
@@ -16,12 +16,12 @@ The first step in accessing CloudSearch is to create a connection to the service
The recommended method of doing this is as follows::
>>> import boto.cloudsearch
- >>> conn = boto.cloudsearch.connect_to_region("us-east-1",
- ... aws_access_key_id='<aws access key'>,
+ >>> conn = boto.cloudsearch.connect_to_region("us-west-2",
+ ... aws_access_key_id='<aws access key'>,
... aws_secret_access_key='<aws secret key>')
At this point, the variable conn will point to a CloudSearch connection object
-in the us-east-1 region. Currently, this is the only region which has the
+in the us-west-2 region. Currently, this is the only region which has the
CloudSearch service. In this example, the AWS access key and AWS secret key are
passed in to the method explicitly. Alternatively, you can set the environment
variables:
@@ -32,7 +32,7 @@ variables:
and then simply call::
>>> import boto.cloudsearch
- >>> conn = boto.cloudsearch.connect_to_region("us-east-1")
+ >>> conn = boto.cloudsearch.connect_to_region("us-west-2")
In either case, conn will point to the Connection object which we will use
throughout the remainder of this tutorial.
@@ -81,15 +81,15 @@ it's a text or integer field, as well as optionaly a default value::
>>> uname_field = domain.create_index_field('username', 'text')
>>> # Epoch time of when the user last did something
- >>> time_field = domain.create_index_field('last_activity',
- ... 'uint',
+ >>> time_field = domain.create_index_field('last_activity',
+ ... 'uint',
... default=0)
It is also possible to mark an index field as a facet. Doing so allows a search
query to return categories into which results can be grouped, or to create
drill-down categories::
-
- >>> # But it would be neat to drill down into different countries
+
+ >>> # But it would be neat to drill down into different countries
>>> loc_field = domain.create_index_field('location', 'text', facet=True)
Finally, you can also mark a snippet of text as being able to be returned
@@ -101,7 +101,7 @@ directly in your search query by using the results option::
You can add up to 20 index fields in this manner::
>>> follower_field = domain.create_index_field('follower_count',
- ... 'uint',
+ ... 'uint',
... default=0)
Adding Documents to the Index
@@ -170,7 +170,7 @@ do with the :py:meth:`commit
cloudsearch will charge per 1000 batch uploads. Each batch upload must be under
5MB::
- >>> result = doc_service.commit()
+ >>> result = doc_service.commit()
The result is an instance of :py:class:`CommitResponse
<boto.cloudsearch.document.CommitResponse>` which will make the plain
@@ -270,7 +270,7 @@ other criteria, such as showing most recently active user, or combining the
recency score with the text_relevance::
>>> domain.create_rank_expression('recently_active', 'last_activity')
-
+
>>> domain.create_rank_expression('activish',
... 'text_relevance + ((follower_count/(time() - last_activity))*1000)')
@@ -427,6 +427,6 @@ It is also possible to delete documents::
>>> doc_service = domain.get_document_service()
>>> # Again we'll cheat and use the current epoch time as our version number
-
+
>>> doc_service.delete(4, int(time.mktime(datetime.utcnow().timetuple())))
>>> service.commit()
View
16 docs/source/ec2_tut.rst
@@ -15,7 +15,7 @@ The first step in accessing EC2 is to create a connection to the service.
The recommended way of doing this in boto is::
>>> import boto.ec2
- >>> conn = boto.ec2.connect_to_region("us-east-1",
+ >>> conn = boto.ec2.connect_to_region("us-west-2",
... aws_access_key_id='<aws access key>',
... aws_secret_access_key='<aws secret key>')
@@ -24,7 +24,7 @@ this example, the AWS access key and AWS secret key are passed in to the method
explicitly. Alternatively, you can set the boto config environment variables
and then simply specify which region you want as follows::
- >>> conn = boto.ec2.connect_to_region("us-east-1")
+ >>> conn = boto.ec2.connect_to_region("us-west-2")
In either case, conn will point to an EC2Connection object which we will
use throughout the remainder of this tutorial.
@@ -105,10 +105,10 @@ An instance object allows you get more meta-data available about the instance::
>>> inst.instance_type
u'c1.xlarge'
>>> inst.placement
- u'us-east-1a'
+ u'us-west-2'
In this case, we can see that our instance is a c1.xlarge instance in the
-`us-east-1a` availability zone.
+`us-west-2` availability zone.
=================================
Using Elastic Block Storage (EBS)
@@ -123,10 +123,10 @@ must be in the same availability zone as the EC2 instance you wish to attach it
to.
To actually create a volume you will need to specify a few details. The
-following example will create a 50GB EBS in one of the `us-east-1a` availability
+following example will create a 50GB EBS in one of the `us-west-2` availability
zones::
- >>> vol = conn.create_volume(50, "us-east-1a")
+ >>> vol = conn.create_volume(50, "us-west-2")
>>> vol
Volume:vol-00000000
@@ -136,7 +136,7 @@ You can check that the volume is now ready and available::
>>> curr_vol.status
u'available'
>>> curr_vol.zone
- u'us-east-1a'
+ u'us-west-2'
We can now attach this volume to the EC2 instance we created earlier, making it
available as a new device::
@@ -166,7 +166,7 @@ Once you have a snapshot, you can create a new volume from it. Volumes are
created lazily from snapshots, which means you can start using such a volume
straight away::
- >>> new_vol = snapshot.create_volume('us-east-1a')
+ >>> new_vol = snapshot.create_volume('us-west-2')
>>> conn.attach_volume (new_vol.id, inst.id, "/dev/sdy")
u'attaching'
View
1  docs/source/elb_tut.rst
@@ -60,6 +60,7 @@ connect to one::
[RegionInfo:us-east-1,
RegionInfo:ap-northeast-1,
RegionInfo:us-west-1,
+ RegionInfo:us-west-2,
RegionInfo:ap-southeast-1,
RegionInfo:eu-west-1]
>>> elb = regions[-1].connect()
View
177 docs/source/getting_started.rst
@@ -0,0 +1,177 @@
+.. _getting-started:
+
+=========================
+Getting Started with Boto
+=========================
+
+This tutorial will walk you through installing and configuring ``boto``, as
+well how to use it to make API calls.
+
+This tutorial assumes you are familiar with Python & that you have registered
+for an `Amazon Web Services`_ account. You'll need retrieve your
+``Access Key ID`` and ``Secret Access Key`` from the web-based console.
+
+.. _`Amazon Web Services`: https://aws.amazon.com/
+
+
+Installing Boto
+---------------
+
+You can use ``pip`` to install the latest released version of ``boto``::
+
+ pip install boto
+
+If you want to install ``boto`` from source::
+
+ git clone git://github.com/boto/boto.git
+ cd boto
+ python setup.py install
+
+
+Using Virtual Environments
+--------------------------
+
+Another common way to install ``boto`` is to use a ``virtualenv``, which
+provides isolated environments. First, install the ``virtualenv`` Python
+package::
+
+ pip install virtualenv
+
+Next, create a virtual environment by using the ``virtualenv`` command and
+specifying where you want the virtualenv to be created (you can specify
+any directory you like, though this example allows for compatibility with
+``virtualenvwrapper``)::
+
+ mkdir ~/.virtualenvs
+ virtualenv ~/.virtualenvs/boto
+
+You can now activate the virtual environment::
+
+ source ~/.virtualenvs/boto/bin/activate
+
+Now, any usage of ``python`` or ``pip`` (within the current shell) will default
+to the new, isolated version within your virtualenv.
+
+You can now install ``boto`` into this virtual environment::
+
+ pip install boto
+
+When you are done using ``boto``, you can deactivate your virtual environment::
+
+ deactivate
+
+If you are creating a lot of virtual environments, `virtualenvwrapper`_
+is an excellent tool that lets you easily manage your virtual environments.
+
+.. _`virtualenvwrapper`: http://virtualenvwrapper.readthedocs.org/en/latest/
+
+
+Configuring Boto Credentials
+----------------------------
+
+You have a few options for configuring ``boto`` (see :doc:`boto_config_tut`).
+For this tutorial, we'll be using a configuration file. First, create a
+``~/.boto`` file with these contents::
+
+ [Credentials]
+ aws_access_key_id = YOURACCESSKEY
+ aws_secret_access_key = YOURSECRETKEY
+
+``boto`` supports a number of configuration values. For more information,
+see :doc:`boto_config_tut`. The above file, however, is all we need for now.
+You're now ready to use ``boto``.
+
+
+Making Connections
+------------------
+
+``boto`` provides a number of convenience functions to simplify connecting to a
+service. For example, to work with S3, you can run::
+
+ >>> import boto
+ >>> s3 = boto.connect_s3()
+
+If you want to connect to a different region, you can import the service module
+and use the ``connect_to_region`` functions. For example, to create an EC2
+client in 'us-west-2' region, you'd run the following::
+
+ >>> import boto.ec2
+ >>> ec2 = boto.ec2.connect_to_region('us-west-2')
+
+
+Troubleshooting Connections
+---------------------------
+
+When calling the various ``connect_*`` functions, you might run into an error
+like this::
+
+ >>> import boto
+ >>> s3 = boto.connect_s3()
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ File "boto/__init__.py", line 121, in connect_s3
+ return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
+ File "boto/s3/connection.py", line 171, in __init__
+ validate_certs=validate_certs)
+ File "boto/connection.py", line 548, in __init__
+ host, config, self.provider, self._required_auth_capability())
+ File "boto/auth.py", line 668, in get_auth_handler
+ 'Check your credentials' % (len(names), str(names)))
+ boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
+
+This is because ``boto`` cannot find credentials to use. Verify that you have
+created a ``~/.boto`` file as shown above. You can also turn on debug logging
+to verify where your credentials are coming from::
+
+ >>> import boto
+ >>> boto.set_stream_logger('boto')
+ >>> s3 = boto.connect_s3()
+ 2012-12-10 17:15:03,799 boto [DEBUG]:Using access key found in config file.
+ 2012-12-10 17:15:03,799 boto [DEBUG]:Using secret key found in config file.
+
+
+Interacting with AWS Services
+-----------------------------
+
+Once you have a client for the specific service you want, there are methods on
+that object that will invoke API operations for that service. The following
+code demonstrates how to create a bucket and put an object in that bucket::
+
+ >>> import boto
+ >>> import time
+ >>> s3 = boto.connect_s3()
+
+ # Create a new bucket. Buckets must have a globally unique name (not just
+ # unique to your account).
+ >>> bucket = s3.create_bucket('boto-demo-%s' % int(time.time()))
+
+ # Create a new key/value pair.
+ >>> key = bucket.new_key('mykey')
+ >>> key.set_contents_from_string("Hello World!")
+
+ # Sleep to ensure the data is eventually there.
+ >>> time.sleep(2)
+
+ # Retrieve the contents of ``mykey``.
+ >>> print key.get_contents_as_string()
+ 'Hello World!'
+
+ # Delete the key.
+ >>> key.delete()
+ # Delete the bucket.
+ >>> bucket.delete()
+
+Each service supports a different set of commands. You'll want to refer to the
+other guides & API references in this documentation, as well as referring to
+the `official AWS API`_ documentation.
+
+.. _`official AWS API`: https://aws.amazon.com/documentation/
+
+Next Steps
+----------
+
+For many of the services that ``boto`` supports, there are tutorials as
+well as detailed API documentation. If you are interested in a specific
+service, the tutorial for the service is a good starting point. For instance,
+if you'd like more information on S3, check out the :ref:`S3 Tutorial <s3_tut>`
+and the :doc:`S3 API reference <ref/s3>`.
View
12 docs/source/index.rst
@@ -9,6 +9,13 @@ offered by `Amazon Web Services`_.
.. _Amazon Web Services: http://aws.amazon.com/
+Getting Started
+---------------
+
+If you've never used ``boto`` before, you should read the
+:doc:`Getting Started with Boto <getting_started>` guide to get familiar
+with ``boto`` & its usage.
+
Currently Supported Services
----------------------------
@@ -97,6 +104,7 @@ Additional Resources
.. toctree::
:hidden:
+ getting_started
ec2_tut
security_groups
ref/ec2
@@ -137,6 +145,10 @@ Additional Resources
boto_config_tut
ref/index
documentation
+ contributing
+ ref/datapipeline
+ ref/elasticache
+ ref/elastictranscoder
Indices and tables
View
18 docs/source/rds_tut.rst
@@ -15,12 +15,12 @@ The recommended method of doing this is as follows::
>>> import boto.rds
>>> conn = boto.rds.connect_to_region(
- ... "us-east-1",
+ ... "us-west-2",
... aws_access_key_id='<aws access key'>,
... aws_secret_access_key='<aws secret key>')
At this point the variable conn will point to an RDSConnection object in the
-US-EAST-1 region. Bear in mind that just as any other AWS service, RDS is
+US-WEST-2 region. Bear in mind that just as any other AWS service, RDS is
region-specific. In this example, the AWS access key and AWS secret key are
passed in to the method explicitely. Alternatively, you can set the environment
variables:
@@ -31,7 +31,7 @@ variables:
and then simply call::
>>> import boto.rds
- >>> conn = boto.rds.connect_to_region("us-east-1")
+ >>> conn = boto.rds.connect_to_region("us-west-2")
In either case, conn will point to an RDSConnection object which we will
use throughout the remainder of this tutorial.
@@ -56,7 +56,7 @@ To check on the status of your RDS instance, you will have to query the RDS conn
>>> db.status
u'available'
>>> db.endpoint
- (u'db-master-1.aaaaaaaaaa.us-east-1.rds.amazonaws.com', 3306)
+ (u'db-master-1.aaaaaaaaaa.us-west-2.rds.amazonaws.com', 3306)
Creating a Security Group
-------------------------
@@ -82,10 +82,10 @@ Once you have reached this step, you can connect to your RDS instance as you
would with any other MySQL instance::
>>> db.endpoint
- (u'db-master-1.aaaaaaaaaa.us-east-1.rds.amazonaws.com', 3306)
+ (u'db-master-1.aaaaaaaaaa.us-west-2.rds.amazonaws.com', 3306)
- % mysql -h db-master-1.aaaaaaaaaa.us-east-1.rds.amazonaws.com -u root -phunter2
- mysql>
+ % mysql -h db-master-1.aaaaaaaaaa.us-west-2.rds.amazonaws.com -u root -phunter2
+ mysql>
Making a backup
@@ -101,8 +101,8 @@ Once this snapshot is complete, you can create a new database instance from
it::
>>> db2 = conn.restore_dbinstance_from_dbsnapshot(
- ... 'db-master-1-2013-02-05',
+ ... 'db-master-1-2013-02-05',
... 'db-restored-1',
... 'db.m1.small',
- ... 'us-east-1')
+ ... 'us-west-2')
View
4 docs/source/ses_tut.rst
@@ -17,11 +17,11 @@ To do so, the most straight forward way is the following::
>>> import boto.ses
>>> conn = boto.ses.connect_to_region(
- 'us-east-1',
+ 'us-west-2',
aws_access_key_id='<YOUR_AWS_KEY_ID>',
aws_secret_access_key='<YOUR_AWS_SECRET_KEY>')
>>> conn
- SESConnection:email.us-east-1.amazonaws.com
+ SESConnection:email.us-west-2.amazonaws.com
Bear in mind that if you have your credentials in boto config in your home
directory, the two keyword arguments in the call above are not needed. More
View
6 docs/source/sqs_tut.rst
@@ -15,12 +15,12 @@ The recommended method of doing this is as follows::
>>> import boto.sqs
>>> conn = boto.sqs.connect_to_region(
- ... "us-east-1",
+ ... "us-west-2",
... aws_access_key_id='<aws access key'>,
... aws_secret_access_key='<aws secret key>')
At this point the variable conn will point to an SQSConnection object in the
-US-EAST-1 region. Bear in mind that just as any other AWS service, SQS is
+US-WEST-2 region. Bear in mind that just as any other AWS service, SQS is
region-specific. In this example, the AWS access key and AWS secret key are
passed in to the method explicitely. Alternatively, you can set the environment
variables:
@@ -31,7 +31,7 @@ variables:
and then simply call::
>>> import boto.sqs
- >>> conn = boto.sqs.connect_to_region("us-east-1")
+ >>> conn = boto.sqs.connect_to_region("us-west-2")
In either case, conn will point to an SQSConnection object which we will
use throughout the remainder of this tutorial.
View
2  tests/integration/gs/test_basic.py
@@ -25,7 +25,7 @@
# IN THE SOFTWARE.
"""
-Some unit tests for the GSConnection
+Some integration tests for the GSConnection
"""
import os
View
2  tests/integration/gs/test_generation_conditionals.py
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-"""Unit tests for GS versioning support."""
+"""Integration tests for GS versioning support."""
import StringIO
import os
View
2  tests/integration/gs/test_resumable_downloads.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright 2010 Google Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
View
2  tests/integration/gs/test_resumable_uploads.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright 2010 Google Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
View
2  tests/integration/gs/test_storage_uri.py
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-"""Unit tests for StorageUri interface."""
+"""Integration tests for StorageUri interface."""
import binascii
import re
View
2  tests/integration/gs/test_versioning.py
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-"""Unit tests for GS versioning support."""
+"""Integration tests for GS versioning support."""
from xml import sax
View
22 tests/integration/gs/util.py
@@ -1,3 +1,25 @@
+# Copyright (c) 2012, Google, Inc.
+# 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.
+
import time
from boto.provider import Provider
Please sign in to comment.
Something went wrong with that request. Please try again.