Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow a spot instance request type to be passed to request_spot_insta…

…nces. Fixes issue 466.
  • Loading branch information...
commit 4b92eafdce157d7341c895b3e779b013553f54c8 1 parent 76d00c0
Mitch Garnaat authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  boto/ec2/connection.py
View
3  boto/ec2/connection.py
@@ -797,7 +797,7 @@ def get_spot_price_history(self, start_time=None, end_time=None,
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 @@ def request_spot_instances(self, price, image_id, count=1, type=None,
associated with the request for machines
"""
params = {'LaunchSpecification.ImageId':image_id,
+ 'Type' : type,
'SpotPrice' : price}
if count:
params['InstanceCount'] = count

0 comments on commit 4b92eaf

Please sign in to comment.
Something went wrong with that request. Please try again.