diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-10-25 17:55:57 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-10-25 17:55:57 -0400 |
commit | 1b4fbf4c013f9e08cef511f8b88b516d11fb275c (patch) | |
tree | d0caab329728a72375328680ffd02b469a086733 /func/minion/modules | |
parent | f260d08b05f263c0bb92937e18996c4b3caba1c4 (diff) | |
download | func-1b4fbf4c013f9e08cef511f8b88b516d11fb275c.tar.gz func-1b4fbf4c013f9e08cef511f8b88b516d11fb275c.tar.xz func-1b4fbf4c013f9e08cef511f8b88b516d11fb275c.zip |
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.
Diffstat (limited to 'func/minion/modules')
-rwxr-xr-x | func/minion/modules/test.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |