Sha256: 9e0d2a0f664952be929f47d9f97321ad73fbc20e64701779654aa5940800c652

Contents?: true

Size: 809 Bytes

Versions: 16

Compression:

Stored size: 809 Bytes

Contents

require 'fog/core/collection'
require 'fog/openstack/models/network/lb_health_monitor'

module Fog
  module Network
    class OpenStack
      class LbHealthMonitors < Fog::Collection
        attribute :filters

        model Fog::Network::OpenStack::LbHealthMonitor

        def initialize(attributes)
          self.filters ||= {}
          super
        end

        def all(filters = filters)
          self.filters = filters
          load(service.list_lb_health_monitors(filters).body['health_monitors'])
        end

        def get(health_monitor_id)
          if health_monitor = service.get_lb_health_monitor(health_monitor_id).body['health_monitor']
            new(health_monitor)
          end
        rescue Fog::Network::OpenStack::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.26.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.25.0 lib/fog/openstack/models/network/lb_health_monitors.rb
nsidc-fog-1.24.1 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.24.0 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.11 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.10 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.9 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.8 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.7 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.6 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.23.0 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.4 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.3 lib/fog/openstack/models/network/lb_health_monitors.rb
ns-fog-1.22.2 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.22.1 lib/fog/openstack/models/network/lb_health_monitors.rb