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

Merge pull request #1469 from davetchen/master

Add Tags to create_stack call
This commit is contained in:
Wesley Beary 2013-01-14 13:54:42 -08:00
commit d4d6c1d2bd

View file

@ -51,6 +51,23 @@ module Fog
end
end
num_tags = 0
if options['Tags']
options['Tags'].keys.each_with_index do |key, index|
index += 1 # tags are 1-indexed
num_tags += 1 # 10 tag max
params.merge!({
"Tags.member.#{index}.Key" => key,
"Tags.member.#{index}.Value" => options['Tags'][key]
})
end
end
if num_tags > 10
raise ArgumentError.new("a maximum of 10 tags can be specified <#{num_tags}>")
end
if options['TemplateBody']
params['TemplateBody'] = options['TemplateBody']
elsif options['TemplateURL']