diff --git a/lib/ironfan/provider/openstack/machine.rb b/lib/ironfan/provider/openstack/machine.rb index 5e9c58f1..4cf78b5e 100644 --- a/lib/ironfan/provider/openstack/machine.rb +++ b/lib/ironfan/provider/openstack/machine.rb @@ -71,7 +71,6 @@ def image_id def groups ; Array(@adaptee.security_groups) ; end def public_hostname ; private_ip_address ; end - def public_ip_address ; adaptee.public_ip_address || private_ip_address ; end def dns_name ; public_ip_address ; end def keypair ; key_pair ; end @@ -117,8 +116,8 @@ def to_display(style,values={}) # style == :minimal values["State"] = (state || "unknown").to_sym values["MachineID"] = id - values["Public IP"] = private_ip_address - values["Private IP"] = public_ip_address + values["Public IP"] = public_ip_address + values["Private IP"] = private_ip_address values["Created On"] = created_at.to_date return values if style == :minimal @@ -143,7 +142,7 @@ def private_ip_address end def public_ip_address - adaptee.public_ip_address rescue nil + adaptee.floating_ip_address rescue nil end def to_s