Sha256: 0deb90c800407815b76adc11c2e6fe07063a4e207714a000a3386a336b1c8c42

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

require_relative 'monitoring_policy'

module Fog
  module Compute
    class OneAndOne
      class MonitoringPolicies < Fog::Collection
        model Fog::Compute::OneAndOne::MonitoringPolicy

        def all
          response = service.list_monitoring_policies
          load(response.body)
        end

        def get(id)
          response = service.get_monitoring_policy(id)
          new(response.body)
        rescue Excon::Errors::NotFound
          nil
        end

      end # MonitoringPolicies
    end # OneAndOne
  end # Compute
end # Fog

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-oneandone-1.2 lib/oneandone/models/compute/monitoring_policies.rb
fog-oneandone-1.0 lib/oneandone/models/compute/monitoring_policies.rb