Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
Keeping up with upstream.
  • Loading branch information
kurin committed Feb 22, 2013
2 parents 9bf91c4 + d443e95 commit fe97740
Show file tree
Hide file tree
Showing 32 changed files with 614 additions and 168 deletions.
2 changes: 1 addition & 1 deletion bin/mturk
Expand Up @@ -25,8 +25,8 @@ import os.path
import string
import inspect
import datetime, calendar
import json
import boto.mturk.connection, boto.mturk.price, boto.mturk.question, boto.mturk.qualification
from boto.compat import json

# --------------------------------------------------
# Globals
Expand Down
10 changes: 1 addition & 9 deletions bin/sdbadmin
Expand Up @@ -26,15 +26,7 @@ VERSION = "%prog version 1.0"
import boto
import time
from boto import sdb

# Allow support for JSON
try:
import simplejson as json
except:
try:
import json
except:
json = False
from boto.compat import json

def choice_input(options, default=None, title=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion boto/beanstalk/exception.py
@@ -1,5 +1,5 @@
import sys
import json
from boto.compat import json
from boto.exception import BotoServerError


Expand Down
4 changes: 2 additions & 2 deletions boto/beanstalk/layer1.py
Expand Up @@ -21,10 +21,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
import json

import boto
import boto.jsonresponse
from boto.compat import json
from boto.regioninfo import RegionInfo
from boto.connection import AWSQueryConnection

Expand Down Expand Up @@ -54,7 +54,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
security_token)

def _required_auth_capability(self):
return ['sign-v2']
return ['hmac-v4']

def _encode_bool(self, v):
v = bool(v)
Expand Down
3 changes: 3 additions & 0 deletions boto/cloudsearch/__init__.py
Expand Up @@ -35,6 +35,9 @@ def regions():
return [RegionInfo(name='us-east-1',
endpoint='cloudsearch.us-east-1.amazonaws.com',
connection_cls=boto.cloudsearch.layer1.Layer1),
RegionInfo(name='eu-west-1',
endpoint='cloudsearch.eu-west-1.amazonaws.com',
connection_cls=boto.cloudsearch.layer1.Layer1),
]


Expand Down
2 changes: 1 addition & 1 deletion boto/cloudsearch/search.py
Expand Up @@ -23,8 +23,8 @@
#
from math import ceil
import time
import json
import boto
from boto.compat import json
import requests


Expand Down
2 changes: 2 additions & 0 deletions boto/connection.py
Expand Up @@ -730,6 +730,8 @@ def proxy_ssl(self, host=None, port=None):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
sock.connect((self.proxy, int(self.proxy_port)))
if "timeout" in self.http_connection_kwargs:
sock.settimeout(self.http_connection_kwargs["timeout"])
except:
raise
boto.log.debug("Proxy connection: CONNECT %s HTTP/1.0\r\n", host)
Expand Down
2 changes: 1 addition & 1 deletion boto/core/credentials.py
Expand Up @@ -23,8 +23,8 @@
#
import os
from six.moves import configparser
from boto.compat import json
import requests
import json


class Credentials(object):
Expand Down
2 changes: 1 addition & 1 deletion boto/datapipeline/layer1.py
Expand Up @@ -20,8 +20,8 @@
# IN THE SOFTWARE.
#

import json
import boto
from boto.compat import json
from boto.connection import AWSQueryConnection
from boto.regioninfo import RegionInfo
from boto.exception import JSONResponseError
Expand Down
25 changes: 13 additions & 12 deletions boto/ec2/blockdevicemapping.py
Expand Up @@ -125,17 +125,18 @@ def build_list_params(self, params, prefix=''):
params['%s.VirtualName' % pre] = block_dev.ephemeral_name
else:
if block_dev.no_device:
params['%s.Ebs.NoDevice' % pre] = 'true'
if block_dev.snapshot_id:
params['%s.Ebs.SnapshotId' % pre] = block_dev.snapshot_id
if block_dev.size:
params['%s.Ebs.VolumeSize' % pre] = block_dev.size
if block_dev.delete_on_termination:
params['%s.Ebs.DeleteOnTermination' % pre] = 'true'
params['%s.NoDevice' % pre] = ''
else:
params['%s.Ebs.DeleteOnTermination' % pre] = 'false'
if block_dev.volume_type:
params['%s.Ebs.VolumeType' % pre] = block_dev.volume_type
if block_dev.iops is not None:
params['%s.Ebs.Iops' % pre] = block_dev.iops
if block_dev.snapshot_id:
params['%s.Ebs.SnapshotId' % pre] = block_dev.snapshot_id
if block_dev.size:
params['%s.Ebs.VolumeSize' % pre] = block_dev.size
if block_dev.delete_on_termination:
params['%s.Ebs.DeleteOnTermination' % pre] = 'true'
else:
params['%s.Ebs.DeleteOnTermination' % pre] = 'false'
if block_dev.volume_type:
params['%s.Ebs.VolumeType' % pre] = block_dev.volume_type
if block_dev.iops is not None:
params['%s.Ebs.Iops' % pre] = block_dev.iops
i += 1
4 changes: 4 additions & 0 deletions boto/ec2/instance.py
Expand Up @@ -188,6 +188,8 @@ class Instance(TaggedEC2Object):
:ivar product_codes: A list of product codes associated with this instance.
:ivar ami_launch_index: This instances position within it's launch group.
:ivar monitored: A boolean indicating whether monitoring is enabled or not.
:ivar monitoring_state: A string value that contains the actual value
of the monitoring element returned by EC2.
:ivar spot_instance_request_id: The ID of the spot instance request
if this is a spot instance.
:ivar subnet_id: The VPC Subnet ID, if running in VPC.
Expand Down Expand Up @@ -223,6 +225,7 @@ def __init__(self, connection=None):
self.product_codes = ProductCodes()
self.ami_launch_index = None
self.monitored = False
self.monitoring_state = None
self.spot_instance_request_id = None
self.subnet_id = None
self.vpc_id = None
Expand Down Expand Up @@ -361,6 +364,7 @@ def endElement(self, name, value, connection):
self.ramdisk = value
elif name == 'state':
if self._in_monitoring_element:
self.monitoring_state = value
if value == 'enabled':
self.monitored = True
self._in_monitoring_element = False
Expand Down
2 changes: 1 addition & 1 deletion boto/elasticache/__init__.py
Expand Up @@ -25,7 +25,7 @@

def regions():
"""
Get all available regions for the AWS Elastic Beanstalk service.
Get all available regions for the AWS ElastiCache service.
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo`
Expand Down
3 changes: 2 additions & 1 deletion boto/elasticache/layer1.py
Expand Up @@ -20,8 +20,9 @@
# IN THE SOFTWARE.
#

import json

import boto
from boto.compat import json
from boto.connection import AWSQueryConnection
from boto.regioninfo import RegionInfo

Expand Down
15 changes: 8 additions & 7 deletions boto/elastictranscoder/layer1.py
Expand Up @@ -144,6 +144,7 @@ def create_pipeline(self, name, input_bucket, output_bucket, role,
:type notifications: dict
:param notifications: The () topic that you want to notify to report job
status.
To receive notifications, you must also subscribe
to the new topic in the console.
Expand Down Expand Up @@ -229,7 +230,7 @@ def create_preset(self, name, container, video, audio, thumbnails,
def delete_pipeline(self, id):
"""
To delete a pipeline, send a DELETE request to the
`//pipelines/ [pipelineId] ` resource.
`//pipelines/ [pipelineId]` resource.
You can only delete a pipeline that has never been used or
that is not currently in use (doesn't contain any active
Expand All @@ -246,7 +247,7 @@ def delete_pipeline(self, id):
def delete_preset(self, id):
"""
To delete a preset, send a DELETE request to the `//presets/
[presetId] ` resource.
[presetId]` resource.
If the preset has been used, you cannot delete it.
Expand All @@ -262,7 +263,7 @@ def list_jobs_by_pipeline(self, pipeline_id, ascending=None,
page_token=None):
"""
To get a list of the jobs currently in a pipeline, send a GET
request to the `//jobsByPipeline/ [pipelineId] ` resource.
request to the `//jobsByPipeline/ [pipelineId]` resource.
Elastic Transcoder returns all of the jobs currently in the
specified pipeline. The response body contains one element for
Expand Down Expand Up @@ -296,7 +297,7 @@ def list_jobs_by_pipeline(self, pipeline_id, ascending=None,
def list_jobs_by_status(self, status, ascending=None, page_token=None):
"""
To get a list of the jobs that have a specified status, send a
GET request to the `//jobsByStatus/ [status] ` resource.
GET request to the `//jobsByStatus/ [status]` resource.
Elastic Transcoder returns all of the jobs that have the
specified status. The response body contains one element for
Expand Down Expand Up @@ -352,7 +353,7 @@ def list_presets(self):
def read_job(self, id):
"""
To get detailed information about a job, send a GET request to
the `//jobs/ [jobId] ` resource.
the `//jobs/ [jobId]` resource.
:type id: string
:param id: The identifier of the job for which you want to get detailed
Expand All @@ -365,7 +366,7 @@ def read_job(self, id):
def read_pipeline(self, id):
"""
To get detailed information about a pipeline, send a GET
request to the `//pipelines/ [pipelineId] ` resource.
request to the `//pipelines/ [pipelineId]` resource.
:type id: string
:param id: The identifier of the pipeline to read.
Expand All @@ -377,7 +378,7 @@ def read_pipeline(self, id):
def read_preset(self, id):
"""
To get detailed information about a preset, send a GET request
to the `//presets/ [presetId] ` resource.
to the `//presets/ [presetId]` resource.
:type id: string
:param id: The identifier of the preset for which you want to get
Expand Down

0 comments on commit fe97740

Please sign in to comment.