Sha256: a7d3c45f24bfbfabaf1ee47a8ade6844225ea7b487ea3a808a7dc9f64c15d347

Contents?: true

Size: 700 Bytes

Versions: 41

Compression:

Stored size: 700 Bytes

Contents

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

module Fog
  module Rackspace
    class LoadBalancers
      class Nodes < Fog::Collection
        model Fog::Rackspace::LoadBalancers::Node

        attr_accessor :load_balancer

        def all
          requires :load_balancer
          data = connection.list_nodes(load_balancer.id).body['nodes']
          load(data)
        end

        def get(node_id)
          requires :load_balancer
          if node = connection.get_node(load_balancer.id, node_id).body['node']
            new(node)
          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/nodes.rb
fog-nirvanix-1.8.1 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-parser-fix-1.6.1 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-test-again-1.6.0 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-parser-fix-1.6.0 lib/fog/rackspace/models/load_balancers/nodes.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/rackspace/models/load_balancers/nodes.rb
fog-sgonyea-1.8.1 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.8.0 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.7.0 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.6.0 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.5.0 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.4.0 lib/fog/rackspace/models/load_balancers/nodes.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/nodes.rb
michiels-fog-1.3.1 lib/fog/rackspace/models/load_balancers/nodes.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/rackspace/models/load_balancers/nodes.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.3.1 lib/fog/rackspace/models/load_balancers/nodes.rb
fog-1.3.0 lib/fog/rackspace/models/load_balancers/nodes.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/nodes.rb