summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Garnaat <mitch@cloudright.com>2010-10-12 17:08:46 -0400
committerMitch Garnaat <mitch@cloudright.com>2010-10-12 17:08:46 -0400
commit4b92eafdce157d7341c895b3e779b013553f54c8 (patch)
tree37feb904b2c40868dc3a9f6aa4fd4f84822a8af9
parent76d00c0e0c31001febd1330805da878337c37245 (diff)
downloadboto-2.0b3.tar.gz
Allow a spot instance request type to be passed to request_spot_instances. Fixes issue 466.2.0b3
-rw-r--r--boto/ec2/connection.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/boto/ec2/connection.py b/boto/ec2/connection.py
index 1ed5272d..243fe103 100644
--- a/boto/ec2/connection.py
+++ b/boto/ec2/connection.py
@@ -797,7 +797,7 @@ class EC2Connection(AWSQueryConnection):
return self.get_list('DescribeSpotPriceHistory', params,
[('item', SpotPriceHistory)])
- def request_spot_instances(self, price, image_id, count=1, type=None,
+ def request_spot_instances(self, price, image_id, count=1, type='one-time',
valid_from=None, valid_until=None,
launch_group=None, availability_zone_group=None,
key_name=None, security_groups=None,
@@ -889,6 +889,7 @@ class EC2Connection(AWSQueryConnection):
associated with the request for machines
"""
params = {'LaunchSpecification.ImageId':image_id,
+ 'Type' : type,
'SpotPrice' : price}
if count:
params['InstanceCount'] = count