Reply To: Calling atomic functions across different technologies(Linux & Windows)

Nagarajan
Participant
1 year, 4 months ago #3712
Up
0
Down
::

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 Blueprint

def 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;
}