Sha256: d0405613145c2e88f68229ce59beedd569ddcf915ace662c45af417e13d9658a

Contents?: true

Size: 666 Bytes

Versions: 26

Compression:

Stored size: 666 Bytes

Contents

require "integration/factories/collection_factory"
require "integration/factories/disks_factory"

class ServersFactory < CollectionFactory
  def initialize(example)
    @disks = DisksFactory.new(example)
    super(Fog::Compute[:google].servers, example)
  end

  def cleanup
    # Disk cleanup sometimes fails if server deletion has not been completed
    super(false)
    @disks.cleanup
  end

  def get(identity)
    @subject.get(identity, TEST_ZONE)
  end

  def all
    @subject.all(zone: TEST_ZONE)
  end

  def params
    { :name => resource_name,
      :zone => TEST_ZONE,
      :machine_type => TEST_MACHINE_TYPE,
      :disks => [@disks.create] }
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
fog-google-1.24.1 test/integration/factories/servers_factory.rb
fog-google-1.24.0 test/integration/factories/servers_factory.rb
fog-google-1.23.0 test/integration/factories/servers_factory.rb
fog-google-1.22.0 test/integration/factories/servers_factory.rb
fog-google-1.21.1 test/integration/factories/servers_factory.rb
fog-google-1.21.0 test/integration/factories/servers_factory.rb
fog-google-1.20.0 test/integration/factories/servers_factory.rb
fog-google-1.19.0 test/integration/factories/servers_factory.rb
fog-google-1.18.0 test/integration/factories/servers_factory.rb
fog-google-1.17.0 test/integration/factories/servers_factory.rb
fog-google-1.16.1 test/integration/factories/servers_factory.rb
fog-google-1.16.0 test/integration/factories/servers_factory.rb
fog-google-1.15.0 test/integration/factories/servers_factory.rb
fog-google-1.14.0 test/integration/factories/servers_factory.rb
gitlab-fog-google-1.14.0 test/integration/factories/servers_factory.rb
fog-google-1.13.0 test/integration/factories/servers_factory.rb
gitlab-fog-google-1.13.0 test/integration/factories/servers_factory.rb
fog-google-1.12.1 test/integration/factories/servers_factory.rb
fog-google-1.12.0 test/integration/factories/servers_factory.rb
fog-google-1.11.0 test/integration/factories/servers_factory.rb