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

[ibm] Return nil for public_hostname if primary_ip unset (e.g. state is Failed)

This commit is contained in:
Decklin Foster 2012-02-27 10:22:15 -05:00
parent 3c3c6d5b2e
commit 4b4a50e0cf

View file

@ -164,11 +164,11 @@ module Fog
end
def public_hostname
attributes[:primary_ip]["hostname"]
primary_ip ? primary_ip['hostname'] : nil
end
def public_ip_address
attributes[:primary_ip]["ip"]
primary_ip ? primary_ip['ip'] : nil
end
# Creates an image from the current instance