Sha256: 8d6bcafe6e3ff98a05f8ad7d616a30bd0870320f1a439eb360db1a78c1d2e519

Contents?: true

Size: 1.14 KB

Versions: 20

Compression:

Stored size: 1.14 KB

Contents

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

      class Mock
        def get_resource_metric_measures(_resource_id, _metric_name, _options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = [
              [
                  "2014-10-06T14:00:00+00:00",
                  3600.0,
                  24.7
              ],
              [
                  "2014-10-06T14:34:00+00:00",
                  60.0,
                  15.5
              ],
              [
                  "2014-10-06T14:34:12+00:00",
                  1.0,
                  6.0
              ],
              [
                  "2014-10-06T14:34:20+00:00",
                  1.0,
                  25.0
              ]
          ]
          response
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.1.2 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-fork-99 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.1.0 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.1.0.pre lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.11 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.10 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.9 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.8 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.7 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.6 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.5 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.4 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.3 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.2 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.1 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-1.0.0 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
fog-openstack-0.3.1 lib/fog/openstack/metric/requests/get_resource_metric_measures.rb