Participant
1 year, 8 months ago
#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 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;
}