Created
May 27, 2014 14:41
-
-
Save marianogg9/a490379e5f8aab15c240 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ec2_node_exists? | |
states = get_valid_states | |
filtered_instances = ec2.servers.select { |s| states.include?(s.state) } | |
instance_names = filtered_instances.collect { |s| s.name } | |
instance_names.each do |name| | |
return true if name == @event['client']['name'] | |
end | |
false # no match found, node doesn't exist | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment