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

Merge pull request #1455 from trotter/fix-alarms

Properly return all alarms
This commit is contained in:
Wesley Beary 2013-01-08 12:49:09 -08:00
commit fa913bc516

View file

@ -12,9 +12,9 @@ module Fog
data = []
next_token = nil
loop do
result = service.describe_alarms('NextToken' => next_token).body['DescribeAlarmsResult']
data += result['MetricAlarms']
next_token = result['NextToken']
body = service.describe_alarms('NextToken' => next_token).body
data += body['DescribeAlarmsResult']['MetricAlarms']
next_token = body['ResponseMetadata']['NextToken']
break if next_token.nil?
end
load(data)