Last active
August 29, 2015 14:01
-
-
Save marianogg9/e97cd7507d4c7767e3d5 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