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
22 23 24 25 26 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 22 def destroy requires :id service.delete_load_balancer(id) true end |
#nodes ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 36 def nodes @nodes ||= begin Fog::HP::LB::Nodes.new({ :service => service, :load_balancer => self }) end end |
#nodes=(new_nodes = []) ⇒ Object
45 46 47 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 45 def nodes=(new_nodes=[]) nodes.load(new_nodes) end |
#ready? ⇒ Boolean
28 29 30 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 28 def ready? self.status == 'ACTIVE' end |
#save ⇒ Object
32 33 34 |
# File 'lib/fog/hp/models/lb/load_balancer.rb', line 32 def save identity ? update : create end |