diff --git a/lib/fog/ibm/models/compute/server.rb b/lib/fog/ibm/models/compute/server.rb index 699444c86..98abd9855 100644 --- a/lib/fog/ibm/models/compute/server.rb +++ b/lib/fog/ibm/models/compute/server.rb @@ -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