mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Examples tweak
This commit is contained in:
parent
7d1db39924
commit
ec01bad657
2 changed files with 18 additions and 1 deletions
|
@ -11,7 +11,6 @@ def test
|
|||
: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'],
|
||||
})
|
||||
|
|
18
lib/fog/google/examples/network.rb
Normal file
18
lib/fog/google/examples/network.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
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.bootstrap(defaults = {
|
||||
: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'],
|
||||
})
|
||||
end
|
Loading…
Add table
Reference in a new issue