mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Swapped to SecurityGroupId
This commit is contained in:
parent
5a811bf0d1
commit
4027624c78
1 changed files with 1 additions and 10 deletions
|
@ -95,7 +95,7 @@ module Fog
|
|||
'LaunchSpecification.KeyName' => key_name,
|
||||
'LaunchSpecification.Monitoring.Enabled' => monitoring,
|
||||
'LaunchSpecification.Placement.AvailabilityZone' => availability_zone,
|
||||
'LaunchSpecification.SecurityGroup' => groups,
|
||||
'LaunchSpecification.SecurityGroupId' => groups,
|
||||
'LaunchSpecification.EbsOptimized' => ebs_optimized,
|
||||
'LaunchSpecification.UserData' => user_data,
|
||||
'LaunchSpecification.SubnetId' => subnet_id,
|
||||
|
@ -106,15 +106,6 @@ module Fog
|
|||
'ValidUntil' => valid_until }
|
||||
options.delete_if {|key, value| value.nil?}
|
||||
|
||||
# If subnet is defined then this is a Virtual Private Cloud.
|
||||
# subnet & security group cannot co-exist. SecurityGroupId must be
|
||||
# used instead of SecurityGroup
|
||||
if subnet_id
|
||||
options['LaunchSpecification.SecurityGroupId'] = options.delete('LaunchSpecification.SecurityGroup')
|
||||
else
|
||||
options.delete('LaunchSpecification.SubnetId')
|
||||
end
|
||||
|
||||
data = service.request_spot_instances(image_id, flavor_id, price, options).body
|
||||
spot_instance_request = data['spotInstanceRequestSet'].first
|
||||
spot_instance_request['launchSpecification'].each do |name,value|
|
||||
|
|
Loading…
Reference in a new issue