Sha256: 8b89f088a1acc2870a472368d0153ec23c094f4496f02a7c3def0b8955897e4d

Contents?: true

Size: 756 Bytes

Versions: 11

Compression:

Stored size: 756 Bytes

Contents

require 'fog/core/collection'
require 'rackspace-monitoring/monitoring/models/alarm_example'

module Fog
  module Monitoring
    class Rackspace
      class AlarmExamples < Fog::Collection

        model Fog::Monitoring::Rackspace::AlarmExample

        def all
          data = connection.list_alarm_examples.body['values']
          load(data)
        end

        def get(alarm_example_id)
          data = connection.get_alarm_example(alarm_example_id).body
          new(data)
        rescue Fog::Monitoring::Rackspace::NotFound
          nil
        end

        def evaluate(alarm_example_id, options={})
          data = connection.evaluate_alarm_example(alarm_example_id, options).body
          new(data)
        end

      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rackspace-monitoring-0.2.8 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.7 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.6 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.5 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.4 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.3 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.2 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.1 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.2.0 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.1.4 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb
rackspace-monitoring-0.1.3 lib/rackspace-monitoring/monitoring/models/alarm_examples.rb