Sha256: 947eab3a99663b0d4a2f7e2cf6412b28435147195c280dbebabe17f6f3a798ac
Contents?: true
Size: 925 Bytes
Versions: 8
Compression:
Stored size: 925 Bytes
Contents
require 'rackspace-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
8 entries across 8 versions & 1 rubygems