...
To execute a function call on a remote node the following RPC YAML block is sent
Code Block |
---|
rpc: targetdst: agent_id # thename ID of the agent to execute the function on src: source_name # name of the originator of the rpc type: function_call # Type of the RPC script: script_path # Path to the script which includes the function to execute fname: function_name # Name of function to execute parameters: # Parameters to pass the function param0: value # parameters can be string, integer, float or list param1: value2 paramN: valueN |
To return the results of the script execution
Code Block |
---|
rpc: targetdst: masteragent_id # master ID. There should only be one name of the agent to execute the function on src: source_name # name of the originator of the rpc type: results # Type of the RPC results: script: script_path # Path to the script which was executed return_code: python_object # return code of function which is a python object |
...