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

2 years, 9 months ago #3517

Yes that is very much possible, here in cheetah you can access the global blueprint and call the function on any node which is blueprinted in cheetah UI, you can pass in a parameter(Linux hostname, do pass FQDN as we have FQDN in blueprint) where you want to trigger you Linux based atomic function and now you will be good to call the atomic function on the created node.

Below is the sample code using which you can create a node present in global blueprint:

def lHostName=”xyz”//FQDN of linux server, this can be passed as a parameter to custom function
Map<String, Object> attrMap = new HashMap<>();
attrMap.put(“HostName”, lHostName); // key attributes
Set<String> nodeLabels = new HashSet<>();
nodeEntityInstance = ceb.get(nodeLabels, attrMap);
myNode = ceb.get(nodeEntityInstance.getId(), nodeLabels);
def output = myNode.linux_atomic_function();

You can use above lines of code in custom function created in Windows project. Now you can call any linux atomic function on myNode and also you can call your windows atomic function on subject which will point to the windows node on which use case was triggered.