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

addresses['internet'] (like on TryStack.org) supported and public and private_ip_address now work

This commit is contained in:
mattray 2012-05-26 01:02:03 -05:00
parent ffedab7072
commit 5e695499b9

View file

@ -76,7 +76,13 @@ module Fog
end
def private_ip_address
nil
if addresses['private']
#assume only a single private
return addresses['private'].first
else
#assume no private IP means private cloud
return addresses['internet'].first
end
end
def private_key_path
@ -89,7 +95,13 @@ module Fog
end
def public_ip_address
addresses['public'].first
if addresses['public']
#assume last is either original or assigned from floating IPs
return addresses['public'].last
else
#assume no public IP means private cloud
return addresses['internet'].first
end
end
def public_key_path