Class: Fog::Rackspace::Monitoring::AgentTokens

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/monitoring/agent_tokens.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/fog/rackspace/models/monitoring/agent_tokens.rb', line 11

def all(options={})
  clear
  body = service.list_agent_tokens(options).body

  load(body['values'])
end

#get(id) ⇒ Object



18
19
20
21
22
23
# File 'lib/fog/rackspace/models/monitoring/agent_tokens.rb', line 18

def get(id)
  data = service.get_agent_token(id).body
  new(data)
rescue Fog::Rackspace::Monitoring::NotFound
  nil
end