Sha256: 6f85e521b5d95b98879b641ed0d1edc81067684a049a14b1447bc36c7cd075de

Contents?: true

Size: 839 Bytes

Versions: 17

Compression:

Stored size: 839 Bytes

Contents

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

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

        model Fog::Network::OpenStack::LbHealthMonitor

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

        def all(filters_arg = filters)
          filters = filters_arg
          load_response(service.list_lb_health_monitors(filters), '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

17 entries across 17 versions & 2 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.9 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.8 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.7 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.6 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.5 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.4 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.3 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.2 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.1 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-openstack-0.1.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.37.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.36.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.35.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-2.0.0.pre.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.34.0 lib/fog/openstack/models/network/lb_health_monitors.rb
fog-1.33.0 lib/fog/openstack/models/network/lb_health_monitors.rb