Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Returns a collection of REST:RESTHost object types from the inventory service plugin
var getHosts = RESTHostManager.getHosts()
// Iterates the collection to return the REST:RESTHost object type and perform a match on the name attribute provided as an input parameter and returns the REST:RESTHost type if true.
for(var restHostId in getHosts){
var restHost = RESTHostManager.getHost(getHosts[restHostId])
if( == name){
return restHost
} // if( == name)
} // var restHost = RESTHostManager.getHost(getHosts[restHostId])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment