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 Monitoring
|
||||||
class AgentTokens < Fog::Collection
|
class AgentTokens < Fog::Collection
|
||||||
|
|
||||||
|
attribute :marker
|
||||||
|
|
||||||
model Fog::Rackspace::Monitoring::AgentToken
|
model Fog::Rackspace::Monitoring::AgentToken
|
||||||
|
|
||||||
def all(options={})
|
def all(options={})
|
||||||
clear
|
clear
|
||||||
body = service.list_agent_tokens(options).body
|
body = service.list_agent_tokens(options).body
|
||||||
|
self.marker = data['metadata']['next_marker']
|
||||||
|
|
||||||
load(body['values'])
|
load(body['values'])
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,12 +7,15 @@ module Fog
|
||||||
class Alarms < Fog::Collection
|
class Alarms < Fog::Collection
|
||||||
|
|
||||||
attribute :entity
|
attribute :entity
|
||||||
|
attribute :marker
|
||||||
|
|
||||||
model Fog::Rackspace::Monitoring::Alarm
|
model Fog::Rackspace::Monitoring::Alarm
|
||||||
|
|
||||||
def all(options={})
|
def all(options={})
|
||||||
requires :entity
|
requires :entity
|
||||||
data = service.list_alarms(entity.identity, options).body['values']
|
data = service.list_alarms(entity.identity, options).body['values']
|
||||||
|
self.marker = data['metadata']['next_marker']
|
||||||
|
|
||||||
load(data)
|
load(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,15 @@ module Fog
|
||||||
class Checks < Fog::Collection
|
class Checks < Fog::Collection
|
||||||
|
|
||||||
attribute :entity
|
attribute :entity
|
||||||
|
attribute :marker
|
||||||
|
|
||||||
model Fog::Rackspace::Monitoring::Check
|
model Fog::Rackspace::Monitoring::Check
|
||||||
|
|
||||||
def all(options={})
|
def all(options={})
|
||||||
requires :entity
|
requires :entity
|
||||||
data = service.list_checks(entity.identity, options).body['values']
|
data = service.list_checks(entity.identity, options).body['values']
|
||||||
|
self.marker = data['metadata']['next_marker']
|
||||||
|
|
||||||
load(data)
|
load(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue