1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fog::Compute::AWS::Address#server -> assigned Server

This commit is contained in:
Dr Nic Williams 2012-04-18 15:56:00 -07:00
parent 4940cf36ac
commit d4f61157f8
2 changed files with 11 additions and 0 deletions

View file

@ -31,6 +31,10 @@ module Fog
end
end
def server
connection.servers.get(server_id)
end
def save
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity
data = connection.allocate_address.body

View file

@ -9,6 +9,13 @@ Shindo.tests("Fog::Compute[:aws] | address", ['aws']) do
@instance.server = @server
end
tests('#server') do
test(' == @server') do
@server.reload
@instance.server.public_ip_address == @instance.public_ip
end
end
@server.destroy
end