Sha256: 3d92911dd2a22cf8ede429fdbf31ebf63a4a09b51656b0a65ec45d445a539f2d
Contents?: true
Size: 915 Bytes
Versions: 14
Compression:
Stored size: 915 Bytes
Contents
require 'fog/core/collection' require 'rackspace-monitoring/monitoring/models/alarm' module Fog module Monitoring class Rackspace class Alarms < Fog::Collection attribute :entity model Fog::Monitoring::Rackspace::Alarm def all requires :entity data = connection.list_alarms(entity.identity).body['values'] load(data) end def get(alarm_id) requires :entity data = connection.get_alarm(entity.identity, alarm_id).body new(data) rescue Fog::Monitoring::Rackspace::NotFound nil end def new(attributes = {}) requires :entity super({ :entity => entity }.merge!(attributes)) end def create(attributes = {}) requires :entity super({ :entity => entity }.merge!(attributes)) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems