class Fog::Rackspace::Monitoring::Alarms

Public Instance Methods

all(options={}) click to toggle source
# File lib/fog/rackspace/models/monitoring/alarms.rb, line 13
def all(options={})
  requires :entity
  data = service.list_alarms(entity.identity, options).body
  self.marker = data['metadata']['next_marker']

  load(data['values'])
end
create(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/rackspace/models/monitoring/alarms.rb, line 34
def create(attributes = {})
  requires :entity
  super({ :entity => entity }.merge!(attributes))
end
get(alarm_id) click to toggle source
# File lib/fog/rackspace/models/monitoring/alarms.rb, line 21
def get(alarm_id)
  requires :entity
  data = service.get_alarm(entity.identity, alarm_id).body
  new(data)
rescue Fog::Rackspace::Monitoring::NotFound
  nil
end
new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/rackspace/models/monitoring/alarms.rb, line 29
def new(attributes = {})
  requires :entity
  super({ :entity => entity }.merge!(attributes))
end