com.deangrant.http-rest/getRestHostByName
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
// 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(restHost.name == name){ | |
return restHost | |
} // if(restHost.name == 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