Permalink
Browse files

:auto_elastic_ip functionality to separate it from known :elastic_ip …

…addresses; fixing docstrings for new features. Part deaux
  • Loading branch information...
2 parents 2e807d9 + 7f38461 commit f2e17a641394929bad6d6d44b2932411419ee8e2 @schade schade committed Jan 10, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/ironfan/provider/ec2/elastic_ip.rb
View
6 lib/ironfan/provider/ec2/elastic_ip.rb
@@ -58,7 +58,11 @@ def self.save!(computer)
return unless computer.created?
# instead of just returning if the elastic_ip is blank we first test if the symbol exists and whether an actual
# address exists in the collection; All three require the presence of elastic_ip in the facet definition. We
+<<<<<<< HEAD
# also, for connecting to a VPC, can use allocation_id for the given :elastic_ip to attach an Elastic IP.
+=======
+ # also, in the case of VPC Elastic IPs, can discover and use allocation_id to attach a VPC Elastic IP.
+>>>>>>> develop
return unless computer.server.ec2.include?(:elastic_ip)
if ( computer.server.ec2.elastic_ip.nil? and cloud.vpc.nil? )
# First, :elastic_ip is set, no address is currently allocated for this connection's owner
@@ -88,7 +92,7 @@ def self.save!(computer)
Ironfan.step(computer.name, "associating Elastic IP #{elastic_ip}", :blue)
Ironfan.unless_dry_run do
Ironfan.safely do
- if !cloud.vpc.nil?
+ if cloud.vpc.nil?
Ec2.connection.associate_address( computer.machine.id, public_ip = elastic_ip )
else
Ec2.connection.associate_address( computer.machine.id, allocation_id = allocation_id )

0 comments on commit f2e17a6

Please sign in to comment.