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

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

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::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/models/network/lb_pool.rb', line 53

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

#createObject


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

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

#destroyObject


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

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

#disassociate_health_monitor(health_monitor_id) ⇒ Object


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

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

#statsObject


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

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

#updateObject


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

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