Sha256: 52c6f8748406c5e2184e17b7f8493407a90648286f39eee12ee413440b8a5aca

Contents?: true

Size: 655 Bytes

Versions: 41

Compression:

Stored size: 655 Bytes

Contents

require 'fog/core/collection'
require 'fog/rackspace/models/load_balancers/load_balancer'

module Fog
  module Rackspace
    class LoadBalancers

      class LoadBalancers < Fog::Collection

        model Fog::Rackspace::LoadBalancers::LoadBalancer

        def all
          data = connection.list_load_balancers.body['loadBalancers']
          load(data)
        end

        def get(load_balancer_id)
          if load_balancer = connection.get_load_balancer(load_balancer_id).body['loadBalancer']
            new(load_balancer)
          end
        rescue Fog::Rackspace::LoadBalancers::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 13 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-nirvanix-1.8.1 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-parser-fix-1.6.1 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-test-again-1.6.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-parser-fix-1.6.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-sgonyea-1.8.1 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.8.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.7.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.6.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.5.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.4.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancers.rb
michiels-fog-1.3.1 lib/fog/rackspace/models/load_balancers/load_balancers.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/rackspace/models/load_balancers/load_balancers.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.3.1 lib/fog/rackspace/models/load_balancers/load_balancers.rb
fog-1.3.0 lib/fog/rackspace/models/load_balancers/load_balancers.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancers.rb