loop through each instance, wait for a new one to come up, then deregister and terminate the old one

This commit is contained in:
Anuj Biyani
2013-06-03 16:19:03 -07:00
parent 9273f748c2
commit b463901f98
5 changed files with 70 additions and 2 deletions

View File

@@ -42,6 +42,10 @@ module AWS
self.instance_variable_set "@#{key}", value
end
end
def ec2_instances
[]
end
end
end
end

View File

@@ -12,10 +12,20 @@ module AWS
end
end
class InstanceCollection
class InstanceCollection < Array
def initialize
end
def register(*instances)
self.concat instances
end
def deregister(*instances)
instances.each do |i|
self.delete i
end
end
def health
@health ||= [
{