Permalink
Browse files

pushing changes that put us back in a state which completes the run w…

…ithout errors; still isn't attaching the elastic ip but is going through the motions.
  • Loading branch information...
schade committed Dec 6, 2012
1 parent ce3dd0a commit 76448df16e0408a9b66dbfaa2766c3c51cd60291
Showing with 8 additions and 2 deletions.
  1. +2 −1 lib/ironfan/provider/ec2/elastic_ip.rb
  2. +6 −1 lib/ironfan/provider/ec2/machine.rb
@@ -13,7 +13,7 @@ class ElasticIp < Ironfan::Provider::Resource
def self.shared?() true; end
def self.multiple?() false; end
def self.resource_type() :elastic_ip; end
- def self.expected_ids(computer) [ computer.server.ec2.public_ip ]; end
+ def self.expected_ids(computer) [ computer.server.ec2.public_ip ]; pp computer.server.ec2.public_ip; end
def name() adaptee.public_ip ; end
@@ -33,6 +33,7 @@ def self.load!(cluster=nil)
register eip
Chef::Log.debug("Loaded #{eip}")
end
+ pp adaptee
end
def self.attach()
@@ -160,7 +160,8 @@ def self.create!(computer)
machine = Machine.new(:adaptee => fog_server)
computer.machine = machine
# set elastic_ip here?
- #pp computer.machine.public_ip_address
+ pp machine #.public_ip_address
+ pp public_ip
#computer.machine.public_ip_address = computer.server.ec2.public_ip unless computer.server.ec2.public_ip.nil?
remember machine, :id => computer.name
@@ -252,6 +253,10 @@ def self.launch_description(computer)
IamServerCertificate.recall(IamServerCertificate.full_name(computer, cert))
end.compact.map(&:name)
+ description[:elastic_ip] = cloud.addresses.values.map do |eip|
+ ElasticIp.recall(ElasticIp.public_ip(computer, eip))
+ end.compact.map(&:name)
+
description[:elastic_load_balancers] = cloud.elastic_load_balancers.values.map do |elb|
ElasticLoadBalancer.recall(ElasticLoadBalancer.full_name(computer, elb))
end.compact.map(&:name)

0 comments on commit 76448df

Please sign in to comment.