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

Hack to fix public_ip_address.

This commit is contained in:
Rupak Ganguly 2012-02-13 19:04:05 -05:00
parent 482ef45da2
commit 6bf0465fe1

View file

@ -77,7 +77,10 @@ module Fog
end
def public_ip_address
addr = addresses.nil? ? nil : addresses.fetch('public', []).first
# FIX: Both the private and public ips are bundled under "private" network name
# So hack to get to the public ip address
#addr = addresses.nil? ? nil : addresses.fetch('public', []).first
addr = addresses.nil? ? nil : addresses.fetch('private', []).last
addr["addr"] if addr
end