diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-09-20 15:08:27 -0400 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-09-20 15:08:27 -0400 |
commit | 733df2df42180487608688951acf1a83e079a86c (patch) | |
tree | 01917e26d60194ac294008a95394d18029522b32 /modules/test.py | |
parent | d96d4b72aebee6dc1089dd260705c23cb1b9cd27 (diff) | |
download | third_party-func-733df2df42180487608688951acf1a83e079a86c.tar.gz third_party-func-733df2df42180487608688951acf1a83e079a86c.tar.xz third_party-func-733df2df42180487608688951acf1a83e079a86c.zip |
initial code drop
module_loader from the virt-factory node server
xmlrpc server from the virt-factory-server code and some test modules
no ssl support yet, no init scripts, no packagin etc
Diffstat (limited to 'modules/test.py')
-rwxr-xr-x | modules/test.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/test.py b/modules/test.py new file mode 100755 index 0000000..7783b4e --- /dev/null +++ b/modules/test.py @@ -0,0 +1,26 @@ +#!/usr/bin/python + + +from codes import * +from modules import web_svc + + + +class Test(web_svc.WebSvc): + def __init__(self): + self.methods = { + "test_add": self.add, + "test_blippy": self.blippy, + } + web_svc.WebSvc.__init__(self) + + def add(self, numb1, numb2): + return success(int(numb1) + int(numb2)) + + def blippy(self, foo): + fh = open("/tmp/blippy","w+") + fh.close() + return success(foo) + +methods = Test() +register_rpc = methods.register_rpc |