class Fog::Monitoring::Rackspace::AgentTokens

Public Instance Methods

all() click to toggle source
# File lib/rackspace-monitoring/monitoring/models/agent_tokens.rb, line 11
def all
  data = []
  opts = {}
  begin
    new_tokens = service.list_agent_tokens(opts)
    data.concat(new_tokens.body['values'])
    opts = {:marker => new_tokens.body['metadata']['next_marker']}
  end until opts[:marker].nil?

  load(data)
end
get(id) click to toggle source
# File lib/rackspace-monitoring/monitoring/models/agent_tokens.rb, line 23
def get(id)
  data = service.get_agent_token(id).body
  new(data)
rescue Fog::Monitoring::Rackspace::NotFound
  nil
end