Class: Fog::Rackspace::Monitoring::AlarmExamples

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

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/rackspace/models/monitoring/alarm_examples.rb', line 10

def all
  data = service.list_alarm_examples.body['values']
  load(data)
end

#evaluate(alarm_example_id, options = {}) ⇒ Object



22
23
24
25
# File 'lib/fog/rackspace/models/monitoring/alarm_examples.rb', line 22

def evaluate(alarm_example_id, options={})
  data = service.evaluate_alarm_example(alarm_example_id, options).body
  new(data)
end

#get(alarm_example_id) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/rackspace/models/monitoring/alarm_examples.rb', line 15

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