Skip to content

Commit

Permalink
Merge pull request infochimps-labs#4 from erikmack/master
Browse files Browse the repository at this point in the history
display floating IP's, also bump excon
  • Loading branch information
howech committed Feb 25, 2014
2 parents 1925e5e + 5edcf9a commit 1572b76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ironfan.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<chef>, ["~> 10.16"])
s.add_runtime_dependency(%q<fog>, ["~> 1.2"])
s.add_runtime_dependency(%q<excon>, ["~> 0.21.0"])
s.add_runtime_dependency(%q<excon>, ["~> 0.31.0"])
s.add_runtime_dependency(%q<formatador>, ["~> 0.2"])
s.add_runtime_dependency(%q<gorillib>, ["~> 0.5.0"])
s.add_runtime_dependency(%q<rbvmomi>, [">= 0"])
Expand All @@ -197,7 +197,7 @@ Gem::Specification.new do |s|
else
s.add_dependency(%q<chef>, ["~> 10.16"])
s.add_dependency(%q<fog>, ["~> 1.2"])
s.add_dependency(%q<excon>, ["~> 0.21.0"])
s.add_dependency(%q<excon>, ["~> 0.31.0"])
s.add_dependency(%q<formatador>, ["~> 0.2"])
s.add_dependency(%q<gorillib>, ["~> 0.5.0"])
s.add_dependency(%q<rbvmomi>, [">= 0"])
Expand All @@ -213,7 +213,7 @@ Gem::Specification.new do |s|
else
s.add_dependency(%q<chef>, ["~> 10.16"])
s.add_dependency(%q<fog>, ["~> 1.2"])
s.add_dependency(%q<excon>, ["~> 0.21.0"])
s.add_dependency(%q<excon>, ["~> 0.31.0"])
s.add_dependency(%q<formatador>, ["~> 0.2"])
s.add_dependency(%q<gorillib>, ["~> 0.5.0"])
s.add_dependency(%q<rbvmomi>, [">= 0"])
Expand Down
7 changes: 3 additions & 4 deletions lib/ironfan/provider/openstack/machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 1572b76

Please sign in to comment.