Created
November 5, 2012 17:25
-
-
Save joesondow/4018534 to your computer and use it in GitHub Desktop.
Asgard console cases
This file contains 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
// App owners with ELBs | |
Set frontEndAppEmails = new TreeSet() | |
['nactest', 'nacprod'].each { String env -> | |
asgardLocator.getInstance(env).acrossRegions { | |
def elbs = loadBalancer | |
def apps = application | |
def pattern = ~/([a-zA-Z0-9._]*).*?/ | |
def frontEndAppNames = elbs.findResults { | |
def matcher = it.loadBalancerName =~ pattern | |
if (matcher.matches()) { | |
return matcher.group(1) | |
} | |
}.unique() | |
frontEndAppEmails.addAll(apps.findAll { it.name in frontEndAppNames }*.email) | |
} | |
} | |
html.with { output << "Emails ${frontEndAppEmails}</br>" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment