Sha256: b65496f10a184a7742b9e23ae54bd156a62ad99f9fb040a663eab25db8fbb8a2

Contents?: true

Size: 1.02 KB

Versions: 67

Compression:

Stored size: 1.02 KB

Contents

Shindo.tests('HP::Network | networking floating ip model', ['hp', 'networking', 'floatingip']) do

  @ext_network = HP[:network].networks.all({'router:external'=>true}).first

  attributes = {:floating_network_id => @ext_network.id}
  model_tests(HP[:network].floating_ips, attributes, true)

  tests('success') do

    @network = HP[:network].networks.create(:name => 'my_network')
    attributes = {:name => 'port1', :network_id => @network.id}
    @port = HP[:network].ports.create(attributes)

    tests('#create').succeeds do
      attributes = {:floating_network_id => @ext_network.id}
      @fip = HP[:network].floating_ips.create(attributes)
      @fip.wait_for { ready? } unless Fog.mocking?
      !@fip.id.nil?
    end

    tests("#associate_port(#{@port.id})").succeeds do
      @fip.associate_port(@port.id)
    end

    # this will delete the port as well
    tests('#disassociate_port').succeeds do
      @fip.disassociate_port
    end

    tests('#destroy').succeeds do
      @fip.destroy
    end

    @network.destroy
  end

end

Version data entries

67 entries across 67 versions & 5 rubygems

Version Path
fog-1.38.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.37.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.36.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.35.0 tests/hp/models/network/floating_ip_tests.rb
fog-2.0.0.pre.0 tests/hp/models/network/floating_ip_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/hp/models/network/floating_ip_tests.rb
fog-1.34.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.33.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.32.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.31.0 tests/hp/models/network/floating_ip_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/hp/models/network/floating_ip_tests.rb
fog-1.30.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.29.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.28.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.27.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.26.0 tests/hp/models/network/floating_ip_tests.rb
fog-1.25.0 tests/hp/models/network/floating_ip_tests.rb
nsidc-fog-1.24.1 tests/hp/models/network/floating_ip_tests.rb
fog-1.24.0 tests/hp/models/network/floating_ip_tests.rb
ns-fog-1.22.11 tests/hp/models/network/floating_ip_tests.rb