Sha256: e1db855b07960f69f9f3b716f85a12accc0adb3919914d5de3ce3613300b150e

Contents?: true

Size: 693 Bytes

Versions: 5

Compression:

Stored size: 693 Bytes

Contents

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

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

        model Fog::Network::OpenStack::LbVip

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

        def all(filters_arg = filters)
          filters = filters_arg
          load(service.list_lb_vips(filters).body['vips'])
        end

        def get(vip_id)
          if vip = service.get_lb_vip(vip_id).body['vip']
            new(vip)
          end
        rescue Fog::Network::OpenStack::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-1.31.0 lib/fog/openstack/models/network/lb_vips.rb
fog-1.30.0 lib/fog/openstack/models/network/lb_vips.rb
fog-1.29.0 lib/fog/openstack/models/network/lb_vips.rb
fog-1.28.0 lib/fog/openstack/models/network/lb_vips.rb
fog-1.27.0 lib/fog/openstack/models/network/lb_vips.rb