Sha256: 2b46489c2eca0a287fea8c41a2c39a234a3561de4858ae8ad7106642a5d8adb1

Contents?: true

Size: 1.79 KB

Versions: 20

Compression:

Stored size: 1.79 KB

Contents

require 'fog/openstack/models/model'

module Fog
  module OpenStack
    class Network
      class LbPool < Fog::OpenStack::Model
        identity :id

        attribute :subnet_id
        attribute :protocol
        attribute :lb_method
        attribute :name
        attribute :description
        attribute :health_monitors
        attribute :members
        attribute :status
        attribute :admin_state_up
        attribute :vip_id
        attribute :tenant_id
        attribute :active_connections
        attribute :bytes_in
        attribute :bytes_out
        attribute :total_connections

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

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

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

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

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

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

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.1.2 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-fork-99 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.1.0 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.1.0.pre lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.11 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.10 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.9 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.8 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.7 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.6 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.5 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.4 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.3 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.2 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.1 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-1.0.0 lib/fog/openstack/network/models/lb_pool.rb
fog-openstack-0.3.1 lib/fog/openstack/network/models/lb_pool.rb