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