Sha256: 347547ee1ff9ee6a429f1dea4210b9c464eade53489dcea2d22730b20d026fe0

Contents?: true

Size: 734 Bytes

Versions: 16

Compression:

Stored size: 734 Bytes

Contents

def test
  connection = Fog::Compute.new({ :provider => "Google" })
  time = Time.now.utc.to_i
  disk = connection.disks.create({
    :name => 'foggydisk',
    :size_gb => 10,
    :zone_name => 'us-central1-a',
    :source_image => 'centos-6-v20130522',
  })

  disk.wait_for { disk.ready? }
  params = {
    :name => "fog-smoke-test-#{Time.now.to_i}",
    :machine_type => "f1-micro",
    :zone_name => "us-central1-a",
    :disks => [ disk.get_as_boot_disk(true) ],
    :user => ENV['USER']
  }

  server = connection.servers.bootstrap params

  raise "Could not bootstrap sshable server." unless server.ssh("whoami")
  raise "Could not delete server." unless server.destroy
  raise "Could not delete disk." unless disk.destroy
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/google/examples/launch_micro_instance.rb
fog-1.20.0 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/google/examples/launch_micro_instance.rb