Sha256: 12c9c3aa49d9ea63c563db1f37a17cfe6925fdc37f812454f66f013d1df54914

Contents?: true

Size: 675 Bytes

Versions: 28

Compression:

Stored size: 675 Bytes

Contents

module Shindo
  class Tests
    def given_a_load_balancer_service(&block)
      @service = Fog::Rackspace::LoadBalancers.new
      instance_eval(&block)
    end
    def given_a_load_balancer(&block)
        @lb = @service.load_balancers.create({
            :name => ('fog' + Time.now.to_i.to_s),
            :protocol => 'HTTP',
            :port => 80,
            :virtual_ips => [{ :type => 'PUBLIC'}],
            :nodes => [{ :address => '10.0.0.1', :port => 80, :condition => 'ENABLED'}]
          })
        @lb.wait_for { ready? }
      begin
        instance_eval(&block)
      ensure
        @lb.wait_for { ready? }
        @lb.destroy
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
michiels-fog-1.3.1 tests/rackspace/helper.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/rackspace/helper.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
fog-1.3.1 tests/rackspace/helper.rb
fog-1.3.0 tests/rackspace/helper.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
fog-1.2.0 tests/rackspace/helper.rb
ktheory-fog-1.1.2 tests/rackspace/helper.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
fog-1.1.2 tests/rackspace/helper.rb
fog_tractical-1.1.4 tests/rackspace/helper.rb
fog_tractical-1.1.3 tests/rackspace/helper.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/tests/rackspace/helper.rb
fog-1.1.1 tests/rackspace/helper.rb
fog-1.1.0 tests/rackspace/helper.rb