1
0
Fork 0
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:
Dave Myron 2013-06-14 00:06:51 -07:00
parent 5a811bf0d1
commit 4027624c78

View file

@ -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|