Sha256: 4bd422766b659590cdbb6b924e0ed4d8ce16a47422be0e2e44feb48c9d7f6096

Contents?: true

Size: 770 Bytes

Versions: 20

Compression:

Stored size: 770 Bytes

Contents

def test
  connection = Fog::Compute.new({ :provider => "Google" })

  # we create a new private network
  connection.insert_network('my-private-network', '10.240.0.0/16')

  server = connection.servers.create({
    :name => "fog-smoke-test-#{Time.now.to_i}",
    :image_name => "debian-7-wheezy-v20130522",
    :machine_type => "n1-standard-1",
    :zone_name => "us-central1-a",
    :private_key_path => File.expand_path("~/.ssh/id_rsa"),
    :public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
    :network => 'my-private-network',
    :external_ip => false,
    :user => ENV['USER'],
  })

  # The network won't have any firewall rules, so we won't be able to ssh in.
  server.wait_for { ready? }

  raise "Could not delete server." unless server.destroy
end

Version data entries

20 entries across 20 versions & 2 rubygems

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