Sha256: 7ecb454e3cf20ec9c676540d46198343a0ff13a632c5a6363df0f58945c81b34

Contents?: true

Size: 767 Bytes

Versions: 24

Compression:

Stored size: 767 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'],
    :kernel => 'gce-v20130522',
  }

  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

24 entries across 24 versions & 2 rubygems

Version Path
fog-1.19.0 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/google/examples/launch_micro_instance.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/google/examples/launch_micro_instance.rb
fog-1.18.0 lib/fog/google/examples/launch_micro_instance.rb
fog-1.17.0 lib/fog/google/examples/launch_micro_instance.rb