Class: Fog::Rackspace::LoadBalancers::Nodes
- Inherits:
-
Collection
- Object
- Collection
- Fog::Rackspace::LoadBalancers::Nodes
- Defined in:
- lib/fog/rackspace/models/load_balancers/nodes.rb
Instance Attribute Summary collapse
-
#load_balancer ⇒ Object
Returns the value of attribute load_balancer.
Instance Method Summary collapse
Instance Attribute Details
#load_balancer ⇒ Object
Returns the value of attribute load_balancer.
10 11 12 |
# File 'lib/fog/rackspace/models/load_balancers/nodes.rb', line 10 def load_balancer @load_balancer end |
Instance Method Details
#all ⇒ Object
12 13 14 15 16 |
# File 'lib/fog/rackspace/models/load_balancers/nodes.rb', line 12 def all requires :load_balancer data = service.list_nodes(load_balancer.id).body['nodes'] load(data) end |
#get(node_id) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/fog/rackspace/models/load_balancers/nodes.rb', line 18 def get(node_id) requires :load_balancer if node = service.get_node(load_balancer.id, node_id).body['node'] new(node) end rescue Fog::Rackspace::LoadBalancers::NotFound nil end |