Class: Fog::HP::LB::LoadBalancer
- Inherits:
-
Model
- Object
- Model
- Fog::HP::LB::LoadBalancer
- Defined in:
- lib/fog/hp/models/lb/load_balancer.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
21 22 23 24 25 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 21 def destroy requires :id service.delete_load_balancer(id) true end |
#nodes ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 35 def nodes @nodes ||= begin Fog::HP::LB::Nodes.new({ :service => service, :load_balancer => self }) end end |
#nodes=(new_nodes = []) ⇒ Object
44 45 46 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 44 def nodes=(new_nodes=[]) nodes.load(new_nodes) end |
#ready? ⇒ Boolean
27 28 29 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 27 def ready? self.status == 'ACTIVE' end |
#save ⇒ Object
31 32 33 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 31 def save identity ? update : create end |