Sha256: be9d41bbb2a11e9beafd5766325a0b4a6ad48a4a727682aedbe6011bce6e40a2

Contents?: true

Size: 1.02 KB

Versions: 37

Compression:

Stored size: 1.02 KB

Contents

require 'fog/openstack/models/collection'
require 'fog/monitoring/openstack/models/metric'
require 'fog/monitoring/openstack/models/dimension_values'

module Fog
  module Monitoring
    class OpenStack
      class Metrics < Fog::OpenStack::Collection
        model Fog::Monitoring::OpenStack::Metric

        def all(options = {})
          load_response(service.list_metrics(options), 'elements')
        end

        def list_metric_names(options = {})
          load_response(service.list_metric_names(options), 'elements')
        end

        def create(attributes)
          super(attributes)
        end

        def create_metric_array(metrics_list = [])
          service.create_metric_array(metrics_list)
        end

        def list_dimension_values(dimension_name, options = {})
          dimension_value = Fog::Monitoring::OpenStack::DimensionValues.new
          dimension_value.load_response(
            service.list_dimension_values(dimension_name, options), 'elements'
          )
        end
      end
    end
  end
end

Version data entries

37 entries across 35 versions & 3 rubygems

Version Path
fog-openstack-0.1.27 lib/fog/monitoring/openstack/models/metrics.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/monitoring/openstack/models/metrics.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/monitoring/openstack/models/metrics.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.26 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.25 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.24 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.23 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.22 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.21 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.20 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.19 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.18 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.17 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.15 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.14 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.13 lib/fog/monitoring/openstack/models/metrics.rb