Forum Replies Created
-
Nagarajan
Participant1 year, 8 months ago in reply to: Calling atomic functions across different technologies(Linux & Windows) #3712::Hi
You can execute any entity’s function by executing Graph query in groovy and call any functions on the entity by passing respective parameter
String queryOSNode = “GraphQuery.node(‘OS:”+hosttype+”‘).properties(‘OS.HostName’,'”+hostname+”‘)”;
hosttype is your Entity Type in Blueprint
hostname is FQDN or caption or key attribute of the entity which we used to search in ignio Maps in Blueprintdef OSnode = node.executeQuery(queryOSNode) // this statement gets the respective entity and store it in OSnode as a List
for(Object OS: OSnode){
def result = OS.<functionname>(<function input params separated by comma>)
eg: def result = OS.GetHostName() //any function name of the respective target entity.
break;
}
Viewing 1 post (of 1 total)