Sha256: 642ef12bde95929d852fc9955a23f43f57f2f3a77741d0692b42f7c0585c32fc

Contents?: true

Size: 956 Bytes

Versions: 34

Compression:

Stored size: 956 Bytes

Contents

module Fog
  module Metric
    class OpenStack
      class Real
        def get_metric_measures(metric_id, options = {})
          request(
              :expects => 200,
              :method  => 'GET',
              :path    => "metric/#{metric_id}/measures",
              :query    => options,
          )
        end
      end

      class Mock
        def get_metric_measures(_metric_id, _options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = [
              {
                  "timestamp" => "2014-10-06T14:33:57",
                  "value"     => 43.1
              },
              {
                  "timestamp" => "2014-10-06T14:34:12",
                  "value"     => 12
              },
              {
                  "timestamp" => "2014-10-06T14:34:20",
                  "value"     => 2
              }
          ]
          response
        end
      end
    end
  end
end

Version data entries

34 entries across 32 versions & 3 rubygems

Version Path
fog-openstack-0.1.27 lib/fog/metric/openstack/requests/get_metric_measures.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/metric/openstack/requests/get_metric_measures.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/metric/openstack/requests/get_metric_measures.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.26 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.25 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.24 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.23 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.22 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.21 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.20 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.19 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.18 lib/fog/metric/openstack/requests/get_metric_measures.rb
fog-openstack-0.1.17 lib/fog/metric/openstack/requests/get_metric_measures.rb