Sha256: 309c28c5c8ae5087b045ef86418298ca7df40532b8ab7226ffb17c26b11ca1f9

Contents?: true

Size: 1.38 KB

Versions: 15

Compression:

Stored size: 1.38 KB

Contents

require 'fog/core/model'

module Fog
  module Network
    class StormOnDemand
      class Balancer < Fog::Model
        identity :uniq_id

        attribute :capabilities
        attribute :name
        attribute :nodes
        attribute :region_id
        attribute :services
        attribute :session_persistence
        attribute :ssl_includes
        attribute :ssl_termination
        attribute :strategy
        attribute :vip

        def initialize(attributes={})
          super
        end

        def add_node(options)
          requires :identity
          service.add_balancer_node({:uniq_id => identity}.merge!(options))
        end

        def remove_node(options)
          requires :identity
          service.remove_balancer_node({:uniq_id => identity}.merge!(options))
        end

        def add_service(options)
          requires :identity
          service.add_balancer_service({:uniq_id => identity}.merge!(options))
        end

        def remove_service(options)
          requires :identity
          service.remove_balancer_service({:uniq_id => identity}.merge!(options))
        end

        def destroy
          requires :identity
          service.delete_balancer({:uniq_id => identity})
        end

        def update(options)
          requires :identity
          service.update_balancer({:uniq_id => identity}.merge!(options))
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/storm_on_demand/models/network/balancer.rb
fog-1.25.0 lib/fog/storm_on_demand/models/network/balancer.rb
nsidc-fog-1.24.1 lib/fog/storm_on_demand/models/network/balancer.rb
fog-1.24.0 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.11 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.10 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.9 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.8 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.7 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.6 lib/fog/storm_on_demand/models/network/balancer.rb
fog-1.23.0 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.4 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.3 lib/fog/storm_on_demand/models/network/balancer.rb
ns-fog-1.22.2 lib/fog/storm_on_demand/models/network/balancer.rb
fog-1.22.1 lib/fog/storm_on_demand/models/network/balancer.rb