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.31 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.10 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.30 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.29 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.9 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.1.28 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.8 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.7 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.6 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.5 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.4 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.3 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.2 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.3.0 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.2.4 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.2.3 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.2.2 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.2.1 lib/fog/monitoring/openstack/models/metrics.rb
fog-openstack-0.2.0 lib/fog/monitoring/openstack/models/metrics.rb
fog-zj-0.1.28 lib/fog/monitoring/openstack/models/metrics.rb