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

Add pagination markers (#2908)

This commit is contained in:
Tom Noonan II 2014-05-09 14:59:09 -05:00
parent fae0ff06fb
commit 42ef016333
3 changed files with 9 additions and 0 deletions

View file

@ -6,11 +6,14 @@ module Fog
class Monitoring
class AgentTokens < Fog::Collection
attribute :marker
model Fog::Rackspace::Monitoring::AgentToken
def all(options={})
clear
body = service.list_agent_tokens(options).body
self.marker = data['metadata']['next_marker']
load(body['values'])
end

View file

@ -7,12 +7,15 @@ module Fog
class Alarms < Fog::Collection
attribute :entity
attribute :marker
model Fog::Rackspace::Monitoring::Alarm
def all(options={})
requires :entity
data = service.list_alarms(entity.identity, options).body['values']
self.marker = data['metadata']['next_marker']
load(data)
end

View file

@ -7,12 +7,15 @@ module Fog
class Checks < Fog::Collection
attribute :entity
attribute :marker
model Fog::Rackspace::Monitoring::Check
def all(options={})
requires :entity
data = service.list_checks(entity.identity, options).body['values']
self.marker = data['metadata']['next_marker']
load(data)
end