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:
parent
4940cf36ac
commit
d4f61157f8
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue