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:
parent
fae0ff06fb
commit
42ef016333
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue