From 1b4fbf4c013f9e08cef511f8b88b516d11fb275c Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 25 Oct 2007 17:55:57 -0400 Subject: Added a ping function to the test module and a new command "func '*' ping" which can be used to see what servers are contactable from the command line for any given operation, without needing to run an otherwise meaningful command on them. Note that it does try to contact each server before showing results, so ideally we should provide a method in the client class to get the system list and create the client objects seperately for each contact, so output can stream back one line at a time. TBA. --- func/minion/modules/test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'func/minion/modules') diff --git a/func/minion/modules/test.py b/func/minion/modules/test.py index 55265a3..f900326 100755 --- a/func/minion/modules/test.py +++ b/func/minion/modules/test.py @@ -8,12 +8,16 @@ class Test(func_module.FuncModule): description = "Just a very simple example module" def __init__(self): self.methods = { - "add": self.add + "add": self.add, + "ping": self.ping } func_module.FuncModule.__init__(self) def add(self, numb1, numb2): return numb1 + numb2 + def ping(self): + return 1 + methods = Test() register_rpc = methods.register_rpc -- cgit