Skip to content

Commit

Permalink
RightAws: As: fix type in :dimension key
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Apr 12, 2010
1 parent d8bcd4b commit 4781490
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/as/right_as_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module RightAws
# as.create_or_update_scaling_trigger('kd.tr.1', 'CentOS.5.1-c-array',
# :measure_name => 'CPUUtilization',
# :statistic => :average,
# :dimentions => {
# :dimensions => {
# 'AutoScalingGroupName' => 'CentOS.5.1-c-array',
# 'Namespace' => 'AWS',
# 'Service' => 'EC2' },
Expand Down Expand Up @@ -455,12 +455,12 @@ def delete_launch_configuration(launch_configuration_name)
# Returns +true+ or an exception.
#
# Options: +:measure_name+, +:statistic+, +:period+, +:lower_threshold+, +:lower_breach_scale_increment+,
# +:upper_threshold+, +:upper_breach_scale_increment+, +:dimentions+, +:breach_duration+, +:unit+, +:custom_unit+
# +:upper_threshold+, +:upper_breach_scale_increment+, +:dimensions+, +:breach_duration+, +:unit+, +:custom_unit+
#
# as.create_or_update_scaling_trigger('kd.tr.1', 'CentOS.5.1-c-array',
# :measure_name => 'CPUUtilization',
# :statistic => :average,
# :dimentions => {
# :dimensions => {
# 'AutoScalingGroupName' => 'CentOS.5.1-c-array',
# 'Namespace' => 'AWS',
# 'Service' => 'EC2' },
Expand All @@ -484,11 +484,11 @@ def create_or_update_scaling_trigger(trigger_name, auto_scaling_group_name, opti
'BreachDuration' => options[:breach_duration] }
request_hash['Unit'] = options[:unit] if options[:unit]
request_hash['CustomUnit'] = options[:custom_unit] if options[:custom_unit]
dimentions = []
(options[:dimentions] || {}).each do |key, values|
Array(values).each { |value| dimentions << [key, value] }
dimensions = []
(options[:dimensions] || {}).each do |key, values|
Array(values).each { |value| dimensions << [key, value] }
end
request_hash.merge!(amazonize_list(['Dimensions.member.?.Name', 'Dimensions.member.?.Value'], dimentions))
request_hash.merge!(amazonize_list(['Dimensions.member.?.Name', 'Dimensions.member.?.Value'], dimensions))
link = generate_request("CreateOrUpdateScalingTrigger", request_hash)
request_info(link, RightHttp2xxParser.new(:logger => @logger))
end
Expand Down

0 comments on commit 4781490

Please sign in to comment.