Sha256: 719e33adbf1622f001da562a9b9d68240c4f4799c215282f642bcd0ba69963e8

Contents?: true

Size: 664 Bytes

Versions: 4

Compression:

Stored size: 664 Bytes

Contents

require 'fog/compute/gridscale/models/paging_collection'

module Fog
  module Compute
    class Gridscale
      class Loadbalancers < Fog::Compute::Gridscale::PagingCollection
        model Fog::Compute::Gridscale::Loadbalancer

        def all(filters={})
          data = service.load_balancers_get(filters)
          loadbalancers = data.body["loadbalancers"].values
          load(loadbalancers)
        end


        def get(object_uuid)
          loadbalancer = service.load_balancer_get(object_uuid).body['loadbalancer']
          new(loadbalancer) if loadbalancer
        rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-gridscale-0.1.5 lib/fog/compute/gridscale/models/loadbalancers.rb
fog-gridscale-0.1.4 lib/fog/compute/gridscale/models/loadbalancers.rb
fog-gridscale-0.1.3 lib/fog/compute/gridscale/models/loadbalancers.rb
fog-gridscale-0.1.2 lib/fog/compute/gridscale/models/loadbalancers.rb