Sha256: fe61a2eaac7e40186a219c0c320b11d81e118f37b4f8454430f9fb05adb096f9
Contents?: true
Size: 775 Bytes
Versions: 20
Compression:
Stored size: 775 Bytes
Contents
require 'fog/openstack/models/collection' require 'fog/openstack/metric/models/metric' module Fog module OpenStack class Metric class Metrics < Fog::OpenStack::Collection model Fog::OpenStack::Metric::Metric def all(options = {}) load_response(service.list_metrics(options)) end def find_by_id(metric_id) resource = service.get_metric(metric_id).body new(resource) rescue Fog::OpenStack::Metric::NotFound nil end def find_measures_by_id(metric_id, options = {}) resource = service.get_metric_measures(metric_id, options).body new(resource) rescue Fog::OpenStack::Metric::NotFound nil end end end end end
Version data entries
20 entries across 20 versions & 3 rubygems