Calls made to an aget use a YAML syntax with contents similar to XMLRPC
key value version indicates call version, 1.0 for now method the method to call args the arguments specified by keyword
version: 1.0
method: tcstart
args:
interval:
type: minmax
param1: 2.0
param2: 3.0
servers: [S1]
There is a utility class and function for dealing with method calls in Python. Basic usage just involves the function dispatchCall(object, msg). The function will take the message provided, decode the method call in the data and then call the appropriate method on the object passing in the message as the first arguments and the call arguments as keyword args.
Using the above method call example, dispatch call could call methods such as:
def tcstart(self, msg, **kwargs):
""" interval and servers show up in kwargs """
def tcstart(self, msg, interval, servers):
""" all arguments available in method call """