Created
July 27, 2016 19:45
-
-
Save chelnak/bf597945da40cb5bea9602a8df0955e6 to your computer and use it in GitHub Desktop.
Get an NSX Security Tag by name
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
/* | |
- Get an NSX Security Tag by name | |
Inputs: | |
NSXEndpoint [NSXConnection] | |
securityGroupName [String] | |
*/ | |
var nsxSecurityTags = NSXSecurityTagManager.getSecurityTags(NSXEndpoint); | |
return nsxSecurityTags.filter(nameEquals(securityTagName))[0]; | |
function nameEquals(name) { | |
return function(i) { | |
return i.name.toLowerCase() === name.toLowerCase(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment