Sha256: 62a39d01afcdc7d102a2f9dda3a7f9860df4ab85c65faa97c1e08e5f0030d130
Contents?: true
Size: 984 Bytes
Versions: 14
Compression:
Stored size: 984 Bytes
Contents
require 'fog/core/collection' require 'rackspace-monitoring/monitoring/models/entity' require 'rackspace-monitoring/monitoring/models/check' module Fog module Monitoring class Rackspace class Entities < Fog::Collection model Fog::Monitoring::Rackspace::Entity def all data = connection.list_entities.body['values'] load(data) end def get(entity_id) data = connection.get_entity(entity_id).body new(data) rescue Fog::Monitoring::Rackspace::NotFound nil end def overview data = connection.list_overview.body['values'] loadAll(data) end def loadAll(objects) clear for object in objects en = new(object['entity']) self << en en.checks.load(object['checks']) en.alarms.load(object['alarms']) end self end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems