class Fog::Network::OpenStack::LbPool

Public Class Methods

new(attributes) click to toggle source
Calls superclass method Fog::Model::new
# File lib/fog/openstack/models/network/lb_pool.rb, line 25
def initialize(attributes)
  prepare_service_value(attributes)
  super
end

Public Instance Methods

associate_health_monitor(health_monitor_id) click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 63
def associate_health_monitor(health_monitor_id)
  requires :id
  service.associate_lb_health_monitor(self.id, health_monitor_id)
  true
end
create() click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 35
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
destroy() click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 51
def destroy
  requires :id
  service.delete_lb_pool(self.id)
  true
end
disassociate_health_monitor(health_monitor_id) click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 69
def disassociate_health_monitor(health_monitor_id)
  requires :id
  service.disassociate_lb_health_monitor(self.id, health_monitor_id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 30
def save
  requires :subnet_id, :protocol, :lb_method
  identity ? update : create
end
stats() click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 57
def stats
  requires :id
  merge_attributes(service.get_lb_pool_stats(self.id).body['stats'])
  self
end
update() click to toggle source
# File lib/fog/openstack/models/network/lb_pool.rb, line 44
def update
  requires :id, :subnet_id, :protocol, :lb_method
  merge_attributes(service.update_lb_pool(self.id,
                                          self.attributes).body['pool'])
  self
end