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:
commit
fa913bc516
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue