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:
parent
3c3c6d5b2e
commit
4b4a50e0cf
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue