Created
December 11, 2018 20:01
-
-
Save kclinden/547c248c76327874af3cf4b1a2beb9ea to your computer and use it in GitHub Desktop.
Get Tag Categories
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
//Input: endpoint [VAPI:VAPIEndpoint] | |
//Return: Array/string | |
if(!endpoint){ | |
return null | |
} | |
var client = endpoint.client(); | |
var categories = new com_vmware_cis_tagging_category(client) ; | |
var catArray = []; | |
for each(cat in categories.list()){ | |
var wut = categories.get(cat); | |
//System.log(wut.name); | |
catArray.push(wut.name.toString()); | |
} | |
System.log(catArray.sort()); | |
return catArray; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment