Sha256: 96ff7be5d5a1c08a5231bd4d484f0d2cdc9fe9ab359350e5ece2f0459fce82ab

Contents?: true

Size: 1 KB

Versions: 15

Compression:

Stored size: 1 KB

Contents

require 'fog/core/collection'
require 'fog/storm_on_demand/models/network/balancer'

module Fog
  module Network
    class StormOnDemand
      class Balancers < Fog::Collection
        model Fog::Network::StormOnDemand::Balancer

        def all(options={})
          data = service.list_balancers(options).body['items']
          load(data)
        end

        def available(name)
          avail = service.check_balancer_available(:name => name).body
          avail['available'].to_i == 1 ? true : false
        end

        def create(options)
          balancer = service.create_balancer(options).body
          new(balancer)
        end

        def get(uniq_id)
          balancer = service.get_balancer_details(:uniq_id => uniq_id).body
          new(balancer)
        end

        def possible_nodes(options={})
          service.get_balancer_possible_nodes(options).body['items']
        end

        def strategies
          service.get_balancer_strategies.body['strategies']
        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/balancers.rb
fog-1.25.0 lib/fog/storm_on_demand/models/network/balancers.rb
nsidc-fog-1.24.1 lib/fog/storm_on_demand/models/network/balancers.rb
fog-1.24.0 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.11 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.10 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.9 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.8 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.7 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.6 lib/fog/storm_on_demand/models/network/balancers.rb
fog-1.23.0 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.4 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.3 lib/fog/storm_on_demand/models/network/balancers.rb
ns-fog-1.22.2 lib/fog/storm_on_demand/models/network/balancers.rb
fog-1.22.1 lib/fog/storm_on_demand/models/network/balancers.rb