Class: Fog::OpenStack::Network::LbPool

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/network/models/lb_pool.rb

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from Model

#initialize, #save

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#associate_health_monitor(health_monitor_id) ⇒ Object



53
54
55
56
57
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 53

def associate_health_monitor(health_monitor_id)
  requires :id
  service.associate_lb_health_monitor(id, health_monitor_id)
  true
end

#createObject



25
26
27
28
29
30
31
32
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 25

def create
  requires :subnet_id, :protocol, :lb_method
  merge_attributes(service.create_lb_pool(subnet_id,
                                          protocol,
                                          lb_method,
                                          attributes).body['pool'])
  self
end

#destroyObject



41
42
43
44
45
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 41

def destroy
  requires :id
  service.delete_lb_pool(id)
  true
end

#disassociate_health_monitor(health_monitor_id) ⇒ Object



59
60
61
62
63
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 59

def disassociate_health_monitor(health_monitor_id)
  requires :id
  service.disassociate_lb_health_monitor(id, health_monitor_id)
  true
end

#statsObject



47
48
49
50
51
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 47

def stats
  requires :id
  merge_attributes(service.get_lb_pool_stats(id).body['stats'])
  self
end

#updateObject



34
35
36
37
38
39
# File 'lib/fog/openstack/network/models/lb_pool.rb', line 34

def update
  requires :id, :subnet_id, :protocol, :lb_method
  merge_attributes(service.update_lb_pool(id,
                                          attributes).body['pool'])
  self
end