1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fix: tags implementation was defective

This commit is contained in:
Rodrigo Estebanez 2013-10-01 20:31:57 +02:00
parent 16124a9243
commit 4576b38d66

View file

@ -72,16 +72,19 @@ module Fog
if load_balancer_names = options.delete('LoadBalancerNames')
options.merge!(AWS.indexed_param('LoadBalancerNames.member.%d', [*load_balancer_names]))
end
if tags = options.delete('Tags')
tags.each_with_index do |tag, i|
tag.each do |key, value|
options["Tags.member.#{i+1}.#{key}"] = value unless value.nil?
end
i=0
tags.each do |key, value|
i += 1
options["Tags.member.#{i}.Key"] = key.to_s # turns symbol into string
options["Tags.member.#{i}.Value"] = value
end
end
if termination_policies = options.delete('TerminationPolicies')
options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies]))
end
request({
'Action' => 'CreateAutoScalingGroup',
'AutoScalingGroupName' => auto_scaling_group_name,