RPC¶
pymco.rpc
¶
MCollective RPC calls support.
-
class
pymco.rpc.
SimpleAction
(config, msg, agent, logger=<logging.Logger object>, **kwargs)[source]¶ Single RPC call to MCollective
Parameters: - config –
pymco.config.Config
instance. - msg – A dictionary like object, usually a
pymco.message.Message
instance. - **kwargs – extra keyword arguments. Set the collective here if you aren’t targeting the main collective.
-
call
(timeout=5)[source]¶ Make the RPC call.
It should subscribe to the reply target, execute the RPC call and wait for the result.
Parameters: timeout – RPC call timeout. Returns: a dictionary like object with response. Raise: pymco.exc.TimeoutError
if expected messages don’t arrive intimeout
seconds.
- config –