mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #2514 from fcheung/request_spot_instances_time_coercion
[AWS|EC2] request_spot_instances.rb requires that date parameters be iso...
This commit is contained in:
commit
29b789dc9a
1 changed files with 8 additions and 0 deletions
|
@ -75,6 +75,14 @@ module Fog
|
|||
options['LaunchSpecification.UserData'] = Base64.encode64(options['LaunchSpecification.UserData'])
|
||||
end
|
||||
|
||||
if options['ValidFrom'] && options['ValidFrom'].is_a?(Time)
|
||||
options['ValidFrom'] = options['ValidFrom'].iso8601
|
||||
end
|
||||
|
||||
if options['ValidUntil'] && options['ValidUntil'].is_a?(Time)
|
||||
options['ValidUntil'] = options['ValidUntil'].iso8601
|
||||
end
|
||||
|
||||
request({
|
||||
'Action' => 'RequestSpotInstances',
|
||||
'LaunchSpecification.ImageId' => image_id,
|
||||
|
|
Loading…
Reference in a new issue